/* ==========================================================================
   STONE SOUP HEADER STYLES - NEW HEADER DESIGN
   ========================================================================== */

/* Hero Wrapper Container - Full Width */
.hero-wrapper-container {
    width: 100%;
    background-color: #ffffff;
}

/* Content area wrapper - full width gray background */
.content-area-wrapper {
    width: 100%;
    background-color: #ffffff;
}

/* Hero Wrapper */
.hero-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background-color: transparent;
}

/* Top Area with Utility Nav - Now full width at top */
.top-area {
    width: 100%;
    border-bottom: 1px solid #ddd;
    background-color: #60a672;
}

.top-area-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Image Block - Now smaller and below top menu */
.image-section {
    width: 250px;
    background-color: #ffffff;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-container {
    width: 100%;
    max-width: 230px;
    text-align: center;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 10px;
}

/* Remove any default WordPress custom logo styles */
.image-container a {
    display: block;
    line-height: 0;
    text-decoration: none;
}

.image-container img.custom-logo,
.image-container .hero-image {
    max-width: 100%;
    height: auto;
}

.artist-credit {
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
}

/* Content row - holds image and main content side by side */
.content-row {
    display: flex;
    width: 100%;
    background-color: #ffffff;
}

/* Content Section - Right side next to image */
.content-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
}

