/* ============================================
   RIVER CITY FLOORING - Modern Design System
   ============================================ */

/* --- CSS Reset & Custom Properties --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Color Palette - Clean & Modern */
    --color-primary: #4A7C94;
    --color-primary-light: #5E91A8;
    --color-primary-dark: #3A6275;
    --color-black: #0A0A0A;
    --color-charcoal: #0A0A0A;
    --color-slate: #1A1A1A;
    --color-smoke: #4A4A4A;
    --color-gray: #A8A8A8;
    --color-ash: #F0F0F0;
    --color-cream: #FAFAFA;
    --color-white: #FFFFFF;
    --color-success: #3D8B5A;
    --color-error: #C44545;
    
    /* Legacy mappings for compatibility */
    --color-oak: var(--color-primary);
    --color-oak-light: var(--color-primary-light);
    --color-oak-dark: var(--color-primary-dark);
    --color-walnut: var(--color-smoke);
    
    /* Typography */
    --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 40px rgba(74, 124, 148, 0.15);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Layout */
    --container-max: 1400px;
    --header-height: 90px;
}

/* --- Base Styles --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-charcoal);
    background: var(--color-cream);
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-charcoal);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    margin-bottom: var(--space-md);
    color: var(--color-smoke);
}

a {
    color: var(--color-oak-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-oak);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Container & Layout --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-5xl) 0;
}

.section--dark {
    background: var(--color-charcoal);
    color: var(--color-ash);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
    color: var(--color-white);
}

.section--dark p {
    color: var(--color-cream);
    opacity: 0.85;
}

/* --- Grid System --- */
.grid {
    display: grid;
    gap: var(--space-xl);
}

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

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 968px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

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

/* --- Header & Navigation --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) var(--space-lg);
    pointer-events: none;
    transition: all var(--transition-base);
}

.site-header .container {
    max-width: none;
    padding: 0;
    display: flex;
    justify-content: center;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    height: 80px;
    padding: 0 var(--space-2xl);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-full);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    pointer-events: auto;
    transition: all var(--transition-base);
    min-width: 700px;
}

.site-header.scrolled .header-inner {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-charcoal);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-img {
    width: 60px;
    height: 60px;
    max-width: 60px;
    max-height: 60px;
    border-radius: var(--radius-md);
    object-fit: contain;
    display: block;
}

.logo-fallback {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 1.125rem;
}

.nav-main {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-main a {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-smoke);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    position: relative;
    transition: all var(--transition-fast);
}

.nav-main a::after {
    display: none;
}

.nav-main a:hover {
    color: var(--color-charcoal);
    background: rgba(74, 124, 148, 0.08);
}

.nav-main a.active {
    color: var(--color-charcoal);
    background: rgba(74, 124, 148, 0.1);
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
}

.nav-dropdown-trigger .dropdown-arrow {
    transition: transform var(--transition-fast);
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

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

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 180px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
    padding: var(--space-sm);
    z-index: 1000;
    margin-top: 0;
}

/* Invisible bridge to maintain hover when moving to dropdown */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 16px;
    background: transparent;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(4px);
}

.nav-dropdown-menu a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--color-smoke);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.nav-dropdown-menu a:hover {
    background: rgba(74, 124, 148, 0.1);
    color: var(--color-charcoal);
}

.nav-dropdown-menu a.active {
    background: rgba(74, 124, 148, 0.12);
    color: var(--color-charcoal);
    font-weight: 500;
}

.nav-cta {
    background: var(--color-primary) !important;
    color: var(--color-white) !important;
    padding: var(--space-sm) var(--space-lg) !important;
    border-radius: var(--radius-full);
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    transition: all var(--transition-base);
    margin-left: var(--space-sm);
}

.nav-cta:hover {
    background: var(--color-primary-dark) !important;
    color: var(--color-white) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 124, 148, 0.3);
}

