/* =========================================
   1. RESET Y BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    /* Fondo oscuro general de la página */
    background: radial-gradient(circle at top left, #0b1535 0, #020617 45%, #000 100%);
    color: #e5e7eb;
}

/* Contenedor principal */
.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 18px 60px;
}

.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
}

/* =========================================
   2. COMPONENTES GLOBALES (Botones)
   ========================================= */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.6);
}

.btn-outline {
    border: 1px solid #2563eb;
    color: #e5e7eb;
    background: transparent;
}

.section {
    padding: 32px 0;
}

.section-title {
    font-size: 22px;
    margin-bottom: 20px;
}

/* =========================================
   3. NAVBAR (Navegación)
   ========================================= */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 24px;
    position: relative;
}

.logo {
    font-weight: 600;
    letter-spacing: 0.12em;
    font-size: 14px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-menu a {
    font-size: 14px;
    text-decoration: none;
    color: #9ca3af;
}

.navbar-menu a:hover {
    color: #ffffff;
}

.btn-nav {
    margin-left: 8px;
}

/* Toggle Menú Móvil (Hamburguesa) */
.nav-toggle, .nav-toggle-label {
    display: none;
}

/* =========================================
   4. SECCIÓN HERO
   ========================================= */
.hero {
    padding: 32px 0 48px;
}

.hero-tagline {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #60a5fa;
    margin-bottom: 14px;
}

.hero-title {
    font-size: 40px;
    line-height: 1.1;
    margin-bottom: 20px;
}

/* =========================================
   5. SECCIÓN SOLUCIONES (Cards)
   ========================================= */
.card-grid {
    display: grid;
    gap: 16px;
}

.card {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 20px;
    padding: 18px 20px;
    border: 1px solid rgba(37, 99, 235, 0.5);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.7);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 60px rgba(37, 99, 235, 0.55);
    border-color: rgba(59, 130, 246, 0.9);
}

.card h3 {
    margin-bottom: 6px;
    font-size: 16px;
}

.card p {
    color: #9ca3af;
    font-size: 14px;
}

.card-icon {
    margin-bottom: 10px;
}

.card-icon .material-symbols-rounded {
    font-size: 30px;
    vertical-align: middle;
    color: #60a5fa;
}

/* =========================================
   6. SECCIÓN ACERCA DE (About)
   ========================================= */
.section-split {
    display: grid;
    gap: 24px;
}

.section-text p {
    margin-bottom: 10px;
    color: #9ca3af;
}

/* Gráfico decorativo (Cubo) */
.section-graphic {
    display: flex;
    justify-content: center;
}

.cube-placeholder {
    width: 220px;
    height: 220px;
    border-radius: 24px;
    border: 1px solid rgba(37, 99, 235, 0.5);
    position: relative;
    box-shadow: 0 0 50px rgba(37, 99, 235, 0.6);
}

.cube-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #60a5fa;
    position: absolute;
}
.cube-dot:nth-child(1) { top: 20px; left: 30px; }
.cube-dot:nth-child(2) { top: 40px; right: 40px; }
.cube-dot:nth-child(3) { bottom: 40px; left: 50px; }
.cube-dot:nth-child(4) { bottom: 25px; right: 25px; }

/* =========================================
   SECCIÓN FEATURES (Funciones Clave)
   ========================================= */

/* Cabecera centrada de la sección */
.section-header {
    margin-bottom: 48px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-subtitle {
    color: #9ca3af;
    font-size: 16px;
    line-height: 1.6;
    margin-top: 16px;
}

.feature-card {
    text-align: center; 
    padding: 32px 24px; 
    background: rgba(15, 23, 42, 0.6); 
    display: flex;
    flex-direction: column;
    align-items: center; 
    height: 100%; 
}

.feature-card h3 {
    margin-top: 12px;
    margin-bottom: 12px;
    font-size: 18px;
    color: #fff;
}

.feature-card p {
    font-size: 14px;
    line-height: 1.6;
    color: #9ca3af;
}


.feature-card .card-icon .material-symbols-rounded {
    font-size: 40px; 
    margin-bottom: 8px;
    color: #3b82f6; 
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


@media (min-width: 600px) and (max-width: 1023px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================
   7. SECCIÓN CASOS DE ÉXITO (Nuevo)
   ========================================= */
.case-studies-section {
    position: relative;
    margin-left: -18px;  /* Romper márgenes para full-width */
    margin-right: -18px;
    padding: 60px 24px;
    border-radius: 0;
    overflow: hidden;
    color: #fff;
}

.case-studies-section .section-title {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 40px;
    font-size: 28px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* --- FONDO E IMAGEN -- */
.case-studies-bg {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; 
    background-image: url('../img/bg-casestudies.jpg');
    background-size: cover;
    background-position: center; 
    z-index: -2;
}

.case-studies-bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Degradado azul */
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(15, 23, 66, 0.92));
    z-index: -1;
    backdrop-filter: blur(2px);
}

.case-studies-container {
    max-width: 1200px;
    margin: 0 auto;
}

.center-text {
    text-align: center;
}

/* --- SLIDER / CARRUSEL --- */
.slider-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slider-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px;
    padding-top: 10px;
    width: 100%;
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}

.slider-track::-webkit-scrollbar {
    display: none; 
}

.slider-controls {
    display: flex;
    justify-content: center; 
    align-items: center;
    gap: 20px; 
    margin-top: 10px; 
}

.slider-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    margin: 0; 
}


