/* Color palette for brand */
:root {
    --navy: #0a2540;
    --burgundy: #8b1e3a;
    --bg-soft: #f5f5f5;
    --card-border: #e0e0e0;
}

/* Base layout */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Typography */
body {
    font-family: 'Lato', sans-serif;
    color: #333;
    overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6,
.site-title,
.main-navigation a,
.section-title,
.hero-content h1 {
    font-family: 'Playfair Display', serif;
}

/* Header Structure */
.site-header {
    background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    padding: 0;
    position: relative;
    z-index: 100;
}

.site-branding {
    text-align: left;
    margin: 0;
    padding: 1rem 0;
}

.site-title a {
    color: var(--navy);
    font-size: 1.8rem;
    font-weight: 700;
}

#page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.site-main {
    flex: 1 0 auto;
}

/* Header Container Flex */
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* Navigation Desktop */
.main-navigation {
    border: none;
    padding: 0;
    width: auto;
}
.menu-toggle {
    display: none; /* Hide toggle on desktop by default in this design */
}
.main-navigation ul {
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.main-navigation li {
    position: relative;
}
.main-navigation a {
    color: #444;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1.5rem 0.5rem;
    display: block;
}
.main-navigation a:hover {
    color: var(--burgundy);
}
.main-navigation a::after {
    bottom: 15px; /* Adjust line position */
}

/* Mobile Menu overrides */
@media screen and (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
    }
    .site-branding {
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
    }
    .menu-toggle {
        display: block;
        width: 100%;
        text-align: center;
        background: var(--navy);
        color: #fff;
        padding: 10px;
        margin-top: 10px;
    }
    .main-navigation ul {
        display: none; /* JS will toggle this */
        flex-direction: column;
        gap: 0;
        background: #f9f9f9;
    }
    .main-navigation.toggled ul {
        display: flex;
    }
    .main-navigation a {
        padding: 1rem;
        border-bottom: 1px solid #eee;
        text-align: center;
    }
    .main-navigation a::after {
        display: none;
    }
}

/* Sections */
.container-section {
    padding: 5rem 0;
    border-bottom: 1px solid #eee;
}
.container-section:nth-child(even) {
    background-color: #fbfbfb;
}

/* Footer Dark */
.site-footer {
    background-color: var(--navy);
    color: #fff;
    padding: 4rem 0;
    border-top: none;
    text-align: left;
}
.site-footer a {
    color: #ccc;
    text-decoration: none;
}
.site-footer a:hover {
    color: #fff;
    text-decoration: underline;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}
.site-info {
    width: 100%;
    text-align: center;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

/* Hero Cleanup */
.hero-content h1 {
    display: none; /* Hide duplicate title if already in header */
}
.hero-section {
    position: relative;
    min-height: 500px;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}


/* Grids - Cards */
.collection-card, .news-card {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.collection-card:hover, .news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.collection-title, .news-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.3rem;
    margin: 1.2rem 1rem 0.5rem;
}
.collection-title a, .news-title a {
    color: var(--navy);
}
.collection-title a:hover, .news-title a:hover {
    color: var(--burgundy);
}
.news-excerpt {
    font-family: 'Lato', sans-serif;
    color: #666;
    margin: 0 1rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}
.news-date {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: #999;
    margin: 1.2rem 1rem 0;
    display: block;
}

/* Single Page / Post Styling */
.entry-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}
.entry-title {
    font-size: 3rem;
    color: var(--navy);
    margin-bottom: 1rem;
}
.entry-meta {
    font-family: 'Lato', sans-serif;
    color: #777;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.entry-content {
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
}
.entry-content p {
    margin-bottom: 1.5rem;
}
.entry-content h2, .entry-content h3 {
    font-family: 'Playfair Display', serif;
    color: var(--navy);
    margin-top: 3rem;
    margin-bottom: 1rem;
}
.entry-content blockquote {
    border-left: 4px solid var(--burgundy);
    margin: 2rem 0;
    padding: 1rem 2rem;
    font-style: italic;
    color: #555;
    background: #f9f9f9;
}