/* Mobile Menu */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    z-index: 1001;
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-charcoal);
    transition: all var(--transition-base);
    transform-origin: center;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 900px) {
    .site-header {
        padding: var(--space-sm) var(--space-md);
    }
    
    .mobile-toggle {
        display: flex;
        position: absolute;
        right: var(--space-md);
    }
    
    .header-inner {
        position: relative;
        width: calc(100% - var(--space-lg));
        max-width: 500px;
        min-width: auto;
        padding: 0 var(--space-xl);
        height: 70px;
        gap: var(--space-md);
        justify-content: center;
    }
    
    .logo-img {
        width: 50px;
        height: 50px;
        max-width: 50px;
        max-height: 50px;
    }
    
    .logo-icon {
        width: 38px;
        height: 38px;
    }
    
    .nav-main {
        position: fixed;
        top: 80px;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        right: auto;
        bottom: auto;
        width: calc(100% - var(--space-xl));
        max-width: 500px;
        background: var(--color-white);
        flex-direction: column;
        padding: var(--space-md);
        gap: var(--space-xs);
        border-radius: var(--radius-lg);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all var(--transition-base);
        z-index: 999;
    }
    
    .nav-main.open {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    .nav-main a {
        font-size: 1rem;
        padding: var(--space-md) var(--space-lg);
        width: 100%;
        text-align: left;
        border-radius: var(--radius-md);
        color: var(--color-charcoal);
    }
    
    .nav-main a:hover,
    .nav-main a.active {
        background: rgba(74, 124, 148, 0.08);
    }
    
    .nav-main .nav-cta {
        margin: var(--space-sm) 0 0 0;
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: var(--space-md) var(--space-lg) !important;
        white-space: nowrap;
    }
    
    /* Mobile dropdown styles */
    .nav-dropdown {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-dropdown::after {
        display: none;
    }
    
    .nav-dropdown-trigger {
        width: 100%;
        justify-content: space-between;
        display: flex;
    }
    
    .nav-dropdown-menu {
        position: static !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: none !important;
        max-height: 0 !important;
        overflow: hidden;
        box-shadow: none !important;
        background: rgba(74, 124, 148, 0.08);
        border-radius: var(--radius-md);
        margin: 0;
        padding: 0;
        transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.2s ease, margin 0.2s ease, visibility 0s;
        left: 0;
        min-width: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .nav-dropdown.open .nav-dropdown-menu {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        max-height: 500px !important;
        margin: var(--space-xs) 0;
        padding: var(--space-xs);
    }
    
    .nav-dropdown.open .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    .nav-dropdown-menu a {
        padding-left: var(--space-xl);
        display: block;
        color: var(--color-smoke);
    }
    
    /* Ensure hover states don't interfere */
    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown:focus-within .nav-dropdown-menu {
        opacity: 0 !important;
        visibility: hidden !important;
        max-height: 0 !important;
    }
    
    .nav-dropdown.open:hover .nav-dropdown-menu,
    .nav-dropdown.open:focus-within .nav-dropdown-menu,
    .nav-dropdown.open .nav-dropdown-menu {
        opacity: 1 !important;
        visibility: visible !important;
        max-height: 500px !important;
    }
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--header-height);
    background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-ash) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -25%;
    width: 80%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(74, 124, 148, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding-right: var(--space-xl);
}

@media (min-width: 969px) {
    .hero-content {
        max-width: min(720px, calc(55% - var(--space-xl)));
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(74, 124, 148, 0.12);
    color: var(--color-primary-dark);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.6s ease;
}

.hero h1 {
    font-size: clamp(2.75rem, 5.5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.6s ease 0.1s backwards;
}

.hero h1 span {
    color: var(--color-primary);
}

/* Hero Rotating Words Animation */
.hero-rotating-word {
    display: inline-block;
    color: var(--color-primary);
    white-space: nowrap;
    position: relative;
}

.hero-rotating-word.animating-out {
    animation: heroWordOut 0.4s ease forwards;
}

.hero-rotating-word.animating-in {
    animation: heroWordIn 0.4s ease forwards;
}

@keyframes heroWordOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50%);
    }
}

@keyframes heroWordIn {
    0% {
        opacity: 0;
        transform: translateY(50%);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-smoke);
    margin-bottom: var(--space-2xl);
    animation: fadeInUp 0.6s ease 0.2s backwards;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.3s backwards;
}

.hero-image {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 45%;
    height: 80%;
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

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

.hero-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-smoke) 0%, var(--color-primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-light);
    font-family: var(--font-display);
    font-size: 1.5rem;
}