.utility-nav {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    align-items: center;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.utility-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.utility-link:hover,
.utility-link:focus {
    color: #f0f0f0;
    text-decoration: underline;
}

.search-button {
    background: none;
    border: 1px solid #ffffff;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #ffffff;
    transition: all 0.2s ease;
}

.search-button:hover,
.search-button:focus {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    color: white;
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 25px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #ffffff;
}

.main-content .logo {
    font-size: 2.5rem;
    font-weight: normal;
    color: #2c2c2c;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.main-content .logo a {
    text-decoration: none;
    color: inherit;
}

.main-content .logo .main-logo-image {
    max-height: 80px;
    width: auto;
    max-width: 100%;
    display: block;
}

.main-content .tagline {
    font-size: 1.25rem;
    color: #666;
    font-style: italic;
    margin-bottom: 20px;
}

.main-content .description {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    max-width: 500px;
}

/* Navigation Bar - Full Width */
.nav-bar {
    background-color: #2c2c2c;
    width: 100%;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Main navigation menu */
.nav-menu,
.nav-container > .nav-item:first-child {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Ensure nav-menu fills container */
.nav-container > .nav-menu {
    width: 100%;
}

.nav-item,
.nav-container > a.nav-item {
    flex: 1;
    position: relative;
    border-right: 1px solid #444;
}

.nav-item:last-child {
    border-right: none;
}

.nav-link,
a.nav-item {
    display: block;
    padding: 15px 20px;
    text-align: center;
    color: white;
    text-decoration: none;
    font-size: 0.938rem;
    transition: background-color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus,
a.nav-item:hover,
a.nav-item:focus {
    background-color: #444;
    outline: none;
    color: white;
}

/* Dropdown arrow */
.dropdown-arrow {
    font-size: 0.7em;
    margin-left: 5px;
    transition: transform 0.2s ease;
}

.nav-item:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown menu styles */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 200px;
    background-color: #3a3a3a;
    list-style: none;
    margin: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.nav-item:hover > .sub-menu,
.nav-item:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-nav-item {
    border-bottom: 1px solid #555;
    position: relative;
}

.sub-nav-item:last-child {
    border-bottom: none;
}

.sub-nav-link {
    display: block;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    font-size: 0.875rem;
    text-align: left;
    transition: background-color 0.2s ease;
}

.sub-nav-link:hover,
.sub-nav-link:focus {
    background-color: #555;
    padding-left: 25px;
}

/* 3rd Level Menu Styles (Sub-Sub-Menu) */
.sub-menu .sub-menu {
    position: absolute;
    top: 0;
    left: 100%;
    width: 100%;
    min-width: 280px;
    background-color: #4a4a4a;
    list-style: none;
    margin: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.sub-nav-item:hover > .sub-menu,
.sub-nav-item:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* 3rd level dropdown arrow styling - arrows are added by walker */
.sub-nav-item .dropdown-arrow {
    font-size: 0.7em;
    margin-left: 5px;
    /* Keep static - no rotation */
}

/* 3rd level navigation items */
.sub-menu .sub-nav-item {
    border-bottom: 1px solid #666;
}

.sub-menu .sub-nav-item:last-child {
    border-bottom: none;
}

.sub-menu .sub-nav-link {
    display: block;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    font-size: 0.875rem;
    text-align: left;
    transition: background-color 0.2s ease;
}

.sub-menu .sub-nav-link:hover,
.sub-menu .sub-nav-link:focus {
    background-color: #666;
    padding-left: 25px;
}

/* Color accents on hover - from painted hand */
/* Support both new structure (li.nav-item) and fallback (a.nav-item) */
.nav-item:nth-child(1) > .nav-link:hover,
.nav-item:nth-child(1):hover > .nav-link,
a.nav-item:nth-child(1):hover { background-color: #e74c3c; }

.nav-item:nth-child(2) > .nav-link:hover,
.nav-item:nth-child(2):hover > .nav-link,
a.nav-item:nth-child(2):hover { background-color: #3498db; }

.nav-item:nth-child(3) > .nav-link:hover,
.nav-item:nth-child(3):hover > .nav-link,
a.nav-item:nth-child(3):hover { background-color: #f39c12; }

.nav-item:nth-child(4) > .nav-link:hover,
.nav-item:nth-child(4):hover > .nav-link,
a.nav-item:nth-child(4):hover { background-color: #27ae60; }

.nav-item:nth-child(5) > .nav-link:hover,
.nav-item:nth-child(5):hover > .nav-link,
a.nav-item:nth-child(5):hover { background-color: #9b59b6; }

.nav-item:nth-child(6) > .nav-link:hover,
.nav-item:nth-child(6):hover > .nav-link,
a.nav-item:nth-child(6):hover { background-color: #e67e22; }

/* Maintain hover color when hovering dropdown */
.nav-item:nth-child(1):hover > .nav-link,
a.nav-item:nth-child(1):hover { background-color: #e74c3c; }
.nav-item:nth-child(2):hover > .nav-link,
a.nav-item:nth-child(2):hover { background-color: #3498db; }
.nav-item:nth-child(3):hover > .nav-link,
a.nav-item:nth-child(3):hover { background-color: #f39c12; }
.nav-item:nth-child(4):hover > .nav-link,
a.nav-item:nth-child(4):hover { background-color: #27ae60; }
.nav-item:nth-child(5):hover > .nav-link,
a.nav-item:nth-child(5):hover { background-color: #9b59b6; }
.nav-item:nth-child(6):hover > .nav-link,
a.nav-item:nth-child(6):hover { background-color: #e67e22; }

/* Desktop styles - ensure menus are properly hidden */
@media (min-width: 769px) {
    .sub-menu {
        opacity: 0 !important;
        visibility: hidden !important;
        display: block !important;
    }
    
    .nav-item:hover > .sub-menu,
    .nav-item:focus-within > .sub-menu {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .sub-menu .sub-menu {
        opacity: 0 !important;
        visibility: hidden !important;
        display: block !important;
    }
    
    .sub-nav-item:hover > .sub-menu,
    .sub-nav-item:focus-within > .sub-menu {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-wrapper {
        flex-direction: column;
    }

    .image-section,
    .content-section {
        width: 100%;
    }

    .image-section {
        border-right: none;
        border-bottom: 1px solid #ddd;
        padding: 30px 20px;
    }

    .top-area-inner {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .utility-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        width: 100%;
    }

    .top-bar-right {
        width: 100%;
        justify-content: center;
    }

    .main-content {
        padding: 30px 20px;
        text-align: center;
    }

    .main-content .logo {
        font-size: 2.5rem;
    }

    .nav-menu {
        flex-direction: column;
    }

    .nav-item {
        flex: none;
        width: 100%;
        border-bottom: 1px solid #444;
        border-right: none;
    }

    .nav-link {
        font-size: 0.875rem;
        padding: 12px 15px;
        text-align: left;
    }

    /* Mobile dropdown adjustments */
    .sub-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none;
        width: 100%;
        box-shadow: none;
        background-color: #2a2a2a;
    }

    .nav-item.menu-open .sub-menu {
        display: block;
    }

    .sub-nav-link {
        padding-left: 30px;
    }

    /* Mobile 3rd level menu adjustments */
    .sub-menu .sub-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none;
        width: 100%;
        box-shadow: none;
        background-color: #1a1a1a;
        left: 0;
    }

    .sub-nav-item.menu-open .sub-menu {
        display: block;
    }

    .sub-menu .sub-nav-link {
        padding-left: 50px;
        font-size: 0.8rem;
    }

    /* Ensure 3rd level menus are properly visible on mobile */
    .sub-nav-item.menu-open > .sub-menu {
        display: block !important;
    }

    /* Add visual hierarchy with different background colors */
    .sub-menu .sub-menu {
        background-color: #0a0a0a !important;
    }

    .sub-menu .sub-menu .sub-nav-link {
        padding-left: 60px;
        font-size: 0.75rem;
        border-left: 3px solid #444;
    }

    /* Reset hover colors on mobile */
    .nav-item:hover > .nav-link {
        background-color: transparent;
    }
}

/* Accessibility */
*:focus {
    outline: 2px solid #1ABC9C;
    outline-offset: 2px;
}

/* Height Variations */
.hero-wrapper.height-200 .content-section {
    min-height: 200px;
}

.hero-wrapper.height-200 .main-content {
    padding: 20px 40px;
}

/* Override some GeneratePress defaults */
body .site-header {
    padding: 0;
}

body .inside-header {
    padding: 0;
}

/* Ensure full width for header elements */
#page {
    overflow-x: hidden;
}

/* Search Modal Styles */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.search-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.search-modal.active .search-modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background-color: #ffffff;
}

.search-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #2c2c2c;
    font-family: Georgia, serif;
}

.search-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.search-modal-close:hover {
    background-color: #eee;
    color: #2c2c2c;
}

.search-modal-body {
    padding: 30px 25px;
}

.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.search-form label {
    flex: 1;
}

.search-field {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: Georgia, serif;
    transition: border-color 0.2s ease;
}

.search-field:focus {
    outline: none;
    border-color: #1ABC9C;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.1);
}

.search-submit {
    padding: 15px 25px;
    background-color: #1ABC9C;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: Georgia, serif;
}

.search-submit:hover {
    background-color: #16a085;
}

.search-suggestions p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.9rem;
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-tag {
    padding: 8px 15px;
    background-color: #f0f0f0;
    color: #2c2c2c;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.search-tag:hover {
    background-color: #1ABC9C;
    color: white;
}

/* Mobile responsiveness for search modal */
@media (max-width: 768px) {
    .search-modal-content {
        width: 95%;
        max-width: none;
    }
    
    .search-modal-header,
    .search-modal-body {
        padding: 20px;
    }
    
    .search-form {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-submit {
        padding: 15px;
    }
    
    .search-tags {
        justify-content: center;
    }
}

/* WordPress Admin Bar Compatibility - Removed margin top */

/* Become a Member Button Styles */
.member-button {
    background-color: #D72123;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
}

.member-button:hover {
    background-color: #b01a1c;
    color: white;
    text-decoration: none;
}

@media (max-width: 768px) {
    .member-button {
        padding: 6px 16px;
        font-size: 0.85rem;
    }
}

/* Newsletter Modal Styles */
.newsletter-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.newsletter-modal.show {
    display: block;
}

.newsletter-modal-content {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.newsletter-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.newsletter-modal-close:hover,
.newsletter-modal-close:focus {
    color: #333;
}

.newsletter-modal-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.75rem;
    color: #2c2c2c;
    font-family: var(--font-serif, Georgia, "Times New Roman", serif);
}

.newsletter-modal-content > p {
    margin-bottom: 25px;
    color: #666;
    line-height: 1.6;
}

.newsletter-modal-form .form-group {
    margin-bottom: 20px;
}

.newsletter-modal-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c2c2c;
    font-size: 0.95rem;
}

.newsletter-modal-form input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.newsletter-modal-form input[type="email"]:focus {
    outline: none;
    border-color: #60a672;
    box-shadow: 0 0 0 3px rgba(96, 166, 114, 0.1);
}

.newsletter-submit-btn {
    width: 100%;
    background-color: #D72123;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.newsletter-submit-btn:hover {
    background-color: #b01a1c;
}

.newsletter-privacy {
    margin-top: 15px;
    margin-bottom: 0;
    font-size: 0.85rem;
    color: #999;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .newsletter-modal-content {
        margin: 20% auto;
        padding: 30px 25px;
        width: 95%;
    }

    .newsletter-modal-content h2 {
        font-size: 1.5rem;
    }
}