/* === CSS Variables & Design System === */
:root {
    /* Color Palette */
    --primary-color: #0b51c8;
    --primary-light: #2c72eb;
    --primary-dark: #07388c;
    --secondary-color: #0c1a30;
    
    --accent-color: #00d4ff;
    
    /* Backgrounds */
    --bg-color: #ffffff;
    --bg-light: #f4f7f9;
    --bg-card: #ffffff;
    --bg-dark: #0a1122;
    
    /* Text Colors */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #fefefe;
    
    /* Utility */
    --border-color: #e2e8f0;
    --border-color-dark: #1e293b;
    
    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Elevations & Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 10px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-glow: 0 0 20px rgba(11, 81, 200, 0.4);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 999px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* === CSS Reset === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* offset for fixed header */
}

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

img, svg {
    max-width: 100%;
    display: block;
}

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

ul {
    list-style: none;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-color);
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 3vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }

p { margin-bottom: 1rem; color: var(--text-muted); }

.lead {
    font-size: 1.125rem;
    color: var(--primary-light);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.text-highlight {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}
.text-highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 30%;
    background-color: var(--accent-color);
    opacity: 0.3;
    z-index: -1;
    transform: rotate(-1deg);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-muted { color: var(--text-muted); }

/* === Layout Utilities === */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.py-section { padding: 5rem 0; }
@media (min-width: 768px) { .py-section { padding: 8rem 0; } }

.section-light { background-color: var(--bg-light); }
.section-dark { 
    background-color: var(--bg-dark); 
    color: var(--text-light); 
}
.section-dark h2, .section-dark h3 { color: var(--text-light); }
.section-dark p { color: #94a3b8; }

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

/* === Components === */
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.1);
    transform: translateY(100%);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::after { transform: translateY(0); }
.btn:active { transform: translateY(2px); }

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 14px rgba(11, 81, 200, 0.3);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-light);
    border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
    background-color: white;
    color: var(--secondary-color);
}

/* Services btn-outline override */
#servicios .btn-outline {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
#servicios .btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn-block { width: 100%; }

.glow-btn {
    box-shadow: var(--shadow-glow);
    animation: pulse-glow 2s infinite alternate;
}
@keyframes pulse-glow {
    0% { box-shadow: 0 0 10px rgba(11, 81, 200, 0.4); }
    100% { box-shadow: 0 0 25px rgba(0, 212, 255, 0.6); }
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background-color: rgba(11, 81, 200, 0.1);
    color: var(--primary-color);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.badge-dark { background-color: var(--bg-dark); color: white; }

/* === Navbar === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1.5rem 0;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

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

/* Brand Logo Custom Styling */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    padding-left: 20px; /* Space for the arc */
}

.brand-img {
    height: 90px; /* Logotipo mucho más grande */
    width: auto;
    object-fit: contain;
    border-radius: 12px; /* Bordes suavemente redondeados */
    transition: var(--transition);
}

.footer-logo .brand-img {
    height: 120px; /* Logotipo más grande en el pie de página */
}

/* Hover effects */
.brand-logo:hover .brand-img {
    transform: scale(1.05);
}

.navbar.scrolled .brand-sub { color: #64748b; }
.navbar.scrolled .brand-dico { color: #475569; } /* Darker grey when scrolling */

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    position: relative;
}
.nav-link:hover { color: white; }
.navbar.scrolled .nav-link { color: var(--text-main); }
.navbar.scrolled .nav-link:hover { color: var(--primary-color); }

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}
.navbar.scrolled .nav-link::after { background-color: var(--primary-color); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}
.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: white;
    transition: var(--transition);
}
.navbar.scrolled .bar { background-color: var(--secondary-color); }

/* === Hero Section === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background-color: var(--secondary-color);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    /* Movimiento de desvanecido y zoom suave "efecto profesional" */
    transition: opacity 1.5s ease-in-out, transform 6s ease-in-out;
    transform: scale(1);
}

