/* ==========================================
   CSS VARIABLES (DRY Principle & Theming)
   ========================================== */
:root {
    --color-bg-primary: #f8f9fa;
    --color-text-main: #333333;
    --color-text-muted: #6c757d;
    --color-brand-primary: #0056b3;
    --color-brand-secondary: #28a745;
    
    --radius-md: 8px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    
    --transition-fast: 0.2s ease-in-out;
    --header-height: 80px;
}

/* ==========================================
   ACCESSIBILITY, BASE RESETS & SCROLL FIX
   ========================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    /* Prevents horizontal scrolling issues */
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--color-text-main);
    background-color: var(--color-bg-primary);
    line-height: 1.6;
    /* Layout Fix: Offset for the fixed header to prevent overlap */
    padding-top: var(--header-height);
}

/* Accessible focus states for keyboard navigation */
:focus-visible {
    outline: 3px solid var(--color-brand-primary);
    outline-offset: 2px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ==========================================
   HEADER & NAVIGATION MODULE
   ========================================== */
.global-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px); /* Hardware accelerated blur */
    -webkit-backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-brand-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-item {
    text-decoration: none;
    color: var(--color-text-main);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-item:hover, .nav-item[aria-current="page"] {
    color: var(--color-brand-primary);
}

.nav-controls button {
    background: transparent;
    border: 1px solid var(--color-text-muted);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background var(--transition-fast);
}

.nav-controls button:hover {
    background: #f0f0f0;
}

/* ==========================================
   DYNAMIC IMAGE SLIDER
   ========================================== */
.dynamic-slider-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 3s linear;
    transform: scale(1.05);
    will-change: opacity, transform;
}

.slide-item.active-slide {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================
   HERO SECTION MODIFICATIONS (Layered Architecture)
   ========================================== */
.hero-section {
    position: relative;
    min-height: calc(100vh - var(--header-height)); 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem;
    overflow: hidden;
    background-color: #050505;
}

.hero-media-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Layer Management */
.hero-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-layer.active-layer {
    opacity: 1;
    visibility: visible;
}

/* Media Elements Styling */
.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.hero-content-container {
    position: relative;
    z-index: 3;
    max-width: 800px;
    color: #ffffff;
}

.hero-subtitle {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--color-brand-secondary);
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ==========================================
   CSS ANIMATION (2x Scaled CCW Geometric Loader)
   ========================================== */
.fourt-brand-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.fourt-logo-grid {
    display: grid;
    grid-template-columns: repeat(4, 48px);
    grid-template-rows: repeat(4, 48px);
    gap: 12px;
    animation: floatLogo 3s ease-in-out infinite alternate;
}

.f-block {
    background-color: #33b5ff;
    border-radius: 4px;
}

.edge-block {
    opacity: 0.15;
    animation: counterClockwiseLoad 1.5s infinite linear;
}

.b-r1-c1 { grid-area: 1 / 1 / 2 / 2; animation-delay: 0s; }
.b-r2-c1 { grid-area: 2 / 1 / 3 / 2; animation-delay: 0.15s; }
.b-r3-c1 { grid-area: 3 / 1 / 4 / 2; animation-delay: 0.3s; }
.b-r4-c1 { grid-area: 4 / 1 / 5 / 2; animation-delay: 0.45s; }

.b-r4-c3 { grid-area: 4 / 3 / 5 / 4; animation-delay: 0.6s; }

.b-r4-c4 { grid-area: 4 / 4 / 5 / 5; animation-delay: 0.75s; }
.b-r3-c4 { grid-area: 3 / 4 / 4 / 5; animation-delay: 0.9s; }
.b-r2-c4 { grid-area: 2 / 4 / 3 / 5; animation-delay: 1.05s; }
.b-r1-c4 { grid-area: 1 / 4 / 2 / 5; animation-delay: 1.2s; }

.b-r1-c2 { grid-area: 1 / 2 / 2 / 3; animation-delay: 1.35s; }

.b-center-big { 
    grid-area: 2 / 2 / 4 / 4; 
    opacity: 1;
    animation: centerShine 2s infinite ease-in-out;
}

.loader-text-modern {
    color: #33b5ff;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 4px;
    opacity: 0.8;
    animation: textPulse 2s ease-in-out infinite alternate;
}

@keyframes counterClockwiseLoad {
    0%, 100% { opacity: 0.15; box-shadow: none; }
    30% { opacity: 1; background-color: #ffffff; box-shadow: 0 0 20px #33b5ff; }
}

@keyframes centerShine {
    0%, 100% { box-shadow: 0 0 20px rgba(51, 181, 255, 0.4); transform: scale(1); filter: brightness(1); }
    50% { box-shadow: 0 0 50px rgba(51, 181, 255, 1); transform: scale(1.05); filter: brightness(1.3); }
}

@keyframes floatLogo {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-15px); }
}

