/* ==========================================================================
   ECHELON SECURITY CONSULTING - MAIN STYLESHEET
   ========================================================================== */

/* --- 1. CORE VARIABLES & FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&family=Raleway:wght@600;700;800&display=swap');

:root {
    /* BRAND PALETTE */
    --esc-blue:   #163C67; 
    --esc-teal:   #0A818B; 
    --esc-yellow: #E2AB25; 
    
    /* NEUTRALS */
    --bg-body:    #F8FAFC; 
    --bg-white:   #FFFFFF; 
    --text-main:  #334155; 
    --text-light: #FFFFFF; 
    --border-light: rgba(22, 60, 103, 0.1);
    
    /* FONTS */
    --font-head: 'Raleway', sans-serif; 
    --font-body: 'Raleway', sans-serif; 
    --font-ui:   'Poppins', sans-serif; 
}

/* --- 2. GLOBAL RESET --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    font-weight: 600;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Prevents horizontal scroll from animations */
}

a { text-decoration: none; transition: 0.3s; }
ul { list-style: none; }

/* --- 3. TYPOGRAPHY --- */
h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--esc-blue);
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 20px; color: var(--esc-blue); }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); margin-bottom: 15px; }
h3 { font-size: 1.4rem; color: var(--esc-blue); margin-bottom: 10px; }

/* "Eyebrow" Text Style */
.eyebrow {
    font-family: var(--font-ui);
    color: var(--esc-teal);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 15px;
}
.eyebrow.accent { color: var(--esc-yellow); }

/* --- 4. NAVIGATION --- */
.navbar {
    background-color: var(--bg-white);
    padding: 10px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; 
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.logo img { max-height: 60px; }
.nav-links { display: flex; gap: 30px; align-items: center; }

.nav-link {
    color: var(--esc-blue);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
}
.nav-link:hover, .nav-link.active { color: var(--esc-yellow); }

/* --- 5. MOBILE MENU & ANIMATION --- */
.mobile-toggle { 
    display: none; 
    cursor: pointer; 
    color: var(--esc-blue); 
    font-size: 1.8rem;
    z-index: 1001; /* Above navbar */
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--esc-blue);
    z-index: 9999; /* Highest Z-Index to cover everything */
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu.active {
    display: flex !important;
    opacity: 1;
}

/* Links inside Mobile Menu */
.mobile-menu a {
    font-family: var(--font-head);
    font-size: 2rem;
    color: white;
    margin-bottom: 30px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0; /* Hidden before animation */
    transform: translateY(20px); /* Push down slightly */
}

/* The Slide-Up Animation */
@keyframes slideUpFade {
    to { opacity: 1; transform: translateY(0); }
}

/* Apply animation when menu is active */
.mobile-menu.active a { animation: slideUpFade 0.5s forwards ease-out; }

/* Staggered Delays for links */
.mobile-menu.active a:nth-child(2) { animation-delay: 0.1s; } /* Home */
.mobile-menu.active a:nth-child(3) { animation-delay: 0.2s; } /* Mission */
.mobile-menu.active a:nth-child(4) { animation-delay: 0.3s; } /* Expertise */
.mobile-menu.active a:nth-child(5) { animation-delay: 0.4s; } /* Briefing */
.mobile-menu.active a:nth-child(6) { animation-delay: 0.5s; } /* Contact */

.menu-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 2.5rem;
    color: var(--esc-yellow);
    cursor: pointer;
    font-family: sans-serif;
    transition: transform 0.3s;
}
.menu-close:hover { transform: rotate(90deg); }

/* --- 6. GLOBAL LAYOUTS & COMPONENTS --- */
section { 
    padding: 100px 8%; 
    border-bottom: 1px solid var(--border-light);
}

.container { max-width: 1400px; margin: 0 auto; width: 100%; }

/* Grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* Hero Section */
.hero {
    min-height: 80vh;
    padding: 120px 8% 80px; /* Increased top padding slightly to compensate for the removed vertical centering */
    background: radial-gradient(circle at top right, #e2e8f0 0%, var(--bg-body) 100%);
    position: relative;
}

/* Cards */
.card {
    background: var(--bg-white);
    padding: 40px;
    border-left: 5px solid var(--esc-teal);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
    border-color: var(--esc-yellow);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 18px 40px;
    font-family: var(--font-head);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
    border: none;
}
.btn-primary { background-color: var(--esc-blue); color: white; }
.btn-primary:hover { background-color: var(--esc-teal); }

.btn-outline {
    background: transparent;
    border: 2px solid var(--esc-blue);
    color: var(--esc-blue);
}
.btn-outline:hover { background: var(--esc-blue); color: white; }

/* --- 7. URGENT CRISIS BUTTON --- */
.crisis-alert-bar {
    z-index: 9000;
    font-family: var(--font-ui);
    position: fixed;
    top: 110px;
    right: 30px;
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.crisis-alert-bar.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.crisis-link-button {
    background-color: rgba(127, 29, 29, 0.95);
    color: rgba(255, 255, 255, 0.95) !important;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.15); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    padding: 10px 20px;
    font-size: 0.8rem;
}

.crisis-link-button:hover {
    background-color: #991b1b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

/* --- 8. SURVEILLANCE WIDGET --- */
#surveillance-widget {
    background-color: #0f172a;
    border: 1px solid var(--esc-teal);
    color: #e2e8f0;
    padding: 15px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    z-index: 8000; /* Lower than mobile menu */
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: auto;
    max-width: 100vw;
}
#surveillance-widget div { margin-bottom: 5px; white-space: nowrap; }
#surveillance-widget div:last-child { margin-bottom: 0; }

/* --- 9. PEDIGREE VISUAL (TIMELINE) --- */
.pedigree-container { position: relative; max-width: 800px; margin: 50px auto; padding-left: 30px; }
.pedigree-line { position: absolute; top: 0; left: 0; width: 2px; height: 100%; background: linear-gradient(to bottom, transparent, #cbd5e1 10%, #cbd5e1 90%, transparent); }
.pedigree-item { position: relative; margin-bottom: 40px; padding-left: 30px; }
.pedigree-marker { position: absolute; top: 5px; left: -34px; width: 10px; height: 10px; background: #1e293b; border: 2px solid var(--esc-teal); border-radius: 50%; box-shadow: 0 0 0 4px #f8fafc; z-index: 1; }
.active-marker { background: var(--esc-yellow); border-color: var(--esc-yellow); box-shadow: 0 0 10px rgba(226, 171, 37, 0.5), 0 0 0 4px #f8fafc; }

.pedigree-content h3 { margin: 5px 0; font-size: 1.1rem; color: #1e293b; }
.pedigree-content p { font-size: 0.9rem; color: #64748b; line-height: 1.5; }
.pedigree-date { font-family: 'Courier New', monospace; font-weight: 700; color: var(--esc-teal); font-size: 0.85rem; letter-spacing: 1px; }

/* --- 10. LEADERSHIP BIOS (MINIMALIST) --- */
.bio-card {
    background: white; 
    border-top: 4px solid var(--esc-blue);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    display: flex; 
    flex-direction: column; 
    transition: transform 0.3s ease;
}
.bio-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
    border-top-color: var(--esc-yellow); 
}

.minimalist-bio{
    /* keep your padding, but remove forced center layout */
    padding: 60px 30px;
    text-align: left;
    justify-content: flex-start;
    align-items: stretch;
}

.bio-header{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.bio-header-text h3{
    margin: 0 0 8px 0;
}

.bio-header-text .bio-title{
    display: block;
}

.minimalist-bio h3 {
    margin-bottom: 10px;
    font-size: 1.8rem;
    letter-spacing: 1px;
}
.bio-title {
    color: var(--esc-teal);
    font-family: var(--font-ui);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* LINKEDIN BUTTON */
.linkedin-btn-square{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--esc-blue) !important;
    background: transparent;
    transition: 0.3s;
    flex: 0 0 auto;
}

.linkedin-btn-square:hover{
    background: var(--esc-blue);
    color: white;
}

/* --- 11. CONTACT HERO & FORMS --- */
.contact-hero {
    min-height: 80vh;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 60px 8% 80px;
    background: radial-gradient(circle at top right, #1f4d80 0%, var(--esc-blue) 100%);
    position: relative; text-align: center;
}
.hero-form-card {
    background: rgba(22, 60, 103, 0.6); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1); padding: 50px;
    width: 100%; margin-top: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Urgent Mode Elements */
#urgent-alert { display: none; background: rgba(226, 171, 37, 0.15); border: 1px solid var(--esc-yellow); color: var(--esc-yellow); padding: 15px; margin-bottom: 30px; text-align: left; }
#urgent-card { display: none; background: rgba(0, 0, 0, 0.2); padding: 40px; }

/* Form Inputs */
.hero-form-card input, .hero-form-card select, .hero-form-card textarea {
    background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.2);
    color: white; padding: 15px; width: 100%; margin-bottom: 20px; font-family: var(--font-ui);
}
.hero-form-card label { text-align: left; display: block; color: var(--esc-teal); font-size: 0.75rem; font-weight: 700; margin-bottom: 8px; }

/* Custom Checkboxes */
.hero-form-card input[type="checkbox"] { width: 18px !important; height: 18px !important; margin: 0 10px 0 0 !important; display: inline-block !important; background: transparent !important; accent-color: var(--esc-yellow); }
.checkbox-label { display: inline-block !important; font-weight: 500 !important; font-size: 0.9rem !important; cursor: pointer; }
.checkbox-wrapper { display: flex; align-items: center; margin-bottom: 8px; }
.checkbox-wrapper:hover .checkbox-label { color: var(--esc-yellow); }

.urgent-button {width: 100%; margin-top: 10px; }
.btn-whatsapp { background-color: #25D366 !important; color: white !important; display: flex !important; align-items: center !important; justify-content: center !important; min-height: 55px; font-weight: 800; border: none; }
.btn-whatsapp i, .btn-line i { font-size: 1.4rem;}
.btn-whatsapp:hover, .btn-line:hover { transform: translateY(-2px); filter: brightness(1.1); }

/* --- 12. GLOBAL FOOTER --- */
.site-footer {
    background-color: #163C67 !important; color: #ffffff !important;
    padding: 80px 8% 40px; border-top: 5px solid var(--esc-teal);
    font-family: 'Poppins', sans-serif; position: relative; z-index: 10;
}
.footer-content { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-bottom: 60px; align-items: start; }
.footer-heading { color: var(--esc-teal) !important; font-family: 'Raleway', sans-serif; font-size: 0.85rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 25px; display: block; }
.footer-address, .footer-links a { color: #ffffff !important; opacity: 0.9; }
.footer-links a:hover { color: var(--esc-yellow) !important; opacity: 1; padding-left: 5px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 30px; display: flex; justify-content: space-between; font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); }
.footer-motto { color: var(--esc-yellow); font-weight: 800; letter-spacing: 2px; }

/* --- 13. RESPONSIVE / MOBILE OPTIMIZATION --- */
@media (max-width: 1024px) {
    .site-footer { padding: 80px 40px 40px; }
    .footer-content { grid-template-columns: 1fr 1fr; gap: 60px; }
}

@media (max-width: 768px) {
    /* Layouts */
    .nav-links { display: none; }
    .mobile-toggle { display: block; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 40px; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
    
    /* Hero */
    .hero { flex-direction: column; align-items: flex-start; padding-top: 100px; }
    .contact-hero { padding: 80px 5% 60px; }
    .hero-form-card { padding: 25px 20px; }
    
    /* Widget Adjustments */
    .crisis-alert-bar {
        position: fixed !important;
        top: 85px !important; 
        right: 15px !important;
        background: transparent !important;
        padding: 0 !important;
    }
    .crisis-link-button {
        padding: 8px 12px;
        font-size: 0.7rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    }
    
    #surveillance-widget {
        position: static;
        width: 100%;
        max-width: 100%;
        text-align: center;
        box-shadow: none;
        background: #0f172a;
    }
    
    .urgent-buttons-grid { grid-template-columns: 1fr; }
    
    /* Bio Mobile adjustments (Minimalist) */
    .minimalist-bio{ padding: 40px 20px; }
    .bio-header{ gap: 12px; }
    .linkedin-btn-square{ width: 42px; height: 42px; }
}

/* ========================================================================== 
   14. CONTACT PAGE (FORMLESS) – PREMIUM LAYOUT
   ========================================================================== */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 22px;
    align-items: stretch;
}

.contact-panel {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 10px;
}

.contact-meta { text-align: center; margin-bottom: 14px; }
.contact-meta .country {
    font-family: var(--font-ui);
    color: rgba(255,255,255,0.65);
    font-size: 0.82rem;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}
.contact-meta h2 { color: white; margin: 6px 0 0; }

.contact-company {
    color: white;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-top: 10px;
    margin-bottom: 12px;
}

.contact-lines { color: rgba(255,255,255,0.78); line-height: 1.7; }
.contact-lines .label { opacity: 0.8; display: inline-block; min-width: 90px; }

.contact-email a { color: var(--esc-yellow); font-weight: 800; }
.contact-email { margin-top: 10px; }

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.btn-channel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    font-family: var(--font-head);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    border: 1px solid rgba(255,255,255,0.14);
    color: white;
    transition: transform 0.2s ease, filter 0.2s ease;
    white-space: nowrap;
}
.btn-channel:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* Ensure channel buttons stay visually consistent */
.btn-channel{
    flex: 1 1;            /* equalize widths and allow wrapping gracefully */
    min-width: 170px;
    max-width: 240px;
}
.btn-channel i{
    width: 18px;                /* fixed icon slot keeps text aligned */
    text-align: center;
    font-size: 1.15rem;
    line-height: 1;
}

/* Very small screens: stack buttons full-width so they don't wrap unevenly */
@media (max-width: 420px){
    .contact-actions{
        flex-direction: column;
        align-items: center;
    }
    .btn-channel{
        width: 100%;
        max-width: 320px;
    }
}
.btn-wa { background: #25D366; border-color: rgba(0,0,0,0.12); }
.btn-line { background: #06C755; border-color: rgba(0,0,0,0.12); }

.contact-footnote {
    margin-top: 14px;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
}

.map-card { padding: 0; overflow: hidden; }
.map-card iframe {
    width: 100%;
    height: 100%;
    min-height: 360px;
    border: 0;
    display: block;
}
.map-card .map-note {
    padding: 12px 14px;
    border-top: 1px solid rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.55);
    font-size: 0.78rem;
    background: rgba(0,0,0,0.18);
}

.coming-soon-card {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}
.coming-soon-card .country {
    font-family: var(--font-ui);
    color: rgba(255,255,255,0.65);
    font-size: 0.82rem;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}
.coming-soon-card .title { color: white; font-weight: 800; margin-top: 6px; }
.coming-soon-card .status { color: rgba(255,255,255,0.6); font-family: var(--font-ui); }

@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; }
    /* Map below Thailand address on mobile */
    .contact-address { order: 1; }
    .contact-map { order: 2; }
}