.hero-image-actual {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hero Slideshow */
.hero-slideshow {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slideshow-nav {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    z-index: 10;
}

.hero-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.8);
    color: #fff;
}

.hero-slideshow-dots {
    display: flex;
    gap: var(--space-sm);
    z-index: 10;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

.hero-dot.active {
    background: var(--color-white);
    border-color: var(--color-white);
}

@media (max-width: 968px) {
    .hero {
        flex-direction: column;
        min-height: auto;
        padding-top: calc(var(--header-height) + var(--space-xl));
        padding-bottom: 0;
    }
    
    .hero .container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
        padding-right: 0;
        padding-bottom: var(--space-xl);
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        position: relative;
        top: auto;
        transform: none;
        width: 100%;
        height: 300px;
        border-radius: 0;
        margin-top: var(--space-lg);
    }
    
    .hero-slideshow-nav {
        bottom: var(--space-md);
    }
}

@media (max-width: 600px) {
    .hero-image {
        height: 250px;
    }
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-primary {
    background: var(--color-charcoal);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-oak-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--color-charcoal);
    border: 2px solid var(--color-charcoal);
}

.btn-secondary:hover {
    background: var(--color-charcoal);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--color-primary-dark);
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--color-primary);
}

.btn-ghost:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: 1rem;
}

.btn-sm {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
}

/* --- Cards --- */
.card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(168, 168, 168, 0.15);
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(74, 124, 148, 0.3);
}

.card-image {
    margin: calc(var(--space-xl) * -1);
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.card-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-ash) 0%, rgba(74, 124, 148, 0.15) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 2rem;
}

.card h3 {
    margin-bottom: var(--space-sm);
}

.card h3 a {
    color: var(--color-charcoal);
}

.card h3 a:hover {
    color: var(--color-oak-dark);
}

.card p {
    color: var(--color-smoke);
    font-size: 0.9375rem;
}

.card-meta {
    font-size: 0.8125rem;
    color: var(--color-primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

/* --- Service Cards --- */
.service-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(168, 168, 168, 0.15);
    transition: all var(--transition-base);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(74, 124, 148, 0.15) 0%, rgba(74, 124, 148, 0.05) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-primary-dark);
    margin-bottom: var(--space-lg);
}

.service-card h3 {
    margin-bottom: var(--space-sm);
}

/* --- Service Card Title Only (Homepage) --- */
a.service-card--title-only {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    text-decoration: none;
    cursor: pointer;
}

a.service-card--title-only h3 {
    margin: 0;
    color: var(--color-charcoal);
    transition: color var(--transition-base);
}

a.service-card--title-only:hover h3 {
    color: var(--color-primary);
}

/* --- Portfolio Grid --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 968px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

.portfolio-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    group: portfolio;
}

.portfolio-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.portfolio-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-smoke) 0%, var(--color-primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: var(--space-sm);
    color: var(--color-primary-light);
}

.portfolio-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 26, 26, 0.9) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-xl);
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition-base);
}

.portfolio-card:hover .portfolio-card-overlay {
    opacity: 1;
    transform: translateY(0);
}

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

.portfolio-card-overlay h3 {
    color: var(--color-white);
    margin-bottom: var(--space-xs);
}

.portfolio-card-overlay p {
    color: var(--color-primary-light);
    font-size: 0.875rem;
    margin: 0;
}

/* --- Testimonials --- */
.testimonials-section {
    background: var(--color-charcoal);
    position: relative;
    overflow: hidden;
}

