/* === Reset y Variables === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066ff;
    --secondary-color: #001a66;
    --accent-color: #00d4ff;
    --accent-purple: #7c3aed;
    --text-dark: #0f1419;
    --text-light: #6b7280;
    --bg-light: #f0f4f9;
    --bg-dark: #0d1117;
    --bg-white: #ffffff;
    --border-color: #d0d9e8;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --shadow-sm: 0 1px 3px 0 rgba(0, 20, 102, 0.08);
    --shadow-md: 0 4px 12px 0 rgba(0, 20, 102, 0.12);
    --shadow-lg: 0 10px 25px 0 rgba(0, 20, 102, 0.15);
    --shadow-xl: 0 20px 40px 0 rgba(0, 20, 102, 0.2);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-top: 80px; /* compensa header fijo */
}

/* === Header === */
header {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* --- Nav --- */
nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
}

.logo .data {
    color: var(--accent-color);
    font-weight: 700;
}

.logo .qia {
    background: linear-gradient(135deg, #f0d972 0%, #8a53e7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-menu a:hover {
    background: rgba(0, 102, 255, 0.1);
    border-bottom: 2px solid var(--accent-color);
    transform: translateY(-2px);
}

/* === Hero Section === */
.hero {
    background: linear-gradient(135deg, #0066ff 0%, #001a66 50%, #7c3aed 100%);
    color: white;
    padding: 140px 5% 100px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: rgba(124, 58, 237, 0.05);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

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

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

/* --- CTA Buttons --- */
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-button.primary {
    background: white;
    color: var(--primary-color);
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cta-button.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-button.secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* === Secciones === */
section {
    padding: 90px 5%;
}

/* --- Servicios --- */
.services {
    background: var();
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.3rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    animation: float 8s ease-in-out infinite;
}

/* --- Tarjetas de servicio --- */
.service-card {
    background: var(--bg-white);
    padding: 2.3rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-align: center;
    
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    /* animation: float 3s ease-in-out infinite; */
}

.service-icon-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* === About / Why Us / Contact === */
.about,
.why-us,
.contact {
    background: var(--bg-white);
    padding: 80px 5% 70px;
}

/* Opcional: reducir ligeramente campos y botón */
.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    font-size: 0.95rem;
}
.about-content h2,
.contact-header h2 {
    font-size: 1.6rem;
}

.about-content p,
.contact-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* === Footer === */
footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 5% 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
}

/* === Responsivo === */
@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex; }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
    }

    .nav-menu.active { left: 0; }

    .hero {
        padding: 120px 5% 80px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .contact-content {
        display: grid;
        grid-template-columns: 1.1fr 0.9fr; /* equilibra mejor formulario e info */
        gap: 2.5rem; /* antes 3rem */
        align-items: start;
    }
}

/* === About Section === */
.about {
    padding: 100px 5%;
    background: var(--bg-white);
}

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

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.about-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-stats {
display: flex;
    justify-content: center;   /* centra horizontalmente */
    align-items: center;       /* centra verticalmente dentro del grid */
    gap: 1.5rem;               /* separación entre los cuadros */
    flex-wrap: wrap;           /* permite que se ajusten en pantallas pequeñas */
    margin: 3rem auto;
    max-width: 800px;
}

.stat {
    flex: 0 1 250px;
    text-align: center;
    padding: 1.2rem;
    background: var(--bg-light);
    border-radius: 10px;
}

.stat h3 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-light);
    font-size: 1rem;
}

/* === Contact Section === */
.contact {
    padding: 80px 5% 70px;
    background: var(--bg-white);
}

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

.contact-header {
    text-align: center;
    margin-bottom: 1.3rem;
}

.contact-header h2 {
    font-size: 2.0rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.contact-header p {
    font-size: 1.0rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem; /* antes 3rem */
    align-items: start;
}

/* Restauro estructura original de formulario y contacto */
.contact-form-container h3,
.contact-info-container h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.contact-form-container p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-message {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    font-weight: 500;
    animation: slideInUp 0.4s ease;
}

.form-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border-left: 4px solid #10b981;
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.submit-btn {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-purple) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.contact-info-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Adaptación móvil */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
}

/* === Restaurar sección "¿Por Qué Elegirnos?" (.why-us) === */
.why-us {
    padding: 100px 5%;
    background: var(--bg-light);
}

.why-us .section-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    align-items: stretch;
}

.why-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.8rem;
    max-width: 300px;         /* controla el ancho máximo */
    margin: 0 auto;  
}

.why-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.why-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.8rem;
    line-height: 1;
}

.why-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.why-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: auto; /* empuja el texto hacia abajo si la tarjeta crece */
}

/* Asegurar consistencia en móviles */
@media (max-width: 768px) {
    .why-us {
        padding: 70px 5%;
    }
    .why-icon {
        font-size: 2.5rem;
    }
    .why-card {
        padding: 1.5rem;
    }
}

/* === Restaurar movimiento flotante de los slices === */
.floating {
    animation: floating 3.5s ease-in-out infinite;
    will-change: transform;
}

/* Animación flotante suave */
@keyframes floating {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* === Animaciones Avanzadas === */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 102, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(124, 58, 237, 0.5);
    }
}

/* Animaciones para tarjetas */
.service-card {
    animation: fadeIn 0.6s ease-out forwards;
}

.why-card {
    animation: fadeIn 0.6s ease-out forwards;
}

.stat {
    animation: fadeIn 0.6s ease-out forwards;
}
