/* Importar fuente Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Variables de color */
:root {
    --primary-orange: #f37522;
    --text-white: #ffffff;
    --text-gray: #aeb6c4;
    --bg-dark-left: #0c1a24;
    --bg-dark-right: #2d1033;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    /* Degradado de fondo */
    background: linear-gradient(135deg, var(--bg-dark-left) 0%, var(--bg-dark-right) 100%);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;

    /* El bloqueo absoluto del scroll horizontal */
    overflow-x: hidden;
    width: 100%; /* Cambiamos 100vw por 100% */
    max-width: 100%;

/* Header & Navegación */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    letter-spacing: -1px;
}

/* --- Contenedor de la L usando CSS Grid --- */
.logo-dots {
    display: grid;
    grid-template-columns: 14px 14px; 
    grid-template-rows: 14px 14px;   
    gap: 3px;                       
    margin-left: 6px;              
    margin-bottom: 4px;              
}

/* Estilo general para todos los cuadritos */
.logo-dots .dot {
    width: 14px;
    height: 14px;
    border-radius: 2px;
}

/* --- Posicionamiento y colores de cada cuadrito --- */
.dot.top-left {
    grid-column: 1; 
    grid-row: 1;   
    background-color: var(--primary-orange); 
}

.dot.bottom-left {
    grid-column: 1;
    grid-row: 2;   
    background-color: var(--primary-orange)
}

.dot.bottom-right {
    grid-column: 2; 
    grid-row: 2;    
    background-color: var(--primary-orange)
}
nav a {
    color: var(--text-gray);
    text-decoration: none;
    margin-left: 2.5rem;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s;
    position: relative; /* ¡Nuevo! Necesario para la línea animada */
}

nav a.active, nav a:hover {
    color: var(--primary-orange);
}

/* --- NUEVO: Línea animada debajo del enlace --- */
nav a::after {
    content: '';
    position: absolute;
    width: 0; /* Empieza invisible */
    height: 2px;
    bottom: -6px; /* Separación debajo del texto */
    left: 0;
    background-color: var(--primary-orange);
    transition: width 0.3s ease-in-out; /* Animación suave */
}

/* La línea crece al 100% cuando pasas el mouse o está activa */
nav a.active::after, nav a:hover::after {
    width: 100%;
}
/* Sección Hero */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 5%;
    gap: 2rem;
}

.hero-content {
    flex: 1;
    max-width: 550px;
}

.tagline {
    color: var(--primary-orange);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

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

.tech-icons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: var(--text-gray);
    align-items: center;
}

.tech-icons i {
    opacity: 0.8;
}

.tech-icons .icon-text {
    font-size: 1.5rem;
    font-weight: 700;
    opacity: 0.8;
}

.description {
    color: var(--text-gray);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

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

.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-orange);
    color: white;
    border: 2px solid var(--primary-orange);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-orange);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid var(--text-gray);
}

.btn-secondary:hover {
    border-color: white;
}

.hero-image {
    flex: 1.2;
    display: flex;
    justify-content: flex-end; /* Alinea la imagen a la derecha */
    align-items: center;       /* Centra la imagen verticalmente */
}

/* Control absoluto del tamaño de tu imagen */
.mockup-img {
    width: 100%;
    max-width: 1500px;
    height: auto;     
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
    transform: scale(1.3); 
}

/* Botón WhatsApp */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    left: 40px; /* Alineado a la izquierda según la imagen */
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    z-index: 1000;
    text-decoration: none;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 14px rgba(37, 211, 102, 0.4);
}




/* Botón de Menú Móvil (Oculto en PC) */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.8rem;
    cursor: pointer;
}

/* --- Media Queries (Responsividad) --- */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
    }
    .hero-content {
        max-width: 100%;
    }
    .tech-icons {
        justify-content: center;
    }
    .buttons {
        justify-content: center;
    }
    header {
        flex-direction: row; /* Mantiene logo a la izquierda y botón a la derecha */
        position: relative; /* Clave para anclar el menú desplegable */
    }
    .mobile-menu-btn {
        display: unset; /* Hace visible el botón de hamburguesa */
    }
    nav a {
        margin: 0;
        font-size: 1.2rem;
    }

    /* Esta clase se activará con JavaScript */
    nav.active {
        display: flex; 
    }
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-dark-left); /* Usa tu color de fondo oscuro */
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 2rem;
        display: none; /* Oculto por defecto */
        z-index: 999;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .whatsapp-btn {
        left: 20px;
        bottom: 20px;
    }
}

