/*******************************
 * 1. Variables & Root Styles
 *******************************/
:root {
    --wine: #773344;
    --melon: #ffa9a3;
    --papaya-whip: #f8ecd4;
    --light-yellow: #fffeda;
    --moonstone: #63b0cd;
    --text: #231111;
    --off-white: #FFFDFA;
}

/*******************************
 * 2. Typography & Base Styles
 *******************************/
body {
    background-color: var(--off-white);
    color: var(--text);
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
}

a {
    text-decoration: none;
    transition: color 0.2s ease;
}

/*******************************
 * 3. Layout & Grid
 *******************************/
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.main-content {
    padding-top: 1rem;
}

/* Grid Layout */
.restaurant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/*******************************
 * 4. Header & Navigation
 *******************************/
.site-header {
    background-color: var(--off-white);
    border-bottom: 1px solid var(--melon);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wine-icon {
    position: absolute;
    left: 2rem;
    display: flex;
    align-items: center;
    margin-top: 2px;
}

.wine-icon img {
    width: 36px;
    height: 36px;
    display: block;
}

.site-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin: 0;
    color: var(--text);
    line-height: 1;
    text-align: center;
}

/* Sub Navigation */
.sub-nav {
    border-top: 1px solid var(--melon);
    background-color: var(--off-white);
    padding: 0.5rem 0 0.2rem 0;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    padding: 0.25rem 0;
    position: relative;
}

.nav-link:hover {
    color: var(--wine);
}

.nav-link.active {
    color: var(--wine);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--wine);
}

/* Add to the Header section */
.header-waitlist-btn {
    position: absolute;
    right: 2rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background-color: var(--wine);
    color: var(--off-white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Lato', sans-serif;
}

.header-waitlist-btn:hover {
    background-color: var(--text);
    transform: translateY(-1px);
}

/*******************************
 * 5. Restaurant Cards & Filters
 *******************************/
.restaurant-card {
    background-color: var(--off-white);
    border: 1px solid var(--melon);
    padding: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 120px;
    display: flex;
    flex-direction: column;
}

.restaurant-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(119, 51, 68, 0.1);
    border-color: var(--wine);
}

.restaurant-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: var(--text);
}

.style {
    color: var(--moonstone);
    margin: 0 0 auto 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.corkage {
    color: var(--moonstone);
    margin: 0;
}

/* Filter Section */
.filter-section {
    margin: 0.5rem 0;
    text-align: center;
    position: relative;
}

.view-toggle {
    position: absolute;
    right: 2rem;
    top: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.view-btn {
    padding: 0.4rem;
    background: none;
    border: 1px solid var(--melon);
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.view-btn:hover {
    opacity: 1;
}

.view-btn.active {
    background-color: var(--off-white);
    border-color: var(--wine);
    color: var(--wine);
    opacity: 1;
}

.material-icons {
    font-size: 20px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--off-white);
    color: var(--text);
    border: 1px solid var(--melon);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Lato', sans-serif;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background-color: var(--melon);
}

.filter-btn.active {
    background-color: var(--wine);
    color: var(--off-white);
    border-color: var(--wine);
}

/* Mobile Filter Dropdown */
.filter-dropdown {
    display: none;
    width: 90%;
    max-width: 300px;
    padding: 0.75rem 1rem;
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    color: var(--text);
    background-color: var(--off-white);
    border: 1px solid var(--melon);
    border-radius: 4px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.filter-dropdown:focus,
.filter-dropdown:active {
    outline: none;
    border-color: var(--wine);
}

/* List View Styles */
.restaurant-grid.list-view {
    display: block;
    max-width: 1000px;
    padding: 0.5rem 0.5rem;
}

.list-view .restaurant-card {
    height: auto;
    margin-bottom: 0.25rem;
    padding: 0.25rem 0.25rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.25rem;
    align-items: center;
    border: none;
    box-shadow: none;
    background: none;
    cursor: pointer;
}

.list-view .restaurant-card:hover {
    transform: none;
    box-shadow: none;
    border: none;
    background-color: var(--papaya-whip);
    border-radius: 4px;
}

.list-view .restaurant-card h2 {
    margin: 0;
    grid-column: 1;
    font-size: 1.2rem;
}

.list-view .style {
    grid-column: 1;
    white-space: normal;
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: var(--text);
}

.list-view .corkage {
    grid-column: 2;
    grid-row: 1 / span 2;
    text-align: right;
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive adjustments for list view */
@media (max-width: 768px) {
    .restaurant-grid.list-view {
        padding: 1rem;
    }
    
    .list-view .restaurant-card {
        padding: 0.75rem;
    }
}

/*******************************
 * 6. Modals & Forms
 *******************************/
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: var(--off-white);
    margin: 10% auto;
    padding: 2.5rem;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    border: 1px solid var(--melon);
    color: var(--text);
}

.modal-content h2 {
    margin: 0 0 1.5rem 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--wine);
    text-align: center;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.5rem;
    color: var(--wine);
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: var(--moonstone);
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-group label {
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--wine);
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid var(--melon);
    border-radius: 4px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--wine);
    background-color: var(--light-yellow);
}

/* Restaurant Details */
.restaurant-details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    margin-top: 20px;
}

