/* ==========================================================================
   1. RESET, CUSTOM PROPERTIES, & THEME VARIABLES
   ========================================================================== */
:root {
    /* Top-Level Brand Colors (Controlling Theme) */
    --denim-blue: #1D2A3A;         /* Classic, muted denim blue */
    --stone-gray: #e5e5e5;         /* Balanced stone gray with warm undertones */
    --bg-dark: #1e1e24;            /* Deep charcoal background */
    --banner-dark: #121214;        /* Near-black contrast banner */
    --text-light: #e2e8f0;         /* Soft white for dark-bg body text */

    /* Mapped Layout Variables (Resolves lower conflicts) */
    --brand-navy: var(--denim-blue);
    --brand-navy-light: #2c3e55;    /* Slightly lighter navy for hover/active states */
    --brand-gray: #4a5568;          /* Slate gray for secondary body text */
    --text-dark: #1a202c;           /* Near-black for highly readable body text */
    --slate-muted: #64748b;         /* Muted gray for subtitles */
    --bg-light: #f8fafc;            /* Clean off-white background for grid sections */
    --bg-alt: var(--stone-gray);    /* Lightweight divider and border fill */
    --border-color: #cbd5e1;        /* Clean card border line */
    --white: #ffffff;
}

/* ==========================================================================
   2. BASE & LAYOUT ELEMENTS
   ========================================================================== */
body {
    margin: 0;
    padding-top: 70px; /* Offset to prevent fixed top banner overlap */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--stone-gray);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* Common Section Typography */
.section-title {
    font-size: 2.25rem;
    color: var(--brand-navy);
    text-align: center;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--slate-muted);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px auto;
}

/* ==========================================================================
   3. NAVIGATION (TOP BANNER)
   ========================================================================== */
.top-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: var(--brand-navy);
    border-bottom: 3px solid var(--brand-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    box-sizing: border-box;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.logo {
    color: var(--stone-gray);
    font-weight: bold;
    font-size: 1.25rem;
    text-decoration: none;
    letter-spacing: -0.01em;
    margin-right: 1.5rem;
}

.top-banner nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

.top-banner nav a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.top-banner nav a:hover,
.top-banner nav a.active {
    color: var(--white);
}

/* ==========================================================================
   4. BUTTONS
   ========================================================================== */
button, 
.btn-primary {
    display: inline-block;
    background-color: var(--brand-navy);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

button:hover, 
.btn-primary:hover {
    background-color: var(--brand-navy-light);
}

/* ==========================================================================
   5. HERO & HEADER BANNER
   ========================================================================== */

.hero-content h1 {
    font-size: 3rem;
    margin: 0 0 16px 0;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-content .subtitle {
    font-size: 1.35rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.95;
    font-weight: 300;
}

/* Basic page-level legacy hero style fallback */
.hero {
    text-align: center;
    margin-bottom: 50px;
    background-color: var(--stone-gray);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--brand-navy);
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--brand-gray);
}

/* ==========================================================================
   6. CARDS & GRID LAYOUT SECTIONS
   ========================================================================== */
.markets-container {
    padding: 0;
}

.grid-layout {
    display: grid;
    gap: 32px;
}

.sectors-grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

/* Vertical Core Cards */
.card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(29, 42, 58, 0.04);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 20px rgba(29, 42, 58, 0.08);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: var(--bg-alt);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-img {
    transform: scale(1.03);
}

.badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--brand-navy-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.05em;
}

.card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.4rem;
    color: var(--brand-navy);
    margin: 0 0 12px 0;
    font-weight: 600;
}

.card-content p {
    font-size: 0.95rem;
    color: var(--brand-gray);
    margin: 0;
}

/* Specialty Block (Horizontal Layout) */
.specialty-section-block {
    background-color: var(--bg-light);
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
}

.components-grid {
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
}

.component-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 2px 6px rgba(29, 42, 58, 0.02);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.component-card:hover {
    border-color: var(--brand-navy-light);
    box-shadow: 0 4px 12px rgba(29, 42, 58, 0.05);
}

.comp-img-wrapper {
    width: 160px;
    min-width: 160px;
    background-color: var(--bg-alt);
    overflow: hidden;
}

.comp-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comp-text {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.comp-text h4 {
    font-size: 1.15rem;
    color: var(--brand-navy);
    margin: 0 0 8px 0;
    font-weight: 600;
}

.comp-text p {
    font-size: 0.9rem;
    color: var(--brand-gray);
    margin: 0;
}

/* ==========================================================================
   7. UTILITY & LEGACY BLOCKS (e.g., Status Card)
   ========================================================================== */
.status-card {
    background: var(--white);
    border-left: 4px solid var(--brand-navy);
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.status-card h2 {
    margin-top: 0;
    color: var(--brand-navy);
}

.status-card p {
    line-height: 1.6;
    color: var(--brand-gray);
}

.cta-box {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.cta-box h3 {
    margin-bottom: 8px;
    color: var(--brand-navy);
}

/* ==========================================================================
   8. MEDIA QUERIES (RESPONSIVENESS)
   ========================================================================== */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.25rem;
    }
    .hero-content .subtitle {
        font-size: 1.1rem;
    }
    .components-grid {
        grid-template-columns: 1fr;
    }
    .component-card {
        flex-direction: column;
    }
    .comp-img-wrapper {
        width: 100%;
        height: 140px;
    }
}
