/* A&D Color Palette 
  #E2E8F2 - Lightest Blue/Grey
  #AFC1DC - Soft Blue
  #7C9BC6 - Medium Blue
  #5D7697 - Muted Dark Blue
  #41536B - Dark Slate
  #263242 - Very Dark Blue/Grey
  #0E141C - Almost Black
*/

:root {
    --c-1: #E2E8F2;
    --c-2: #AFC1DC;
    --c-3: #7C9BC6;
    --c-4: #5D7697;
    --c-5: #41536B;
    --c-6: #263242;
    --c-7: #0E141C;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--c-7);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

/* Bilingual Display Logic */
body.lang-en .es { display: none !important; }
body.lang-es .en { display: none !important; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.section-padding { padding: 80px 0; }
.section-subtitle { margin-bottom: 40px; color: var(--c-4); font-size: 1.1rem; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin-bottom: 15px; }
h2 { font-size: 2.5rem; color: var(--c-6); }

p { margin-bottom: 20px; font-size: 1.05rem; }

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: var(--c-5);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.btn-primary:hover { background-color: var(--c-6); color: var(--white); }
.btn-block { display: block; width: 100%; font-size: 1.1rem; padding: 15px; }

/* Top Bar */
.top-bar {
    background-color: var(--c-7);
    color: var(--c-1);
    font-size: 0.9rem;
    padding: 8px 0;
}
.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.hablamos-badge {
    background-color: var(--c-4);
    color: var(--white);
    padding: 3px 8px;
    border-radius: 3px;
    margin-right: 15px;
    font-weight: bold;
}
.whatsapp-link { color: var(--c-2); text-decoration: none; font-weight: 600; margin-right: 20px; }
.whatsapp-link:hover { color: var(--white); }

.lang-btn {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--c-4);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}
.lang-btn:hover { background: var(--c-5); }

/* Header */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo-container { display: flex; align-items: center; gap: 12px; }
.logo-icon {
    background-color: var(--c-6);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
}
.logo-text { display: flex; flex-direction: column; }
.logo-text .title { font-weight: 700; font-size: 1.2rem; color: var(--c-7); }
.logo-text .est { font-size: 0.75rem; color: var(--c-4); letter-spacing: 2px; }

.nav-menu { display: flex; gap: 20px; align-items: center; }
.nav-menu a {
    text-decoration: none;
    color: var(--c-6);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}
.nav-menu a:hover { color: var(--c-3); }
.quote-btn {
    background-color: var(--c-3);
    color: var(--white) !important;
    padding: 8px 18px;
    border-radius: 4px;
}
.quote-btn:hover { background-color: var(--c-4); }

/* Hero Slider */
.hero {
    position: relative;
    height: 80vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-slider {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transition: background-image 1.5s ease-in-out;
    z-index: 1;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(14,20,28,0.85) 0%, rgba(38,50,66,0.6) 100%);
    z-index: 2;
}
.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--white);
    max-width: 800px;
}
.hero-content h1 { font-size: 3.5rem; margin-bottom: 20px; }
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; color: var(--c-1); }

/* NEW DYNAMIC LOGO SECTION */
.dynamic-partners { 
    background-color: var(--c-1); 
    padding: 60px 0 80px 0; 
    border-bottom: 1px solid var(--c-2);
    overflow: hidden;
}
.section-header-centered {
    text-align: center;
    margin-bottom: 40px;
}
.section-header-centered h3 {
    color: var(--c-6);
    font-size: 1.8rem;
    margin-bottom: 10px;
}
.accent-line {
    width: 60px;
    height: 4px;
    background-color: var(--c-3);
    margin: 0 auto;
    border-radius: 2px;
}

/* The Stage */
.logo-stage {
    position: relative;
    width: 100%;
    height: 120px; /* fixed height for the animation row */
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.03);
    overflow: hidden;
    margin-top: 20px;
}

/* Individual animated logo styling */
.animated-logo {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 65px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    /* Start positions will be set by JS (left side stack) */
    left: -200px; 
    /* Base filter to look clean */
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}
.animated-logo:hover {
    filter: grayscale(0%);
    cursor: pointer;
}

@keyframes slideAndShoot {
    0% {
        left: -10%;
        opacity: 0;
    }
    5% {
        left: 5%;
        opacity: 1;
    }
    /* Slowly moving to 3/4 mark */
    75% {
        left: 70%;
        opacity: 1;
        /* Animation timing function makes it slow here */
        animation-timing-function: ease-in;
    }
    /* Shoot to the right */
    100% {
        left: 120%;
        opacity: 0;
    }
}


/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.about-image { position: relative; }
.about-image img { width: 100%; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.experience-badge {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background-color: var(--c-5);
    color: var(--white);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.experience-badge h2 { color: var(--white); margin: 0; font-size: 2.5rem; }
.experience-badge span { font-weight: 600; font-size: 0.9rem; text-transform: uppercase; }

/* Ensure About Us header is one line and responsive */
.about-heading {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Uses clamp to automatically shrink font on smaller devices to keep it on one line */
    font-size: clamp(1.2rem, 3.5vw, 2.5rem); 
}

/* Mission */
.mission { background-color: var(--c-6); color: var(--white); }
.mission h2 { color: var(--c-2); }
.mission-icon { font-size: 4rem; color: var(--c-3); margin-bottom: 20px; }
.mission-text { max-width: 800px; margin: 0 auto; font-size: 1.3rem; font-weight: 300; line-height: 1.8; color: var(--c-1); }

/* Services */
.services { background-color: var(--white); }
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.service-card {
    background: var(--c-1);
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}
.service-card:hover { transform: translateY(-5px); border-bottom-color: var(--c-3); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.service-card i { font-size: 2.5rem; color: var(--c-4); margin-bottom: 15px; }
.service-card h4 { margin: 0; color: var(--c-6); }

/* Quote Section */
.quote { background: linear-gradient(135deg, var(--c-5) 0%, var(--c-7) 100%); color: var(--white); }
.quote h2 { color: var(--white); }
.quote-container { display: flex; justify-content: center; }
.quote-content { width: 100%; max-width: 600px; text-align: center; }
.quote-form { background: var(--white); padding: 40px; border-radius: 8px; margin-top: 30px; text-align: left; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--c-6); font-weight: 600; }
.form-group input { width: 100%; padding: 12px; border: 1px solid var(--c-2); border-radius: 4px; font-family: inherit; font-size: 1rem; }
.form-group input:focus { outline: none; border-color: var(--c-4); }

/* Contact Section */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.info-list { list-style: none; margin-top: 30px; }
.info-list li { display: flex; gap: 15px; margin-bottom: 25px; align-items: flex-start; }
.info-list i { font-size: 1.5rem; color: var(--c-4); margin-top: 3px; }
.contact-visuals { display: flex; flex-direction: column; gap: 20px; }
.location-photo img { width: 100%; height: 250px; object-fit: cover; border-radius: 8px; }
.photo-caption { text-align: center; font-size: 0.9rem; color: var(--c-5); margin-top: 5px; font-weight: 600; }
.map-container iframe { width: 100%; height: 250px; border: none; border-radius: 8px; }

/* Footer */
.footer { background-color: var(--c-7); color: var(--c-4); padding: 30px 0; font-size: 0.9rem; border-top: 1px solid #1a2433; }
.footer p { margin: 5px 0; }

/* Responsive */
@media (max-width: 768px) {
    .header-content { flex-direction: column; gap: 15px; }
    .nav-menu { flex-wrap: wrap; justify-content: center; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 2.5rem; }
    .top-bar-content { flex-direction: column; gap: 10px; text-align: center; }
}
