/* --- Variables y Estilos Globales --- */
:root {
    --primary-color: #0F172A; /* Azul oscuro casi negro */
    --secondary-color: #1E293B;
    --accent-color: #10B981; /* Verde esmeralda vibrante */
    --accent-bright: #34D399;
    --light-bg: #F8FAFC;
    --light-text: #E2E8F0;
    --dark-text: #334155;
    --font-family: 'Poppins', sans-serif;
    --transition-speed: 0.4s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--light-bg);
    color: var(--dark-text);
    overflow-x: hidden;
    cursor: none; /* Ocultar cursor por defecto */
}

/* --- Cursor Personalizado --- */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: all 0.15s ease;
    z-index: 9999;
    mix-blend-mode: difference;
}
.cursor.hover {
    transform: translate(-50%, -50%) scale(2);
    background-color: rgba(16, 185, 129, 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 50px;
    position: relative;
    color: var(--primary-color);
}

h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.section {
    padding: 100px 0;
    position: relative;
}

.bg-dark {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.bg-dark h2 {
    color: var(--light-text);
}

.cta-button, .magnetic-btn {
    display: inline-block;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 15px 35px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: all var(--transition-speed) cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.cta-button:hover, .magnetic-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
    background: var(--accent-bright);
}

/* --- Header con Menú Móvil --- */
#main-header {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    transition: transform 0.3s ease;
}
.logo:hover img { transform: scale(1.05); }

.menu-toggle {
    display: none; /* Oculto en desktop */
    flex-direction: column;
    cursor: pointer;
}
.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--light-text);
    margin: 3px 0;
    transition: 0.3s;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    text-decoration: none;
    color: var(--light-text);
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    padding: 5px 0;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

.btn-contact {
    background-color: var(--accent-color);
    color: var(--primary-color) !important;
    padding: 8px 20px !important;
    border-radius: 25px;
    transition: all 0.3s;
}
.btn-contact:hover { background-color: var(--accent-bright); }

/* --- Sección Hero con Paralaje Avanzado --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--light-text);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 120%;
    background: url('https://images.unsplash.com/photo-1556742049-0cfed4f6a45d?q=80&w=1974&auto=format&fit=crop') no-repeat center center/cover;
    will-change: transform;
    z-index: -2;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.8));
    z-index: -1;
}

.hero-content { z-index: 1; }

.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .highlight { color: var(--accent-color); }

.hero-subtitle {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto 40px auto;
    font-weight: 300;
    opacity: 0.8;
}

/* --- Sección de Estadísticas --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}
.stat-item {
    padding: 20px;
}
.stat-item .counter {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent-color);
    display: inline-block;
}
.stat-item .counter-suffix {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-color);
}
.stat-item p {
    margin-top: 10px;
    font-size: 1.1rem;
    color: var(--dark-text);
    font-weight: 600;
}

/* --- Grids de Servicios --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}
.service-card {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid #e2e8f0;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: var(--accent-color);
}
.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}
.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

/* --- Formulario de Contacto --- */
.contact-form {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}
.form-group { display: flex; flex-direction: column; }
.form-group.full-width { grid-column: 1 / -1; }
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 18px;
    border: 2px solid #334155;
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: all 0.3s;
    background-color: rgba(255,255,255,0.05);
    color: var(--light-text);
}
.contact-form input::placeholder { color: #94a3b8; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: rgba(255,255,255,0.1);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}
.contact-form button {
    grid-column: 1 / -1;
    justify-self: center;
    cursor: pointer;
    border: none;
    margin-top: 20px;
}

/* --- Footer --- */
footer {
    background-color: var(--secondary-color);
    color: var(--light-text);
    text-align: center;
    padding: 40px 0;
    font-size: 0.9rem;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    h2 { font-size: 2.4rem; }
    .hero-title { font-size: 3.5rem; }
    .hero-subtitle { font-size: 1.1rem; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .main-nav {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--primary-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 20px 0;
    }
    .main-nav.active { left: 0; }
    .main-nav ul { flex-direction: column; }
    .main-nav ul li { margin: 15px 0; }

    .hero-title { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-form { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .hero-title { font-size: 2rem; }
    .stats-grid { grid-template-columns: 1fr; }
}
/* --- Estilos para la Sección del Equipo --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.team-member-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid #e2e8f0;
}

.team-member-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.member-photo {
    height: 250px;
    background-size: cover;
    background-position: center;
    background-color: var(--secondary-color);
}

.member-info {
    padding: 30px 25px;
}

.member-info h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.member-position {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.member-bio {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.6;
}
.message {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}
.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}