/* ======== IMPORTACIÓN DE FUENTE "POP" ======== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* ======== VARIABLES GLOBALES Y RESETEO ======== */
:root {
    /* PALETA DARK MODE "LLAMATIVA" */
    --fondo-oscuro: #1b1b1b;       /* Negro casi total para el body */
    --fondo-tarjeta: #2c2c2c;     /* Un gris oscuro para las tarjetas */
    --texto-claro: #f1f1f1;       /* Blanco (no puro) para texto */
    --texto-gris: #aaa;           /* Gris para párrafos y subtítulos */
    --acento-vibrante: #00d4ff;   /* Azul/Cian "Neón" */
    --acento-vibrante-oscuro: #00a9cc;
    
    /* Sombras "Glow" */
    --sombra-glow-suave: 0 0 15px rgba(0, 212, 255, 0.1), 0 0 5px rgba(0, 212, 255, 0.08);
    --sombra-glow-fuerte: 0 0 25px rgba(0, 212, 255, 0.25), 0 0 10px rgba(0, 212, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
}

/* ANIMACIÓN DE APARICIÓN */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

body {
    font-family: 'Poppins', sans-serif; 
    line-height: 1.7; 
    color: var(--texto-gris); /* El texto por defecto es gris claro */
    background-color: var(--fondo-oscuro); /* FONDO OSCURO */
    -webkit-font-smoothing: antialiased; 
}

.contenedor {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto; 
}

/* ======== CABECERA "STICKY" DARK MODE ======== */
.cabecera {
    background-color: rgba(27, 27, 27, 0.85); /* Fondo oscuro con transparencia */
    padding: 1rem 0;
    border-bottom: 1px solid #444; /* Borde sutil */
    
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px); /* Efecto "vidrio esmerilado" */
}

.cabecera .contenedor {
    display: flex;
    justify-content: space-between; 
    align-items: center;
}

.logo-imagen {
    height: 80px;  
    width: auto;   
    display: block;
}

.navegacion a {
    margin-left: 1.5rem; 
    text-decoration: none;
    color: var(--texto-claro);
    font-weight: 600;
    transition: color 0.3s ease; 
}

.navegacion a:hover {
    color: var(--acento-vibrante);
}

/* ======== SECCIÓN HERO CON GRADIENTE "LLAMATIVO" ======== */
.hero {
    /* Gradiente con el nuevo acento */
    background: linear-gradient(135deg, var(--acento-vibrante) 0%, var(--acento-vibrante-oscuro) 100%);
    color: #000; /* Texto oscuro para el fondo brillante */
    padding: 6rem 0; 
    text-align: center;
}

.hero h2 {
    font-size: 2.8rem; 
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--fondo-oscuro); /* Título oscuro */
}

.hero p {
    font-size: 1.125rem; 
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
    color: #333; /* Párrafo oscuro */
}

/* ======== BOTONES "VIVOS" Y "GLOW" ======== */
.btn-principal,
.btn-secundario {
    padding: 0.8rem 2.2rem; 
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px; 
    transition: all 0.3s ease-in-out; 
    display: inline-block;
    border: 2px solid var(--acento-vibrante);
    box-shadow: var(--sombra-glow-suave);
}

.btn-principal {
    background-color: var(--acento-vibrante);
    color: var(--fondo-oscuro);
}

.btn-principal:hover {
    background-color: var(--fondo-oscuro);
    color: var(--acento-vibrante);
    transform: translateY(-3px); 
    box-shadow: var(--sombra-glow-fuerte);
}

.btn-secundario {
    background-color: transparent;
    color: var(--acento-vibrante);
}

.btn-secundario:hover {
    background-color: var(--acento-vibrante);
    color: var(--fondo-oscuro);
    transform: translateY(-3px);
    box-shadow: var(--sombra-glow-fuerte);
}

/* ======== SECCIONES GENERALES DARK MODE ======== */
.seccion-servicios,
.seccion-portafolio,
.seccion-precios,
.seccion-contacto,
.seccion-portafolio-pagina,
.seccion-sobre-mi {
    padding: 5rem 0; 
    text-align: center;
    overflow: hidden; /* Para las animaciones */
}

/* Alternamos fondos oscuros */
.seccion-servicios,
.seccion-portafolio,
.seccion-contacto,
.seccion-portafolio-pagina {
    background-color: var(--fondo-oscuro);
}

.seccion-precios,
.seccion-sobre-mi {
    background-color: var(--fondo-tarjeta); /* Un gris un poco más claro */
}

h3 {
    font-size: 2.2rem; 
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--texto-claro); /* Títulos en blanco */
    animation: fadeIn 1s ease-out;
}

.subtitulo-precios,
.subtitulo-portafolio,
.seccion-contacto p {
    font-size: 1.125rem; 
    margin-bottom: 3rem; 
    color: var(--texto-gris);
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeIn 1s ease-out 0.2s;
    animation-fill-mode: backwards;
}