@media (max-width: 600px) {
    h1 { font-size: 2.2rem; }
  
    .buttons {
        flex-direction: column;
    }
    .btn {
        justify-content: center;
    }
}


/* --- Sección de Servicios --- */
.services-section {
   padding: 5rem 5% 5rem; 
    min-height: 5vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Cambiamos 'center' por 'flex-start' */
}

/* Estilos para el nuevo título */
.services-header {
    text-align: center;
    margin-bottom: 1rem;
    width: 100%;
}

.services-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem; /* Ajustado un poco para que se vea más compacto como en tu imagen */
    max-width: 1300px;
    width: 100%;
}

/* Diseño de la Tarjeta (Actualizado a fondo sólido oscuro) */
.service-card {
    background: rgba(255, 255, 255, 0.03); /* Fondo casi transparente */
    border: 1px solid rgba(255, 255, 255, 0.15); /* Borde sutil claro */
    backdrop-filter: blur(12px); /* Efecto de desenfoque del fondo (Glassmorphism real) */
    -webkit-backdrop-filter: blur(12px); 
    border-radius: 16px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2); /* Sombra suave para separar el cristal del fondo */
}
/* Efecto Hover en la Tarjeta */
.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(243, 117, 34, 0.6); /* Borde naranja semitransparente */
    box-shadow: 0 10px 30px rgba(243, 117, 34, 0.1); /* Ligero resplandor naranja */
}

/* Resto de estilos internos de la tarjeta (se mantienen iguales) */
.icon-wrapper {
    font-size: 2rem;
    color: var(--primary-orange);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-white);
}

.service-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.details-link {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.3s ease;
}

.details-link:hover {
    gap: 0.8rem;
}


/* --- Animación de Scroll (Estado inicial) --- */
.reveal {
    opacity: 0;
    transform: translateY(60px); /* Empieza 60px más abajo */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Estado cuando la clase es activada por JS */
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsividad para tablets y móviles --- */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr); /* Pasa a 2 columnas */
    }

    .mockup-img {
        transform: scale(1); /* Quitamos el zoom extra en celulares */
        width: 90%; /* Le damos un margen de seguridad */
        margin: 0 auto; /* La centramos */
    }
}

@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr; /* Pasa a 1 columna en celulares */
    }
    .service-card.reveal {
        /* Removemos el delay en móviles para que no tarden tanto en aparecer una debajo de la otra */
        transition-delay: 0s !important; 
    }
}


/* --- Sección de Proyectos --- */

/* Estilos para los enlaces de las tarjetas de proyectos */
.project-link {
    text-decoration: none; /* Quita el subrayado */
    color: inherit;        /* Mantiene el color original de tu texto (blanco/gris) */
    display: block;        /* Hace que el enlace cubra todo el espacio de la tarjeta */
}

.projects-section {
    padding: 6rem 5% 4rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.projects-container {
    display: flex;
    gap: 4rem;
    max-width: 1200px;
    width: 100%;
    align-items: center;
}

/* Columna Izquierda */
.projects-left {
    flex: 1; /* Ocupa 1 parte del espacio */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.projects-left h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 2rem;
}

.phone-mockup {
    width: 100%;
    max-width: 600px; /* Tamaño máximo para que el celular no se vea gigante */
    height: auto;
    filter: drop-shadow(-10px 20px 40px rgba(0, 0, 0, 0.5));
    transition: transform 0.5s ease;
}

.phone-mockup:hover {
    transform: translateY(-10px); /* Efecto de flotación leve */
}

/* Columna Derecha */
.projects-right {
    flex: 1.8; /* Ocupa casi el doble de espacio que la izquierda */
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas de tarjetas */
    gap: 1.5rem;
}

/* Tarjeta de Proyecto */
.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    overflow: hidden; /* Corta la imagen para que respete los bordes redondeados */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-orange);
    box-shadow: 0 10px 30px rgba(243, 117, 34, 0.1);
}

.project-img {
    width: 100%;
    height: 180px; /* Altura fija para uniformidad */
    object-fit: cover; /* Asegura que la imagen llene el espacio sin deformarse */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.project-info {
    padding: 1.5rem;
    flex-grow: 1;
}

.project-info h3 {
    color: var(--primary-orange);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0;
}


/* --- Responsividad para Proyectos (Móviles y Tablets) --- */
@media (max-width: 992px) {
    .projects-container {
        flex-direction: column; /* Apila izquierda y derecha verticalmente */
        text-align: center;
        gap: 2rem;
    }

    .projects-left {
        align-items: center; /* Centra el título y el celular */
    }

    .projects-right {
        width: 100%;
    }

    .phone-mockup {
        display: none;
    }
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr; /* Pasa las tarjetas a 1 sola columna en teléfonos */
        gap: 1.5rem;
    }
}
/* --- Sección Contáctanos --- */
.contact-section {
    padding: 6rem 5% 6rem;
    min-height: 80vh; /* No necesita ocupar toda la pantalla */
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-container {
    display: flex;
    gap: 4rem;
    max-width: 1200px;
    width: 100%;
    align-items: flex-start; /* Alinea arriba */
}

/* --- Columna Izquierda (Formulario) --- */
.contact-form-wrapper {
    flex: 1.2;
}

.contact-form-wrapper h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Dos columnas para los inputs pequeños */
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-white);
}