.slide.active {
    opacity: 1;
    transform: scale(1.08); /* Movimiento progresivo "Ken Burns" */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradiente ligeramente más transparente para lucir la nueva imagen brillante */
    background: linear-gradient(135deg, rgba(12, 26, 48, 0.75) 0%, rgba(11, 81, 200, 0.45) 100%);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-text-wrapper {
    max-width: 800px;
    color: white;
}

.hero-text-wrapper .badge {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    backdrop-filter: blur(5px);
}
.hero-text-wrapper h1 { color: white; margin-bottom: 1.5rem; }
.hero-text-wrapper p { color: rgba(255,255,255,0.85); font-size: 1.25rem; margin-bottom: 2.5rem; max-width: 650px; }

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-shape {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 5;
}
.hero-shape svg { width: 100%; height: auto; display: block; }

/* === Services Section === */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

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

.glass-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.service-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.hover-lift:hover .service-icon-wrapper {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
}
.hover-lift:hover .service-link { gap: 0.75rem; color: var(--primary-dark); }

/* === About Section === */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image-wrapper { position: relative; }

.about-image-box {
    width: 100%;
    height: 500px;
    border-radius: var(--radius-lg);
    background-color: #1e293b;
    background-image: url('assets/fondo_principal.jpg'); /* Actualizado a la imagen del usuario */
    background-size: cover;
    background-position: center left;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.about-gradient-overlay {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: linear-gradient(to top right, rgba(12, 26, 48, 0.8), transparent);
}

.about-floating-card {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    color: var(--secondary-color);
    border-left: 5px solid var(--primary-color);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.floating-number { font-size: 3rem; font-weight: 800; color: var(--primary-color); line-height: 1; margin-bottom: 0.5rem; }
.floating-text { font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.875rem; }

.feature-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.feature-list li { display: flex; align-items: flex-start; gap: 1rem; }
.check-icon {
    width: 24px;
    height: 24px;
    color: var(--accent-color);
    flex-shrink: 0;
    margin-top: 2px;
}

/* === CTA Banner === */
.cta-banner {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    padding: 4rem 0;
}
.cta-banner-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}
.cta-banner-text { color: white; max-width: 600px; }
.cta-banner-text h2 { color: white; margin-bottom: 0.5rem; }
.cta-banner-text p { color: rgba(255,255,255,0.8); margin: 0; }
.cta-banner-action .btn { background: white; color: var(--primary-color); border-color: white; }
.cta-banner-action .btn:hover { background: transparent; color: white; }

/* === Contact Section === */
.relative-box { position: relative; overflow: hidden; }
.contact-decoration-1, .contact-decoration-2 {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-color);
    filter: blur(100px);
    opacity: 0.05;
    z-index: 0;
}
.contact-decoration-1 { width: 400px; height: 400px; top: -100px; left: -100px; }
.contact-decoration-2 { width: 500px; height: 500px; bottom: -200px; right: -100px; background: var(--accent-color); }

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    position: relative;
    z-index: 10;
}

.contact-info-list { margin-top: 3rem; display: flex; flex-direction: column; gap: 1.5rem; }
.info-card { display: flex; align-items: flex-start; gap: 1.5rem; }
.info-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background-color: var(--bg-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}
.info-text h4 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.info-text p { margin-bottom: 0.25rem; font-size: 0.875rem; }
.info-text strong { display: block; font-size: 1.1rem; color: var(--primary-color); }

.contact-form-wrapper {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
}

.contact-form-wrapper h3 { margin-bottom: 2rem; font-size: 1.5rem; }

.form-group { margin-bottom: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

input, select, textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: rgba(255,255,255,0.9);
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(11, 81, 200, 0.1);
}

textarea { resize: vertical; min-height: 120px; }

.form-success-message {
    text-align: center;
    padding: 3rem 1rem;
    color: #10b981; /* green */
}
.form-success-message h4 { color: #10b981; margin: 1rem 0 0.5rem; font-size: 1.25rem; }
.form-success-message p { color: var(--text-muted); }
.hidden { display: none; }

/* === Footer === */
.footer {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding-top: 5rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-logo { color: white; margin-bottom: 1rem; display: inline-block;}
.footer-desc { color: #94a3b8; max-width: 350px; margin-bottom: 1.5rem; }
.social-links { display: flex; gap: 1rem; }
.social-links a {
    width: 40px; height: 40px; border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
}
.social-links a:hover { background-color: var(--primary-color); transform: translateY(-3px); }

.footer-links-col h4 { color: white; margin-bottom: 1.5rem; }
.footer-links-col ul { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links-col a { color: #94a3b8; }
.footer-links-col a:hover { color: var(--accent-color); padding-left: 5px; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1.5rem 0; color: #64748b; font-size: 0.875rem;}
.legal-links { display: flex; gap: 1.5rem; }
.legal-links a:hover { color: white; }

/* === Animations & Utilities === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

.animate-up {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Responsive === */
@media (max-width: 991px) {
    .about-container, .contact-container, .footer-grid { grid-template-columns: 1fr; gap: 3rem; }
    .about-image-box { height: 400px; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .nav-links {
        position: fixed; top: 0; right: -100%;
        width: 80%; max-width: 400px; height: 100vh;
        background-color: var(--bg-card);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: -5px 0 30px rgba(0,0,0,0.1);
        transition: var(--transition);
        z-index: 1000;
    }
    .nav-links.active { right: 0; }
    .nav-links .nav-link { color: var(--secondary-color); font-size: 1.25rem; }
    .nav-links .nav-cta { margin-top: 1rem; }
    
    .mobile-menu-btn.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); background-color: var(--secondary-color); }
    .mobile-menu-btn.active .bar:nth-child(2) { opacity: 0; }
    .mobile-menu-btn.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); background-color: var(--secondary-color); }
    
    .hero-title { font-size: 2.5rem; }
    .cta-banner-container { flex-direction: column; text-align: center; }
    .cta-banner-action { width: 100%; }
    .cta-banner-action .btn { width: 100%; }
}
