/* ===== CSS VARIABLES ===== */
:root {
    /* Colors */
    --primary-color: #0d47a1; /* Deep Trust Blue */
    --primary-light: #5472d3;
    --secondary-color: #00bfa5; /* Emerald Accent */
    --accent-color: #ffab00; /* Subtle highlight */
    
    --bg-dark: #0a192f;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    
    --text-main: #2d3748;
    --text-muted: #718096;
    --text-light: #f7fafc;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* System */
    --transition-fast: 0.2s ease;
    --transition-norm: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-hover: 0 20px 40px rgba(13, 71, 161, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* ===== RESET & GLOBAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: #1a202c;
}

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

ul {
    list-style: none;
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-center { text-align: center; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: var(--transition-norm);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-white);
    box-shadow: 0 4px 15px rgba(13, 71, 161, 0.3);
}

.btn-primary:hover {
    background-color: #002171;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(13, 71, 161, 0.4);
}

.btn-accent {
    background-color: var(--secondary-color);
    color: var(--bg-dark);
    box-shadow: 0 4px 15px rgba(0, 191, 165, 0.3);
}

.btn-accent:hover {
    background-color: #00897b;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 191, 165, 0.4);
    color: var(--bg-white);
}

.btn-secondary {
    background-color: transparent;
    color: var(--bg-white);
    border-color: var(--bg-white);
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-3px);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(13, 71, 161, 0.1);
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}
.badge-light {
    background-color: rgba(255,255,255,0.1);
    color: var(--bg-white);
}

/* ===== NAVBAR ===== */
header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition-norm);
    background: transparent;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--bg-white);
    letter-spacing: -0.5px;
}
.logo-images {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}
.logo-images img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    transition: var(--transition-norm);
}
/* Transición fluida base */
.logo-blue { opacity: 0; }
.logo-white { opacity: 1; }

header.scrolled .logo { color: var(--primary-color); }
header.scrolled .logo-blue { opacity: 1; }
header.scrolled .logo-white { opacity: 0; }

.logo span { color: var(--secondary-color); }

.nav-links a {
    margin-left: 30px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    position: relative;
}
header.scrolled .nav-links a {
    color: var(--text-main);
}
.nav-links a:hover {
    color: var(--secondary-color);
}
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0; height: 2px;
    bottom: -5px; left: 0;
    background-color: var(--secondary-color);
    transition: var(--transition-fast);
}
.nav-links a:hover::after { width: 100%; }

.mobile-menu-btn {
    display: none;
    cursor: pointer;
}
.mobile-menu-btn span {
    display: block;
    width: 25px; height: 3px;
    margin: 5px auto;
    background-color: var(--bg-white);
    transition: var(--transition-fast);
}
header.scrolled .mobile-menu-btn span { background-color: var(--primary-color); }

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-color: var(--bg-dark); /* Fallback */
    background-image: url('../assets/hero_bg.png'); /* Default structure for generated bg */
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(10, 25, 47, 0.9) 0%, rgba(13, 71, 161, 0.6) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    color: var(--bg-white);
    margin-bottom: 1.5rem;
}
.hero h1 span {
    color: var(--secondary-color);
}
.hero p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2.5rem;
    max-width: 600px;
}
.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* ===== STATS COUNTER ===== */
.stats {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 3rem 0;
    position: relative;
    z-index: 5;
    margin-top: -60px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    transform: translateY(30px); /* adjusted visually */
    width: 90%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    display: inline-block;
    color: var(--bg-white);
}
.stat-item .plus {
    font-size: 3rem;
    color: var(--secondary-color);
    font-weight: 800;
}
.stat-item p {
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: 8rem 0 5rem;
}

.about-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-text { flex: 1; }
.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}
.about-text p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.about-features {
    margin-top: 2rem;
}
.feature {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.feature-icon {
    font-size: 1.5rem;
    background: rgba(0, 191, 165, 0.1);
    color: var(--secondary-color);
    width: 40px; height: 40px;
    display: flex; justify-content: center; align-items: center;
    border-radius: 50%;
    flex-shrink: 0;
}
.feature h4 { margin-bottom: 0.3rem;}

.about-image {
    flex: 1;
    position: relative;
}
.img-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}
.img-wrapper::before {
    content: ''; position: absolute;
    top: -20px; left: -20px;
    width: 100%; height: 100%;
    border: 3px solid var(--secondary-color);
    border-radius: var(--radius-md);
    z-index: -1;
}
.img-placeholder {
    width: 100%;
    min-height: 500px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    background-image: url('../assets/about_us.png');
}