@keyframes textPulse {
    0% { opacity: 0.8; }
    100% { opacity: 0.3; }
}

@media (max-width: 768px) {
    .hero-actions {
        flex-direction: column;
    }
}

/* ==========================================
   BUTTONS & BADGES
   ========================================== */
.btn {
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
    display: inline-block;
}

.btn-primary {
    background-color: var(--color-brand-primary);
    color: #ffffff;
    border: 2px solid var(--color-brand-primary);
}

.btn-primary:hover {
    background-color: #004494;
    border-color: #004494;
}

.btn-outline {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.btn-outline:hover {
    background-color: #ffffff;
    color: #000000;
}

.btn-action {
    background: var(--color-brand-primary);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background var(--transition-fast);
}

.btn-action:hover {
    background: #004494;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
}
.badge-primary { background-color: var(--color-brand-primary); }
.badge-secondary { background-color: var(--color-brand-secondary); }
.badge-accent { background-color: #ff9800; }

/* ==========================================
   LAYOUT: CSS GRID & FLEXBOX
   ========================================== */
.section-block {
    padding: 5rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 2rem;
    color: var(--color-brand-primary);
}

.section-subtitle {
    color: var(--color-text-muted);
    font-size: 1.125rem;
    margin-top: 0.5rem;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Algorithmic Grid Scaling */
.grid-layout {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ==========================================
   UI COMPONENTS (Cards)
   ========================================== */
.card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    will-change: transform; /* Hardware Acceleration */
}

.card-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.date {
    color: var(--color-text-muted);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card-excerpt {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Pushes footer/link to bottom */
}

.read-more, .link-view-all {
    color: var(--color-brand-primary);
    text-decoration: none;
    font-weight: 600;
}

.read-more:hover, .link-view-all:hover {
    text-decoration: underline;
}

.category {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

/* ==========================================
   SECURE CONTACT FORM MODULE
   ========================================== */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    padding: 2.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input, 
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--color-brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.2);
    outline: none;
}

.btn-submit {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--color-brand-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-feedback {
    margin-top: 1rem;
    font-weight: 600;
    text-align: center;
}

.form-feedback.success { color: var(--color-brand-secondary); }
.form-feedback.error { color: #dc3545; }

/* ==========================================
   GLOBAL FOOTER MODULE
   ========================================== */
.global-footer {
    background-color: #1a1a1a;
    color: #e0e0e0;
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.brand-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.footer-heading {
    color: #ffffff;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.footer-list {
    list-style: none;
}

.footer-list li {
    margin-bottom: 0.75rem;
}

.footer-list a, .footer-contact-col a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-list a:hover, .footer-contact-col a:hover {
    color: var(--color-brand-secondary);
}

.footer-address {
    font-style: normal;
    line-height: 1.8;
}

.footer-bottom {
    border-top: 1px solid #333333;
    padding-top: 1.5rem;
    font-size: 0.875rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

/* ==========================================
   MOBILE RESPONSIVENESS (Media Queries)
   ========================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Can be toggled via JS for a hamburger menu */
    }
    .hero-actions {
        flex-direction: column;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}