* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #d4a574;
    --secondary-color: #8b4513;
    --dark-bg: #1a1410;
    --light-text: #f5f5f5;
    --accent-color: #c9a961;
    --border-color: #4a3f38;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #2a1f18 100%);
    color: var(--light-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar Styles */
.navbar {
    background: linear-gradient(90deg, var(--secondary-color) 0%, #6d3410 100%);
    padding: 1rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.logo img { display: block; height: 36px; width: auto; }

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

/* Fallback for browsers that don't support `gap` on flex containers (older Firefox):
   add left margin to list items and reset the first item. */
.nav-links > li { margin-left: 2rem; }
.nav-links > li:first-child { margin-left: 0; }

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--light-text);
    font-size: 1.6rem;
    cursor: pointer;
}

.nav-link {
    color: var(--light-text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

/* App Container */
.app-container {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Page Styles */
.page {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.1) 0%, rgba(139, 69, 19, 0.1) 100%);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    color: #c9c9c9;
    max-width: 600px;
    margin: 0 auto;
}

.hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-copy {
    flex: 1 1 420px;
    text-align: left;
}

.hero-media {
    flex: 1 1 360px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}

/* Allow flex children to shrink correctly in Firefox (prevents unexpected wrapping).
   Firefox applies a default min-width:auto which can force wrapping; setting
   min-width:0 allows the flex item to shrink below its content size. */
.hero-copy, .hero-media { min-width: 0; }

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    display: block;
}

.tagline {
    color: #e9d9c6;
    margin-bottom: 1rem;
    font-size: 1.15rem;
}

.cta {
    display: inline-block;
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-right: 0.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Ensure CTA buttons sit a bit below the tagline without affecting other pages */
.hero-copy p:last-child { margin-top: 1.6rem; }

.cta:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.cta.secondary { background: transparent; border: 1px solid rgba(201,169,97,0.18); color: #f1e8dc; }

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: linear-gradient(135deg, #2a1f18 0%, #3a2a22 100%);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 165, 116, 0.2);
    border-color: var(--primary-color);
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card p {
    color: #b0b0b0;
    line-height: 1.8;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Sections */
.section {
    margin-bottom: 3rem;
}

.section h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.content-box {
    background: rgba(212, 165, 116, 0.05);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.content-box h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    text-align: center;
    padding: 2rem;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--light-text);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .app-container {
        padding: 2rem 1rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .nav-toggle { display: block; }
    .nav-container { position: relative; }
    .nav-links {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: linear-gradient(180deg, rgba(43,31,24,0.98), rgba(38,28,22,0.98));
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 0.5rem;
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    }

    .nav-links.open { display: flex; }

    .nav-link { padding: 0.6rem 0.4rem; width: 100%; display: block; }

    .hero-inner { flex-direction: column-reverse; align-items: stretch; }
    .hero-copy { text-align: center; }
    .hero-media { justify-content: center; }
}