.testimonial-card {
    flex: 0 0 100%; /* 100% ancho en móvil */
    scroll-snap-align: center;
    background-color: #1d4ed8;
    border-radius: 24px;
    padding: 30px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.quote {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
    font-style: italic;
    opacity: 0.95;
}

/* Autor */
.author-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 16px;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-info strong { font-size: 15px; font-weight: 700; }
.author-info span { font-size: 12px; opacity: 0.8; margin-top: 2px; }

.author-img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Botones del Slider */
.slider-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    flex-shrink: 0;
}

.slider-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: scale(1.1);
}

.prev-btn { margin-right: 15px; }
.next-btn { margin-left: 15px; }

/* =========================================
   8. SECCIÓN CONTACTO
   ========================================= */
.section-contact p {
    color: #9ca3af;
    margin-bottom: 14px;
}

.contact-form {
    display: grid;
    gap: 10px;
    max-width: 420px;
}

.contact-form input,
.contact-form textarea {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 12px;
    border: 1px solid rgba(55, 65, 81, 0.9);
    padding: 10px 12px;
    color: #e5e7eb;
    font-size: 14px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #2563eb;
}

/* =========================================
   9. FOOTER
   ========================================= */
.footer {
    border-top: 1px solid rgba(31, 41, 55, 0.9);
    margin-top: 32px;
    padding-top: 12px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    color: #6b7280;
    flex-wrap: wrap;
    gap: 8px;
}

/* =========================================
   10. ANIMACIONES
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-card {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
}

.card-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* =========================================
   11.  RESPONSIVE
   ========================================= */

/* --- TABLETS Y DESKTOP Mayores a 768px --- */
@media (min-width: 769px) {
    .card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #solutions .card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .section-split {
        grid-template-columns: 1.2fr 1fr;
        align-items: center;
    }


    .testimonial-card {
        flex: 0 0 350px;
    }
    .slider-track {
        justify-content: flex-start;
    }


    .case-studies-section .section-title {
        font-size: 36px;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
    .case-studies-section {
        margin-left: -18px;
        margin-right: -18px;
        padding: 80px 40px;
    }
}

/* --- MÓVILES (Menores a 768px) --- */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 16px 14px 40px;
    }

    .hero-title {
        font-size: 30px;
    }


    .navbar-menu {
        position: absolute;
        top: 50px;
        right: 0;
        left: 0;
        background: rgba(15, 23, 42, 0.98);
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px 16px;
        gap: 10px;
        border-radius: 16px;
        border: 1px solid rgba(31, 41, 55, 0.9);
        display: none;
        z-index: 20;
    }

    .navbar-menu a {
        width: 100%;
    }

    .btn-nav {
        align-self: stretch;
        text-align: center;
    }


    .nav-toggle-label {
        display: block;
        cursor: pointer;
        width: 26px;
        height: 20px;
        position: relative;
    }

    .nav-toggle-label span,
    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        position: absolute;
        height: 2px;
        width: 100%;
        background: #e5e7eb;
        border-radius: 999px;
        transition: transform 0.25s ease, top 0.25s ease, opacity 0.25s ease;
        content: "";
    }

    .nav-toggle-label span { top: 9px; }
    .nav-toggle-label span::before { top: -7px; }
    .nav-toggle-label span::after { top: 7px; }


    .nav-toggle:checked + .nav-toggle-label span { transform: rotate(45deg); }
    .nav-toggle:checked + .nav-toggle-label span::before { top: 0; transform: rotate(0deg); }
    .nav-toggle:checked + .nav-toggle-label span::after { top: 0; transform: rotate(90deg); }
    .nav-toggle:checked ~ .navbar-menu { display: flex; }


    .card-grid { grid-template-columns: 1fr; }
    .section-split { grid-template-columns: 1fr; }


    .slider-wrapper { position: relative; }
    
    .slider-btn { 
        display: flex; 
    } 
    
    .testimonial-card { flex: 0 0 85%; }
}