/* Estilos para Inputs y Textarea */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borde sutil */
    border-radius: 8px;
    color: var(--text-white);
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

/* Placeholder (texto gris dentro del input) */
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(174, 182, 196, 0.5); /* Color gris semitransparente */
}

/* Efecto al hacer clic en el input (Focus) */
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-orange);
    background: rgba(255, 255, 255, 0.05); /* Se ilumina un poco el fondo */
}

/* Botón Enviar */
.submit-btn {
    background-color: var(--primary-orange);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 0.5rem;
}

.submit-btn:hover {
    background-color: #d9621b; /* Naranja un poco más oscuro */
    transform: translateY(-2px);
}

/* --- Columna Derecha (Texto) --- */
.contact-text-wrapper {
    flex: 1;
    padding-top: 5rem; /* Lo baja un poco para alinearlo visualmente con el formulario */
}

.contact-tagline {
    color: var(--primary-orange);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-text-wrapper h3 {
    font-size: 2rem;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-white);
}

.contact-text-wrapper p {
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.contact-email {
    font-size: 1.1rem;
    color: var(--text-white) !important; /* Forza el color blanco para resaltar */
}

/* Mensaje de estado (éxito/error) oculto por defecto */
.form-status {
    margin-top: 1rem;
    font-size: 0.95rem;
    display: none; /* Se mostrará con JS */
    padding: 10px;
    border-radius: 5px;
}
.form-status.success {
    display: block;
    background-color: rgba(37, 211, 102, 0.2);
    color: #25D366;
    border: 1px solid #25D366;
}
.form-status.error {
    display: block;
    background-color: rgba(255, 0, 0, 0.1);
    color: #ff4d4d;
    border: 1px solid #ff4d4d;
}

/* --- Media Queries --- */
@media (max-width: 992px) {
   .contact-container {
        flex-direction: column-reverse; /* Pone el texto arriba y el formulario abajo */
        gap: 3rem;
        align-items: stretch; /* ¡Esta es la magia que estira todo al 100%! */
    }
    
    .contact-form-wrapper,
    .contact-text-wrapper {
        width: 100%; /* Fuerza a las columnas a ocupar todo el ancho */
    }
    
    .contact-text-wrapper {
        padding-top: 0;
        text-align: center;
    }
    
    .contact-text-wrapper {
        padding-top: 0;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr; /* Los inputs pequeños pasan a ocupar todo el ancho */
        gap: 1rem;
    }
}


/* --- Estilos del Footer --- */
.main-footer {
    background-color: #080d12; /* Un tono más oscuro que el fondo para dar cierre */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 5rem 5% 2rem;
    color: var(--text-white);
}

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

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

/* Marca en el Footer */
.footer-brand .logo {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* Enlaces Legales */
.footer-links h4,
.footer-social h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-orange);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links ul li a:hover {
    color: var(--primary-orange);
}

/* Iconos Sociales */
.social-icons {
    display: flex;
    gap: 1.2rem;
}

.social-icons a {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.social-icons a:hover {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    transform: translateY(-4px);
    box-shadow: 0 5px 15px rgba(243, 117, 34, 0.3);
}

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

.footer-bottom p {
    color: rgba(174, 182, 196, 0.5);
    font-size: 0.85rem;
}

/* --- Responsividad del Footer --- */
@media (max-width: 992px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .footer-brand .logo {
        justify-content: center;
    }

    .social-icons {
        justify-content: center;
    }

    .footer-links ul li a {
        justify-content: center;
    }
}


.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.cookie-banner p { color: white; font-size: 0.85rem; margin: 0; }
.cookie-banner a { color: var(--primary-orange); text-decoration: underline; }
.cookie-banner button {
    background: var(--primary-orange);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

/* Evita que el widget de seguridad empuje la pantalla en móviles */
.cf-turnstile {
    max-width: 100%;
    overflow: hidden;
}
}