.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    height: 100%;
    background: radial-gradient(ellipse at center top, rgba(74, 124, 148, 0.08) 0%, transparent 50%);
}

.testimonial-card {
    background: var(--color-slate);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: var(--space-lg);
    left: var(--space-xl);
    font-family: var(--font-display);
    font-size: 5rem;
    line-height: 1;
    color: var(--color-primary);
    opacity: 0.3;
}

.testimonial-content {
    position: relative;
    z-index: 1;
}

.testimonial-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-ash);
    margin-bottom: var(--space-lg);
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-weight: 600;
}

.testimonial-name {
    color: var(--color-white);
    font-weight: 600;
}

.testimonial-role {
    color: var(--color-primary-light);
    font-size: 0.875rem;
}

/* --- Stats Section --- */
.stats-section {
    background: var(--color-charcoal);
    padding: var(--space-3xl) 0;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xl);
    text-align: center;
}

/* Center stats when fewer than 4 */
.stats-grid.stats-count-1 .stat-item,
.stats-grid.stats-count-2 .stat-item,
.stats-grid.stats-count-3 .stat-item {
    flex: 0 1 auto;
    min-width: 200px;
}

.stats-grid.stats-count-4 .stat-item {
    flex: 1 1 200px;
    max-width: 300px;
}

.stat-item {
    padding: var(--space-lg);
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
}

.stat-label {
    font-size: 0.9375rem;
    color: var(--color-ash);
    opacity: 0.8;
}

/* --- Section Headers --- */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.section-badge {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--color-smoke);
}

.section--dark .section-header p {
    color: var(--color-cream);
}

/* --- Contact Form --- */
.contact-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-charcoal);
    margin-bottom: var(--space-sm);
}

.form-label span {
    color: var(--color-smoke);
    font-weight: 400;
}

.input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-charcoal);
    background: var(--color-white);
    border: 2px solid rgba(168, 168, 168, 0.25);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(74, 124, 148, 0.1);
}

.input::placeholder {
    color: var(--color-smoke);
    opacity: 0.6;
}

textarea.input {
    min-height: 150px;
    resize: vertical;
}

/* --- Alerts --- */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-weight: 500;
}

