/* =========================================
   ESTO SPECIALITY - ABOUT PAGE CSS (FINAL)
   ========================================= */

/* --- 0. VARIABLES & GLOBALS --- */
:root {
    --navy: #0f172a;
    --blue: #005b96;
    --white: #ffffff;
    --light-bg: #f8fafc;
    --text-color: #334155;
    --section-pad: 100px;
}

body {
    overflow-x: hidden; /* Prevents horizontal scrolling glitches */
}

.section-spacer {
    padding: var(--section-pad) 0;
    position: relative;
    overflow: hidden; /* Ensures animations don't break layout */
}

.bg-white { background: var(--white); }
.bg-light { background: var(--light-bg); }
.bg-navy { background: var(--navy); color: white; }

.relative-z { position: relative; z-index: 2; }
.text-white { color: white; }
.text-white-50 { color: rgba(255,255,255,0.7); }
.text-center { text-align: center; }


/* --- 1. HERO SECTION --- */
.about-hero {
    height: 80vh;
    background: var(--navy);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg-anim {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    z-index: 1;
}

.hero-bg-anim::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 30px 30px;
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-tag {
    font-family: 'Rajdhani', sans-serif;
    color: #60a5fa;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    display: block;
    margin-bottom: 20px;
}

.hero-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 4.5rem;
    line-height: 1.1;
    color: white;
    font-weight: 700;
}

.hero-line {
    width: 80px;
    height: 4px;
    background: var(--blue);
    margin: 30px auto;
}

.hero-desc {
    font-family: 'Barlow', sans-serif;
    font-size: 1.25rem;
    color: #cbd5e1;
    line-height: 1.6;
}


/* --- 2. ORIGIN & IDENTITY (Split Layout) --- */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 50/50 Split */
    gap: 80px;
    align-items: center;
}

.text-col { padding-right: 20px; }

.section-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 2.8rem;
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: 20px;
}

.bg-navy .section-title { color: white; }

.blue-dash {
    width: 60px;
    height: 4px;
    background: var(--blue);
    margin-bottom: 30px;
}

.body-text {
    font-family: 'Barlow', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 20px;
}

.quote-box {
    border-left: 4px solid var(--blue);
    padding-left: 20px;
    font-style: italic;
    color: #475569;
    margin-top: 30px;
    font-size: 1.2rem;
}

.image-frame {
    position: relative;
    width: 100%;
    height: 450px;
    border-radius: 12px;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    box-shadow: 20px 20px 0px rgba(15, 23, 42, 0.1);
}

.floating-stat {
    position: absolute;
    bottom: -30px;
    left: -30px;
    background: var(--blue);
    color: white;
    padding: 25px 35px;
    border-radius: 4px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 5;
    text-align: center;
    min-width: 160px;
}

.stat-big { 
    display: block; 
    font-size: 2.2rem; 
    font-weight: 800; 
    font-family: 'Rajdhani', sans-serif; 
    line-height: 1;
}

.stat-small { 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    opacity: 0.9;
}


/* --- 3. US CONNECTION (Tech) --- */
.row-center {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.blue-tag-outline {
    border: 1px solid var(--blue);
    color: var(--blue);
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-block;
}

.connection-graphic {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-top: 60px;
}

.loc-box {
    text-align: center;
    background: rgba(255,255,255,0.05);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    min-width: 200px;
}

.loc-box i { font-size: 2.5rem; color: var(--blue); margin-bottom: 15px; }
.loc-box span { display: block; font-weight: 700; font-size: 1.2rem; margin-bottom: 5px; }
.loc-box small { color: #94a3b8; text-transform: uppercase; font-size: 0.8rem; }

.connect-line {
    height: 2px;
    width: 150px;
    background: #334155;
    position: relative;
}

.moving-packet {
    position: absolute;
    top: -4px;
    left: 0;
    width: 10px;
    height: 10px;
    background: var(--blue);
    border-radius: 50%;
    animation: packetMove 2s infinite linear;
}

@keyframes packetMove { 0% { left: 0; } 100% { left: 100%; } }


/* --- 4. PHILOSOPHY (Cards) --- */
.philosophy-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 50px;
}

.philo-card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    width: 350px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.philo-card.esto-style {
    border-top: 5px solid var(--blue);
    transform: scale(1.05);
}

.card-icon { font-size: 3rem; margin-bottom: 20px; }
.card-icon.red { color: #ef4444; }
.card-icon.blue { color: var(--blue); }

.result-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 20px;
}
.result-badge.bad { background: #fee2e2; color: #ef4444; }
.result-badge.good { background: #dcfce7; color: #166534; }

.philo-arrow { font-size: 2rem; color: #94a3b8; }


/* --- 5. CERT MATRIX --- */
.cert-matrix {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.cert-tile {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 30px 20px;
    text-align: center;
    border-radius: 6px;
    transition: 0.3s;
}

.cert-tile:hover {
    background: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: var(--blue);
}

.cert-tile strong {
    display: block;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.5rem;
    color: var(--navy);
}
.cert-tile span { color: #64748b; text-transform: uppercase; font-size: 0.8rem; }

.check-list { list-style: none; padding: 0; margin-top: 20px; }
.check-list li { margin-bottom: 15px; padding-left: 25px; position: relative; }
.check-list li::before {
    content: '✔';
    position: absolute; left: 0; color: var(--blue);
}


/* --- 6. POLICY GRID --- */
.policy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.policy-card {
    background: rgba(255,255,255,0.05);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    transition: 0.3s;
}

.policy-card:hover { background: rgba(255,255,255,0.1); }
.p-icon { font-size: 2.5rem; color: var(--blue); margin-bottom: 20px; }
.policy-card h4 { font-family: 'Rajdhani', sans-serif; font-size: 1.5rem; margin-bottom: 15px; }


/* --- 7. INFRASTRUCTURE & R&D (Architectural Overlap) --- */
.architectural-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    align-items: center;
    position: relative;
    padding: 40px 0;
}

/* Image Layer (Right) */
.arch-image-wrapper {
    grid-column: 5 / 13;
    grid-row: 1;
    position: relative;
    height: 550px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 20px 20px 50px rgba(0,0,0,0.15);
}

.arch-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9) contrast(1.1);
}

.tech-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.8), transparent 50%);
    z-index: 1;
}

