/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */

/* Box sizing and margin reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root variables for consistent theming */
:root {
    /* Colors */
    --color-nav-bg: #6b6b6b;
    --color-nav-text: #ffffff;
    --color-nav-highlight: #f0e130;
    --color-body-bg: #e8f4f8;
    --color-cta-bg: #ff7f5f;
    --color-cta-box-bg: #6b6b6b;
    --color-cta-text: #ffffff;
    --color-button-bg: #ffffff;
    --color-button-text: #333333;
    --color-footer-bg: #6b6b6b;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Typography */
    --font-family: 'Times New Roman', Times, serif;
    --font-size-base: 16px;
    --font-size-sm: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
}

/* HTML and Body base styles */
html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-body-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   HEADER & NAVIGATION STYLES
   ============================================ */

.header {
    background-color: var(--color-nav-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Navigation menu list */
.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    justify-content: center;
    align-items: center;
}

/* Navigation items */
.nav-item {
    display: inline-block;
}

/* Navigation links */
.nav-link {
    color: var(--color-nav-text);
    text-decoration: none;
    font-size: var(--font-size-md);
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    transition: color var(--transition-fast);
    white-space: nowrap;
}

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

/* Highlighted navigation links (yellow) */
.nav-link.highlight {
    color: var(--color-nav-highlight);
}

/* Hamburger menu - hidden by default */
.menu-toggle {
    display: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: var(--spacing-xs);
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: var(--color-nav-text);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

/* ============================================
   MAIN CONTENT STYLES
   ============================================ */

.main-content {
    flex: 1;
    padding: var(--spacing-lg);
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* Content grid - 25% 25% 50% layout */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: var(--spacing-sm);
    align-items: stretch;
}

/* Card base styles */
.card {
    border-radius: 0;
    overflow: hidden;
}

/* Image cards */
.image-card {
    background-color: transparent;
}

.image-container {
    width: 100%;
    height: 100%;
    min-height: 550px;
    position: relative;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 0;
}

/* CTA Card (orange section) */
.cta-card {
    background-color: var(--color-cta-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 550px;
    padding: var(--spacing-lg);
}

/* Grey box inside CTA card */
.cta-box {
    background-color: var(--color-cta-box-bg);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 0;
    max-width: 380px;
    width: 90%;
}

.cta-header {
    color: var(--color-cta-text);
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.cta-text {
    color: var(--color-cta-text);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* CTA Button */
.cta-button {
    background-color: var(--color-button-bg);
    color: var(--color-button-text);
    border: none;
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    border-radius: 0;
    transition: all var(--transition-fast);
}

.cta-button:hover {
    background-color: #f0f0f0;
    transform: translateY(-1px);
}

.cta-button:active {
    transform: translateY(0);
}

/* ============================================
   FOOTER STYLES
   ============================================ */

.footer {
    background-color: var(--color-footer-bg);
    padding: var(--spacing-sm);
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    color: var(--color-nav-text);
}

/* ============================================
   RESPONSIVE STYLES - XL (1201px+)
   Full desktop layout
   ============================================ */

@media screen and (min-width: 1201px) {
    .content-grid {
        grid-template-columns: 1fr 1fr 2fr;
        gap: var(--spacing-sm);
    }
    
    .image-container {
        min-height: 550px;
    }
    
    .cta-card {
        min-height: 550px;
    }
}

/* ============================================
   RESPONSIVE STYLES - LG (821px - 1200px)
   Desktop layout with vertical menu (like mobile)
   ============================================ */

@media screen and (max-width: 1200px) {
    /* Vertical menu always visible - same as mobile */
    .hamburger {
        display: none;
    }
    
    .navbar {
        flex-direction: column;
        padding: var(--spacing-sm);
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
        position: static;
        max-height: none;
        overflow: visible;
    }
    
    .nav-item {
        width: 100%;
        text-align: left;
    }
    
    .nav-link {
        display: block;
        padding: var(--spacing-md);
        font-size: var(--font-size-lg);
        border-bottom: none;
    }
    
    .content-grid {
        grid-template-columns: 1fr 1fr 2fr;
        gap: var(--spacing-sm);
    }
    
    .image-container {
        min-height: 450px;
    }
    
    .cta-card {
        min-height: 450px;
    }
}

/* ============================================
   RESPONSIVE STYLES - MD (541px - 820px)
   Two-column layout (Tablet)
   ============================================ */

@media screen and (max-width: 820px) {
    /* Vertical menu always visible on tablet - same as mobile */
    .hamburger {
        display: none;
    }
    
    .navbar {
        flex-direction: column;
        padding: var(--spacing-sm);
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
        position: static;
        max-height: none;
        overflow: visible;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        display: block;
        padding: var(--spacing-md);
        font-size: var(--font-size-lg);
        border-bottom: none;
    }
    
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .image-container {
        min-height: 250px;
    }
    
    /* CTA card spans full width on tablet */
    .cta-card {
        grid-column: 1 / -1;
        min-height: 300px;
    }
    
    .cta-box {
        max-width: 320px;
    }
    
    .main-content {
        padding: var(--spacing-md);
    }
}

/* ============================================
   RESPONSIVE STYLES - SM (361px - 540px)
   Single column, larger touch targets
   ============================================ */

@media screen and (max-width: 540px) {
    :root {
        --font-size-base: 15px;
    }
    
    /* Vertical menu always visible on mobile */
    .hamburger {
        display: none;
    }
    
    .navbar {
        flex-direction: column;
        padding: var(--spacing-sm);
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
        position: static;
        max-height: none;
        overflow: visible;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        display: block;
        padding: var(--spacing-md);
        font-size: var(--font-size-lg);
        border-bottom: none;
    }
    
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    .image-container {
        min-height: 180px;
    }
    
    .cta-card {
        grid-column: 1 / -1;
        min-height: 280px;
        padding: 5%;
        border: none;
    }
    
    .cta-box {
        max-width: 100%;
        width: 100%;
        min-height: 90%;
        height: 90%;
        padding: var(--spacing-lg);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }
    
    .cta-button {
        width: auto;
        padding: var(--spacing-xs) var(--spacing-md);
        margin-top: auto;
        align-self: flex-start;
    }
    
    .cta-header {
        font-size: 1.6rem;
        font-weight: 700;
        margin-bottom: var(--spacing-sm);
    }
    
    .cta-text {
        font-size: 1.2rem;
        line-height: 1.6;
        margin-bottom: var(--spacing-md);
        max-width: 90%;
        word-wrap: break-word;
    }
    
    .main-content {
        padding: var(--spacing-sm);
    }
}

/* ============================================
   RESPONSIVE STYLES - XS (240px - 360px)
   Compact layout, minimal spacing
   ============================================ */

@media screen and (max-width: 360px) {
    :root {
        --font-size-base: 14px;
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.25rem;
    }
    
    .navbar {
        padding: var(--spacing-xs);
    }
    
    .nav-link {
        padding: var(--spacing-sm);
        font-size: var(--font-size-md);
    }
    
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xs);
    }
    
    .image-container {
        min-height: 120px;
    }
    
    .cta-card {
        min-height: 220px;
        padding: 5%;
        border: none;
    }
    
    .cta-box {
        padding: var(--spacing-md);
        width: 100%;
        max-width: 100%;
        min-height: 90%;
        height: 90%;
    }
    
    .cta-header {
        font-size: var(--font-size-md);
    }
    
    .cta-text {
        font-size: 0.8rem;
    }
    
    .cta-button {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.8rem;
    }
    
    .main-content {
        padding: var(--spacing-xs);
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Visually hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .header {
        position: static;
    }
    
    .hamburger {
        display: none;
    }
    
    .nav-menu {
        flex-direction: row;
        position: static;
        max-height: none;
    }
    
    .cta-button {
        border: 1px solid #333;
    }
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

/* Focus styles for keyboard navigation */
.nav-link:focus,
.cta-button:focus {
    outline: 2px solid var(--color-nav-highlight);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-nav-bg: #000000;
        --color-cta-box-bg: #000000;
    }
    
    .nav-link {
        text-decoration: underline;
    }
}