/* ======== TARJETAS DARK MODE (Servicios, Precios, Proyectos) ======== */
.tarjeta-servicio,
.tarjeta-precio,
.tarjeta-proyecto {
    background-color: var(--fondo-tarjeta); /* Fondo de tarjeta */
    padding: 2.5rem; /* Más padding */
    border: 1px solid #444; /* Borde sutil */
    border-radius: 12px; 
    box-shadow: none; /* Sombra sutil por defecto */
    text-align: left;
    transition: all 0.3s ease-in-out; 
    animation: fadeIn 1s ease-out 0.4s;
    animation-fill-mode: backwards;
}

.tarjeta-servicio:hover,
.tarjeta-precio:hover,
.tarjeta-proyecto:hover {
    transform: translateY(-8px); 
    border-color: var(--acento-vibrante);
    box-shadow: var(--sombra-glow-fuerte); /* Efecto "Glow" al pasar el mouse */
}

.tarjeta-servicio h4,
.tarjeta-precio h4,
.tarjeta-proyecto h4 {
    font-size: 1.4rem; 
    color: var(--acento-vibrante); /* Títulos de tarjeta en color "neón" */
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* ======== GRILLA DE SERVICIOS ======== */
.grilla-servicios {
    display: flex;
    justify-content: space-between;
    gap: 2rem; 
}

.tarjeta-servicio {
    background-color: var(--fondo-oscuro); /* Las de servicio, más oscuras */
}


/* ======== GRILLA DE PORTAFOLIO ======== */
.grilla-portafolio {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    flex-wrap: wrap; 
}

.tarjeta-proyecto {
    flex-basis: 45%; 
    overflow: hidden; 
}

.tarjeta-proyecto .imagen-proyecto {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: top center;
    border-radius: 8px; 
    margin-bottom: 1.5rem;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.tarjeta-proyecto:hover .imagen-proyecto {
    opacity: 1;
}

.tarjeta-proyecto h4,
.tarjeta-proyecto p {
    padding: 0 0.5rem;
}

.tarjeta-proyecto p {
    margin-bottom: 1.5rem;
}

.tarjeta-proyecto .btn-secundario {
    margin: 0 0.5rem 0.5rem 0.5rem; 
    width: auto;
}

/* ======== SECCIÓN PRECIOS (YA TIENE LA NUEVA TARJETA) ======== */
.grilla-precios {
    display: flex;
    justify-content: center; 
    gap: 2rem; 
    flex-wrap: wrap; 
    align-items: stretch; 
}

.tarjeta-precio {
    flex-basis: 320px; 
    flex-grow: 1; 
    max-width: 380px; 
    display: flex;
    flex-direction: column;
    position: relative; 
    overflow: hidden; 
}

.ideal-para,
.tarjeta-precio .ideal-para {
    font-size: 0.95rem;
    color: var(--texto-gris);
    margin-bottom: 1.5rem;
    min-height: 60px; 
}

.lista-caracteristicas {
    list-style: none; 
    padding-left: 0;
    margin-bottom: 2rem;
}

.lista-caracteristicas li {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--texto-claro);
}

.lista-caracteristicas li::before {
    content: ''; 
}

.precio-paquete {
    font-size: 2rem; 
    font-weight: 700;
    color: var(--acento-vibrante);
    margin-bottom: 1.5rem;
    margin-top: 1rem;
}

.precio-paquete span {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    color: var(--texto-gris);
}

.tarjeta-precio .btn-secundario {
    margin-top: auto; 
    text-align: center;
    width: 100%; 
}

/* --- Paquete Recomendado "Llamativo" --- */
.tarjeta-precio.recomendado {
    border: 2px solid var(--acento-vibrante);
    transform: scale(1.03); 
    box-shadow: var(--sombra-glow-fuerte); /* Resplandor permanente */
}

.tarjeta-precio.recomendado:hover {
    transform: scale(1.03) translateY(-8px); 
}

.etiqueta-recomendado {
    position: absolute;
    top: -1px; 
    right: -1px; 
    background-color: var(--acento-vibrante); 
    color: var(--fondo-oscuro); /* Texto oscuro */
    padding: 0.4rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 0 0 0 8px; 
}

/* --- Contenedores Adicionales (Consideraciones, Upsell, Cierre) --- */
.contenedor-adicional {
    max-width: 800px;
    margin: 3rem auto 0 auto;
    padding: 2.5rem; 
    background-color: var(--fondo-oscuro); /* Más oscuro que la sección */
    border: 1px solid #444;
    border-radius: 12px;
    text-align: left;
    animation: fadeIn 1s ease-out 0.6s;
    animation-fill-mode: backwards;
}

.contenedor-adicional h4 {
    font-size: 1.4rem;
    color: var(--texto-claro);
    margin-bottom: 1rem;
    font-weight: 600;
}

.upsell-mantenimiento {
    background-color: var(--fondo-tarjeta); /* Un poco más claro */
    border-color: var(--acento-vibrante);
    text-align: center;
}

.upsell-mantenimiento h4 {
    color: var(--acento-vibrante);
}

.upsell-mantenimiento .btn-secundario {
    margin-top: 1rem;
    display: inline-block;
    width: auto;
}

.cierre-precios {
    text-align: center;
    border: none;
    background-color: var(--fondo-tarjeta);
    box-shadow: var(--sombra-glow-suave);
}

.cierre-precios .btn-principal {
    margin-top: 1.5rem;
    background-color: var(--acento-vibrante);
    color: var(--fondo-oscuro);
    width: auto;
    padding: 0.8rem 2.2rem;
}

.cierre-precios .btn-principal:hover {
    background-color: var(--fondo-oscuro);
    color: var(--acento-vibrante);
    box-shadow: var(--sombra-glow-fuerte);
}

/* ======== PIE DE PÁGINA ======== */
.pie-pagina {
    background-color: #000; /* Footer bien negro */
    color: var(--texto-gris);
    text-align: center;
    padding: 3rem 0; 
    margin-top: 3rem;
    border-top: 1px solid #333;
}

/* ======== PÁGINA DE CONTACTO ======== */
.formulario-contacto {
    max-width: 600px;
    margin: 2rem auto 0 auto;
    text-align: left;
}

.campo-form {
    margin-bottom: 1.5rem; 
    animation: fadeIn 1s ease-out 0.4s;
    animation-fill-mode: backwards;
}

.campo-form label {
    display: block;
    margin-bottom: 0.5rem; 
    font-weight: 600;
    color: var(--texto-claro);
}

.campo-form input[type="text"],
.campo-form input[type="email"],
.campo-form input[type="tel"],
.campo-form textarea {
    width: 100%;
    padding: 0.9rem; 
    border: 1px solid #555;
    border-radius: 8px; 
    font-size: 1rem; 
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--fondo-tarjeta); /* Fondo de input oscuro */
    color: var(--texto-claro); /* Texto de input claro */
}