.scan-line {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    animation: scanMove 4s ease-in-out infinite;
    z-index: 2;
    opacity: 0.6;
}

@keyframes scanMove {
    0% { top: 0%; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.corner-mark {
    position: absolute; width: 20px; height: 20px;
    border-color: rgba(255, 255, 255, 0.5);
    border-style: solid;
    z-index: 3;
}
.corner-mark.top-right { top: 20px; right: 20px; border-width: 2px 2px 0 0; }
.corner-mark.bottom-right { bottom: 20px; right: 20px; border-width: 0 2px 2px 0; }

/* Text Content Layer (Left) */
.arch-content-card {
    grid-column: 1 / 7;
    grid-row: 1;
    background: var(--navy);
    padding: 60px 50px;
    border-radius: 8px;
    z-index: 5;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border-left: 5px solid var(--blue);
    position: relative;
}

.white-dash { width: 50px; height: 3px; background: var(--blue); margin: 20px 0; }
.text-white-80 { color: rgba(255,255,255,0.8); }
.text-blue { color: #60a5fa; }

.stat-row-mini {
    display: flex;
    gap: 40px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.mini-stat span { display: block; font-size: 0.8rem; text-transform: uppercase; color: #94a3b8; margin-bottom: 5px; }
.mini-stat strong { font-family: 'Rajdhani', sans-serif; font-size: 1.2rem; color: white; }

.btn-glow { box-shadow: 0 0 15px rgba(0, 91, 150, 0.4); transition: 0.3s; }
.btn-glow:hover { box-shadow: 0 0 25px rgba(0, 91, 150, 0.7); background: var(--blue); }
/* --- UPDATED BUTTON STYLE (Tech/Glow) --- */

.btn-solid {
    position: relative;
    display: inline-block;
    padding: 16px 40px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.4s ease;
    z-index: 1;
    border: none;
    overflow: hidden; /* Important for the fill effect */
}

/* Specific Style for "Visit Our Plant" (High Contrast) */
.btn-glow {
    background: var(--white); /* White background to pop against Navy card */
    color: var(--navy);       /* Dark text */
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1); /* Subtle white glow */
}

/* The "Sliding Fill" Animation Layer */
.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--blue); /* Fills with brand blue */
    z-index: -1; /* Sits behind text */
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    transform: skewX(-15deg); /* Techy slant angle */
    transform-origin: left;
}

/* Hover State */
.btn-glow:hover {
    color: white; /* Text turns white */
    box-shadow: 0 0 30px rgba(0, 91, 150, 0.6); /* Strong Blue Glow */
    transform: translateY(-3px); /* Slight lift */
}

.btn-glow:hover::before {
    width: 120%; /* Fills the whole button */
}

/* Mobile Tweak: Ensure margin works */
.mt-4 { margin-top: 30px; display: inline-block; }

/* --- 8. RESPONSIVE FIXES --- */
@media (max-width: 992px) {
    
    /* Global Splits */
    .split-layout, .philosophy-grid, .policy-grid {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        gap: 50px;
    }
    
    .reverse-mobile { flex-direction: column-reverse; }

    /* Factory Image Fix */
    .image-frame {
        height: 350px; 
        margin-bottom: 50px;
    }
    .floating-stat { left: 0; bottom: -20px; }

    /* Philosophy Arrow */
    .philo-arrow { transform: rotate(90deg); margin: 20px 0; }
    .philo-card { width: 100%; }

    /* Hero Text */
    .hero-title { font-size: 3rem; }

    /* US Connection Animation Vertical */
    .connect-line { width: 2px; height: 50px; margin: 20px 0; }
    .connection-graphic { flex-direction: column; }
    .moving-packet { animation: packetMoveVert 2s infinite linear; }
    @keyframes packetMoveVert { 0% { top: 0; } 100% { top: 100%; } }

    /* Architectural Overlay Mobile Stack */
    .architectural-grid {
        display: flex;
        flex-direction: column-reverse; /* Image on top */
        gap: 0;
    }

    .arch-image-wrapper {
        width: 100%;
        height: 300px;
        border-radius: 8px 8px 0 0;
    }

    .arch-content-card {
        width: 100%;
        margin-top: -50px; /* Slight overlap */
        border-radius: 0 0 8px 8px;
        padding: 40px 30px;
    }
}