.detail-label {
    font-weight: bold;
    color: var(--wine);
}

.website-link {
    color: var(--moonstone);
    text-decoration: none;
}

.website-link:hover {
    text-decoration: underline;
}

/* Notification */
.notification {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--off-white);
    border: 1px solid var(--melon);
    border-radius: 4px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(119, 51, 68, 0.15);
    z-index: 1100;
    max-width: 300px;
    animation: slideIn 0.3s ease-out;
}

.notification-content p {
    margin: 0;
    color: var(--text);
}

.notification-content p:first-child {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.notification-subtext {
    font-size: 0.9rem;
    color: var(--moonstone) !important;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/*******************************
 * 7. Buttons
 *******************************/
/* Common Button Styles */
.suggest-btn,
.submit-btn,
.waitlist-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--off-white);
    color: var(--text);
    border: 1px solid var(--melon);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Lato', sans-serif;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

/* Button Hover States */
.suggest-btn:hover,
.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(119, 51, 68, 0.15);
    border-color: var(--wine);
    background-color: var(--melon);
}

/* Specific Button Styles */
.suggest-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(119, 51, 68, 0.1);
}

.submit-btn {
    margin-top: 0.5rem;
    align-self: flex-end;
}

.waitlist-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    background-color: var(--wine);
    color: var(--off-white);
    border: none;
}

.waitlist-btn:hover {
    background-color: var(--text);
    transform: translateY(-1px);
}

/*******************************
 * 8. Club Page
 *******************************/
.club-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.club-intro {
    text-align: left;
    margin-bottom: 3rem;
}

.membership-benefits {
    margin-bottom: 4rem;
}

.membership-benefits ul {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1.5rem;
}

.membership-benefits li {
    padding: 1.5rem;
    background-color: var(--off-white);
    border: 1px solid var(--melon);
    border-radius: 4px;
}

.membership-benefits h4 {
    color: var(--wine);
    margin: 0 0 0.5rem 0;
}

.waitlist-section {
    text-align: center;
    padding: 2rem;
    background-color: var(--off-white);
    border: 1px solid var(--melon);
    border-radius: 4px;
}

/*******************************
 * 9. About Page
 *******************************/
.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.about-content section {
    margin-bottom: 4rem;
}

.about-content section:last-child {
    margin-bottom: 2rem;
}

.about-content h2 {
    font-family: 'Playfair Display', serif;
    color: var(--text);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.about-contact {
    text-align: center;
}

.contact-link {
    display: inline-block;
    color: var(--wine);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: var(--text);
}

/*******************************
 * 10. Media Queries
 *******************************/
@media (max-width: 768px) {
    /* Header & Navigation */
    .header-content {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
    }

    .wine-icon {
        position: static;
        margin-right: 0.5rem;
    }

    .brand {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 0.25rem;
    }

    .header-waitlist-btn {
        position: static;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .site-title {
        font-size: 1.25rem;
    }

    .nav-content {
        gap: 2rem;
        padding: 0 1rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
    }

    .sub-nav {
        padding: 0.4rem 0 0.2rem 0;
    }

    /* Restaurant Cards */
    .restaurant-card {
        height: 100px;
    }

    /* Filter Buttons */
    .filter-buttons {
        display: none;
    }
    
    .filter-dropdown {
        display: block;
        margin: 0 auto;
    }

    /* Club Page */
    .club-content {
        padding: 1.5rem;
    }

    .club-intro h2 {
        font-size: 1.75rem;
    }

    .club-intro p {
        font-size: 1.1rem;
    }

    .waitlist-section {
        padding: 1.5rem;
    }

    /* About Page */
    .about-content {
        padding: 1.5rem;
    }

    .about-content section {
        margin-bottom: 3rem;
    }

    .about-content h2 {
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
    }

    .about-content p {
        font-size: 1rem;
        line-height: 1.7;
    }

    .contact-link {
        font-size: 1.1rem;
    }

    /* Buttons */
    .header-waitlist-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .view-toggle {
        right: 1rem;
    }

    /* Hide view toggle when filter buttons become dropdown */
    .view-toggle {
        display: none;
    }

    .modal-content {
        margin: 5% auto;
        padding: 1.5rem;
        width: 85%;
        max-height: 90vh;  /* Prevent modal from being taller than viewport */
        overflow-y: auto;  /* Allow scrolling if content is too tall */
    }

    .modal-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-group input {
        padding: 0.6rem;
    }
}

@media (max-width: 480px) {
    /* Navigation */
    .nav-content {
        gap: 1rem;
    }

    /* Restaurant Cards */
    .restaurant-card {
        height: 90px;
    }

    /* Buttons */
    .suggest-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