.campo-form input[type="text"]:focus,
.campo-form input[type="email"]:focus,
.campo-form input[type="tel"]:focus,
.campo-form textarea:focus {
    outline: none;
    border-color: var(--acento-vibrante);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2); /* Resplandor al hacer foco */
}

.formulario-contacto .btn-principal {
    background-color: var(--acento-vibrante);
    color: var(--fondo-oscuro);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    width: 100%; 
}

.formulario-contacto .btn-principal:hover {
    background-color: var(--acento-vibrante-oscuro); 
}

/* ======== PÁGINA SOBRE MÍ ======== */
.contenedor-sobre-mi {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
    animation: fadeIn 1s ease-out;
}

.imagen-sobre-mi {
     /* Los estilos en línea de tu HTML tienen prioridad */
}

.texto-sobre-mi {
    text-align: left;
}

.texto-sobre-mi h3 {
    text-align: left;
    margin-bottom: 1.5rem; 
}

.texto-sobre-mi p {
    margin-bottom: 1rem; 
    font-size: 1.1rem; 
    color: var(--texto-gris);
}

.texto-sobre-mi .btn-principal {
    margin-top: 1rem;
    /* El estilo en línea de tu HTML (background-color: #0056b3)
       será reemplazado por este si lo quitas, 
       pero por ahora lo respetamos. */
}

/* ======== RESPONSIVE (Para Celulares) ======== */
@media (max-width: 768px) {
    .cabecera .contenedor {
        flex-direction: column; 
        gap: 1rem;
    }
    
    .logo-imagen {
        height: 60px; 
    }

    .navegacion {
        width: 100%;
        display: flex;
        justify-content: space-around;
    }

    .navegacion a {
        margin-left: 0.25rem;
        margin-right: 0.25rem;
        font-size: 0.9rem;
    }

    .hero h2 {
        font-size: 2rem; 
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    h3 {
        font-size: 1.8rem;
    }

    .grilla-servicios,
    .grilla-portafolio,
    .grilla-precios {
        flex-direction: column; 
        align-items: center; 
    }
    
    /* --- AQUÍ ESTÁ LA SOLUCIÓN --- */
    .tarjeta-precio,
    .tarjeta-proyecto,
    .tarjeta-servicio {
        width: 100%; 
        max-width: 400px; 
        animation: none;
        padding: 1.5rem; /* Reducimos el relleno interno para dar más aire al texto */
        height: auto;    /* Dejamos que la tarjeta crezca lo que necesite */
        flex-basis: auto;   /* ¡IMPORTANTE! Quita el límite de altura fijo */
    }

    /* Solución específica para que el texto no se monte encima del otro */
    .tarjeta-precio .ideal-para {
        min-height: auto; /* Quitamos la altura forzada de PC */
        margin-bottom: 1.5rem; /* Aseguramos espacio antes de la lista */
        height: auto;
    }
    
    .tarjeta-precio.recomendado {
        transform: scale(1); 
        margin-top: 1rem;    /* Un poco de espacio extra */
        margin-bottom: 1rem;
    }

    .contenedor-sobre-mi {
        flex-direction: column;
        text-align: center;
    }
    
    /* Ajuste para que tu foto en 'Sobre mí' no sea gigante en celular */
    .contenedor-sobre-mi img {
        width: 200px !important; 
        height: 200px !important;
    }

    .texto-sobre-mi h3 {
        text-align: center;
    }
}