.alert.success {
    background: rgba(74, 124, 89, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(74, 124, 89, 0.2);
}

.alert.error {
    background: rgba(155, 59, 59, 0.1);
    color: var(--color-error);
    border: 1px solid rgba(155, 59, 59, 0.2);
}

/* --- Footer --- */
.site-footer {
    background: var(--color-charcoal);
    color: var(--color-ash);
    padding: var(--space-4xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

@media (max-width: 968px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.footer-logo-img {
    width: 64px;
    height: 64px;
    max-width: 64px;
    max-height: 64px;
    border-radius: 50%;
    object-fit: contain;
    display: block;
}

.footer-logo-fallback {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.footer-logo-fallback .logo-icon {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.footer-brand p {
    color: var(--color-ash);
    opacity: 0.7;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-column h4 {
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-lg);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--color-ash);
    opacity: 0.7;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    opacity: 1;
    color: var(--color-primary-light);
}

.footer-bottom {
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-bottom p {
    color: var(--color-ash);
    opacity: 0.6;
    font-size: 0.875rem;
    margin: 0;
}

.footer-copyright {
    flex: 1;
    text-align: left;
}

.footer-social {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex: 1;
}

.footer-credit {
    flex: 1;
    text-align: right;
}

.footer-credit a {
    color: var(--color-primary-light);
    transition: color var(--transition-fast);
}

.footer-credit a:hover {
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-copyright,
    .footer-social,
    .footer-credit {
        flex: none;
        width: 100%;
        text-align: center;
    }
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-ash);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* --- Page Headers --- */
.page-header {
    padding: calc(var(--header-height) + var(--space-4xl)) 0 var(--space-3xl);
    background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-ash) 100%);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(ellipse at right, rgba(74, 124, 148, 0.1) 0%, transparent 70%);
}

.page-header-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.page-header h1 {
    margin-bottom: var(--space-md);
}

.page-header p {
    font-size: 1.25rem;
    color: var(--color-smoke);
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .page-header p {
        white-space: normal;
    }
}

/* --- Breadcrumb --- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    margin-bottom: var(--space-lg);
}

.breadcrumb a {
    color: var(--color-primary);
}

.breadcrumb span {
    color: var(--color-smoke);
}

/* --- Blog Styles --- */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.blog-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--space-xl);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(196, 167, 125, 0.1);
    transition: all var(--transition-base);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .blog-card {
        grid-template-columns: 1fr;
    }
}

.blog-card-image {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-meta {
    font-size: 0.8125rem;
    color: var(--color-primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    border: 2px dashed rgba(74, 124, 148, 0.3);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: var(--space-sm);
    color: var(--color-smoke);
}

.empty-state p {
    color: var(--color-smoke);
    opacity: 0.7;
}

/* --- Process Steps --- */
.process-steps {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.process-step {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.process-step--last .process-arrow {
    display: none;
}

.process-step-box {
    background: var(--color-slate);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    padding-top: var(--space-2xl);
    text-align: center;
    width: 240px;
    height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: all var(--transition-base);
    cursor: pointer;
}

.process-step-box:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(74, 124, 148, 0.2);
    background: linear-gradient(135deg, var(--color-slate) 0%, rgba(74, 124, 148, 0.15) 100%);
}

.process-step-box:hover .process-step-number {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(74, 124, 148, 0.5);
}

.process-step-box:hover .process-step-icon {
    transform: scale(1.1) rotate(5deg);
}

.process-step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    transition: all var(--transition-base);
    box-shadow: 0 4px 12px rgba(74, 124, 148, 0.4);
}

.process-step-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: rgba(74, 124, 148, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-light);
    margin-bottom: var(--space-md);
    transition: all var(--transition-base);
}

.process-step-box h4 {
    color: var(--color-white);
    margin-bottom: var(--space-sm);
    font-size: 1.1rem;
}

.process-step-box p {
    color: var(--color-ash);
    opacity: 0.85;
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.6;
    flex-grow: 1;
}

.process-cta {
    margin-top: var(--space-md);
    font-size: 0.8125rem !important;
    padding: var(--space-sm) var(--space-md) !important;
}

.process-arrow {
    color: var(--color-primary);
    opacity: 0.6;
    animation: arrowPulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes arrowPulse {
    0%, 100% {
        opacity: 0.4;
        transform: translateX(0);
    }
    50% {
        opacity: 1;
        transform: translateX(5px);
    }
}

@media (max-width: 1100px) {
    .process-steps {
        gap: var(--space-xl);
    }
    
    .process-arrow {
        display: none;
    }
    
    .process-step {
        flex-direction: column;
    }
    
    .process-step-box {
        width: 240px;
        height: 320px;
    }
}

@media (max-width: 600px) {
    .process-steps {
        flex-direction: column;
        align-items: center;
    }
    
    .process-step-box {
        width: 100%;
        max-width: 300px;
        height: auto;
        min-height: 280px;
        padding: var(--space-lg);
        padding-top: var(--space-2xl);
    }
}

/* --- Portfolio Modal --- */
.portfolio-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

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

.portfolio-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.portfolio-modal-content {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-base);
}

.portfolio-modal.active .portfolio-modal-content {
    transform: scale(1) translateY(0);
}

.portfolio-modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--color-white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-charcoal);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    z-index: 10;
}

.portfolio-modal-close:hover {
    background: var(--color-charcoal);
    color: var(--color-white);
    transform: rotate(90deg);
}

.portfolio-modal-image {
    background: var(--color-ash);
    overflow: hidden;
    min-height: 100%;
}

.portfolio-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-modal-image .portfolio-card-placeholder {
    width: 100%;
    height: 100%;
    min-height: 350px;
    border-radius: 0;
}

.portfolio-modal-info {
    padding: var(--space-2xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portfolio-modal-info h2 {
    font-size: 1.75rem;
    margin-bottom: var(--space-md);
}

.portfolio-modal-info p {
    color: var(--color-smoke);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}

.portfolio-modal-info .btn {
    align-self: flex-start;
}

@media (max-width: 768px) {
    .portfolio-modal-content {
        grid-template-columns: 1fr;
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .portfolio-modal-image {
        aspect-ratio: 16/9;
    }
    
    .portfolio-modal-info {
        padding: var(--space-xl);
    }
    
    .portfolio-modal-close {
        top: var(--space-sm);
        right: var(--space-sm);
    }
}

/* --- CTA Section --- */
.cta-section {
    background: linear-gradient(135deg, #2D5A6E 0%, #1A3A4A 40%, #0D1F28 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(74, 124, 148, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(74, 124, 148, 0.15) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234A7C94' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 1;
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    color: var(--color-white);
    margin-bottom: var(--space-md);
    white-space: nowrap;
}

@media (max-width: 600px) {
    .cta-content h2 {
        white-space: normal;
    }
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

.cta-content p:last-of-type {
    margin-bottom: var(--space-xl);
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-cta:hover {
    background: var(--color-primary-light);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Staggered animations - Elements start visible, animate on scroll */
.stagger > * {
    opacity: 1;
}

/* When JS is available, hide elements initially for animation */
.js-loaded .stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-loaded .stagger > *.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.stagger > *:nth-child(1) { transition-delay: 0.05s; }
.stagger > *:nth-child(2) { transition-delay: 0.1s; }
.stagger > *:nth-child(3) { transition-delay: 0.15s; }
.stagger > *:nth-child(4) { transition-delay: 0.2s; }
.stagger > *:nth-child(5) { transition-delay: 0.25s; }
.stagger > *:nth-child(6) { transition-delay: 0.3s; }

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.muted { color: var(--color-smoke); opacity: 0.7; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-xl { margin-bottom: var(--space-xl); }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Honeypot field */
input[name="hp_field"] {
    position: absolute;
    left: -9999px;
}

/* Main content wrapper */
main {
    min-height: 100vh;
}

/* CAPTCHA widgets */
.cf-turnstile,
.g-recaptcha {
    margin-bottom: var(--space-xl);
    margin-top: var(--space-sm);
}

/* Actions row */
.actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* ============================================
   PAGE TRANSITIONS - Smooth Navigation
   ============================================ */

/* Fade in animation for page load */
@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade out animation for page exit */
@keyframes pageExit {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Apply entrance animation to main content */
main {
    animation: pageEnter 0.4s ease-out forwards;
}

/* Page transition state when navigating away */
body.page-transitioning main {
    animation: pageExit 0.2s ease-in forwards;
}

/* Staggered animation for sections */
main > section {
    animation: pageEnter 0.5s ease-out backwards;
}

main > section:nth-child(1) { animation-delay: 0s; }
main > section:nth-child(2) { animation-delay: 0.08s; }
main > section:nth-child(3) { animation-delay: 0.16s; }
main > section:nth-child(4) { animation-delay: 0.24s; }
main > section:nth-child(5) { animation-delay: 0.32s; }

/* Smooth loading indicator */
body.page-transitioning {
    cursor: progress;
}

body.page-transitioning header,
body.page-transitioning footer {
    pointer-events: none;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    main,
    main > section {
        animation: none;
    }
    body.page-transitioning main {
        animation: none;
        opacity: 0.7;
    }
}