/* ===== SERVICES ===== */
.services {
    padding: 5rem 0;
    background-color: var(--bg-light);
}
.section-header { margin-bottom: 4rem; }
.section-header p { color: var(--text-muted); max-width: 600px; margin: 1rem auto 0; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-norm);
    border-top: 4px solid transparent;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-top-color: var(--secondary-color);
}
.card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}
.service-card h3 { margin-bottom: 1rem; }
.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}
.service-card ul {
    border-top: 1px solid #edf2f7;
    padding-top: 1rem;
}
.service-card ul li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}
.service-card ul li::before {
    content: '•';
    color: var(--secondary-color);
    position: absolute;
    left: 0; top: 0;
    font-size: 1.2rem;
}

/* ===== ADVANTAGES ===== */
.advantages {
    padding: 5rem 0;
    background-color: var(--bg-dark);
    color: var(--bg-white);
}
.advantages h2 { color: var(--bg-white); }
.advantages p { color: rgba(255,255,255,0.7); }

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem 2rem;
}
.adv-item {
    padding: 1.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition-fast);
}
.adv-item:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.02);
}
.adv-item h4 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

/* ===== CONTACT ===== */
.contact { padding: 5rem 0; }
.contact-container {
    display: flex;
    gap: 4rem;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
    overflow: hidden;
}

.contact-info {
    flex: 1;
    background: var(--bg-light);
    padding: 4rem 3rem;
}
.contact-info h2 { margin-bottom: 1rem; }
.info-list { margin-top: 2rem; }
.info-item {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}
.info-item strong { color: var(--text-main); }
.info-item a { color: var(--primary-color); font-weight: 500; }
.info-item a:hover { text-decoration: underline; }

.contact-form {
    flex: 1.2;
    padding: 4rem 3rem;
}
.input-group { margin-bottom: 1.5rem; }
.input-group input, 
.input-group select, 
.input-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    background-color: #f8fafc;
    transition: var(--transition-fast);
}
.input-group input:focus, 
.input-group select:focus, 
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}

.input-phone {
    display: flex;
    align-items: stretch;
}
.input-phone .prefix {
    display: flex;
    align-items: center;
    padding: 0 15px;
    background: #e2e8f0;
    color: var(--text-main);
    font-weight: 600;
    border: 1px solid #e2e8f0;
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.input-phone input {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
}

/* ===== FOOTER ===== */
footer {
    background: #06101e;
    color: rgba(255,255,255,0.7);
    padding-top: 4rem;
}
.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-col h3 {
    color: var(--bg-white);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}
.footer-col h4 {
    color: var(--bg-white);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a:hover { color: var(--secondary-color); padding-left: 5px; }

.footer-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 10px 20px;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    border-radius: 5px;
}
.footer-btn:hover { background: var(--secondary-color); color: #06101e;}
.footer-bottom { padding: 1.5rem 0; font-size: 0.9rem; }

/* ===== ANIMATIONS & UTILS ===== */
.fade-up { opacity: 0; transform: translateY(30px); transition: 0.8s ease; }
.fade-in { opacity: 0; transition: 0.8s ease; }
.fade-slide-left { opacity: 0; transform: translateX(50px); transition: 0.8s ease; }
.fade-slide-right { opacity: 0; transform: translateX(-50px); transition: 0.8s ease; }

.appear { opacity: 1; transform: translate(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* Responsive adjustments */
@media (max-width: 900px) {
    .about-container { flex-direction: column; }
    .contact-container { flex-direction: column; }
    .hero h1 { font-size: 2.5rem; }
    .stats { width: 95%; transform: translateY(10px); }
    .stats-container { gap: 2rem; }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%; right: -100%;
        background: var(--bg-white);
        width: 100%;
        flex-direction: column;
        padding: 2rem 0;
        box-shadow: var(--shadow-soft);
        transition: 0.3s ease;
    }
    .nav-links.active { right: 0; }
    .nav-links a {
        display: block;
        color: var(--text-main);
        margin: 1rem 2rem;
        text-align: right;
    }
    .mobile-menu-btn { display: block; }
}