/* Button override for search */
.hero-search .search-submit {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Hero */
.hero-section {
    background: var(--bg-soft);
}
.hero-content h1,
.hero-content p {
    color: var(--navy);
}
.hero-content {
    position: relative;
    z-index: 2;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
    pointer-events: none;
}
.hero-content .container {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.82);
    padding: 2.5rem 2.5rem;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(10, 37, 64, 0.08);
}
#hero-3d-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}
#hero-3d-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}
.hero-3d-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.75);
    z-index: 3;
    opacity: 1;
    transition: opacity 0.35s ease;
}
.hero-3d-loader.is-hidden {
    opacity: 0;
    pointer-events: none;
}
.hero-3d-loader-text {
    font-size: 0.9rem;
    color: var(--navy);
    letter-spacing: 0.4px;
}
.hero-3d-loader-bar {
    width: 220px;
    height: 4px;
    background: rgba(10, 37, 64, 0.2);
    border-radius: 999px;
    overflow: hidden;
}
.hero-3d-loader-fill {
    width: 0;
    height: 100%;
    background: var(--burgundy);
    transition: width 0.2s ease;
}
.hero-3d-controls {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    z-index: 3;
}
.hero-3d-btn {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    background: rgba(10, 37, 64, 0.92);
    color: #fff;
    cursor: pointer;
}
.hero-3d-btn-secondary {
    background: rgba(139, 30, 58, 0.92);
}
.hero-3d-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
.hero-3d-btn:hover {
    filter: brightness(1.05);
}
@media screen and (max-width: 640px) {
    .hero-3d-controls {
        right: 12px;
        left: 12px;
        bottom: 12px;
        justify-content: center;
    }
    .hero-3d-btn {
        width: 100%;
        max-width: 220px;
        text-align: center;
    }
}

/* Hero search (stay accessible) */
.hero-search .search-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}
.hero-search .search-field {
    width: 100%;
    max-width: 420px;
    padding: 12px 16px;
    border: 2px solid var(--navy);
    border-radius: 999px 0 0 999px;
}
.hero-search .search-submit {
    padding: 12px 20px;
    background-color: var(--navy);
    color: #fff;
    border: none;
    border-radius: 0 999px 999px 0;
    cursor: pointer;
}
.hero-search .search-submit:hover {
    background-color: var(--burgundy);
}

/* Collections & News grids */
.collections-grid,
.news-grid {
    display: grid;
    gap: 2.5rem;
}
.collections-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.news-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.collection-card,
.news-card {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    overflow: hidden;
}
.collection-card:hover,
.news-card:hover { transform: translateY(-5px); }
.collection-thumbnail,
.news-thumbnail { overflow: hidden; aspect-ratio: 16/9; }
.collection-thumbnail img,
.news-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.collection-card:hover img,
.news-card:hover img { transform: scale(1.05); }
.collection-title,
.news-title { margin: 1rem; font-size: 1.05rem; font-weight: 400; }
.collection-title a,
.news-title a { text-decoration: none; color: var(--navy); }
.news-date { font-size: 0.85rem; color: #555; margin: 0 1rem 0.5rem; }
.news-excerpt { font-size: 0.95rem; color: #333; margin: 0 1rem 1rem; }



@media screen and (max-width: 1024px) {
    .collections-grid,
    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media screen and (max-width: 640px) {
    .collections-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
}
.section-cta {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}
.section-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.section-button:hover {
    background: var(--burgundy);
    color: #fff;
}
.section-button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Tainacan overrides */
body[class*="tainacan"] {
    --tainacan-primary: var(--navy);
    --tainacan-secondary: var(--burgundy);
    --tainacan-accent-color: var(--burgundy);
    --tainacan-text-color: var(--navy);
    --tainacan-background-color: #fff;
    --tainacan-border-color: rgba(10, 37, 64, 0.15);
}
body[class*="tainacan"] a {
    color: var(--navy);
}
body[class*="tainacan"] a:hover {
    color: var(--burgundy);
}
body[class*="tainacan"] .button,
body[class*="tainacan"] .tainacan-btn,
body[class*="tainacan"] button {
    background-color: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
body[class*="tainacan"] .button.is-light,
body[class*="tainacan"] .button.is-white {
    background-color: #fff;
    border-color: var(--navy);
    color: var(--navy);
}
body[class*="tainacan"] .button.is-secondary,
body[class*="tainacan"] .button.is-danger {
    background-color: var(--burgundy);
    border-color: var(--burgundy);
    color: #fff;
}
body[class*="tainacan"] .input,
body[class*="tainacan"] .select select,
body[class*="tainacan"] input[type="text"],
body[class*="tainacan"] input[type="search"] {
    border-color: rgba(10, 37, 64, 0.25);
}
body[class*="tainacan"] .input:focus,
body[class*="tainacan"] .select select:focus,
body[class*="tainacan"] input[type="text"]:focus,
body[class*="tainacan"] input[type="search"]:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 2px rgba(10, 37, 64, 0.15);
}

/* Utility tweaks */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}
