:root {
    --bg-dark: #070707;
    --text-main: #f5f5f5;
    --text-muted: #959595;
    --accent-red: #e62020;
    --accent-yellow: #f2c713;
    --accent-green: #0e9e49;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background estético y refinado en toda la página usando Gradiente Radial *Mesh* */
body::before {
    content: '';
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    background: 
        radial-gradient(circle at 10% 20%, rgba(230, 32, 32, 0.06) 0%, transparent 60%),
        radial-gradient(circle at 90% 15%, rgba(242, 199, 19, 0.05) 0%, transparent 55%),
        radial-gradient(circle at 80% 85%, rgba(14, 158, 73, 0.06) 0%, transparent 55%),
        radial-gradient(circle at 15% 90%, rgba(230, 32, 32, 0.04) 0%, transparent 60%);
}

h1, h2, h3, h4, h5, h6, .logo-text {
    font-family: 'Outfit', sans-serif;
}

/* Scrollbar personalizado */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-red); }

/* Utilidades */
.highlight {
    background: 
        url("assets/halftone.png"),
        linear-gradient(90deg, var(--accent-red), var(--accent-yellow));
    background-size: 16px 16px, 100% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    filter: brightness(1.5); /* Configuración final sutil */
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: transform 0.4s ease, border-color 0.4s ease;
}
.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Botones */
.btn {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--accent-red);
    color: white;
    box-shadow: 0 0 20px rgba(230, 32, 32, 0.3);
}
.btn-primary:hover {
    background: #ff3333;
    box-shadow: 0 0 35px rgba(230, 32, 32, 0.6);
    transform: scale(1.03);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}
.btn-secondary:hover {
    border-color: white;
    background: rgba(255,255,255,0.05);
}

.btn-whatsapp-large {
    background: #25D366;
    color: white;
    font-size: 1.2rem;
    padding: 1.2rem 3.5rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 2rem;
    border-radius: 50px;
}
.btn-whatsapp-large:hover {
    background: #1eb356;
    box-shadow: 0 0 30px rgba(37, 211, 102, 0.5);
    transform: scale(1.05);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    z-index: 1000;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease;
}
.navbar.scrolled {
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 5%;
}
.logo-text {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
}
.logo-text span {
    color: var(--accent-red);
    margin-right: 5px;
}
.navbar-o-logo {
    height: 1.5em;
    width: auto;
    margin-left: -10px;
    transform: translateY(1px);
    display: inline-block;
    filter: brightness(2.4) drop-shadow(0 0 7.2px rgba(255,255,255, 0.3));
}
.navbar nav a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 2.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
}
.navbar nav a:hover {
    color: var(--accent-red);
}

/* Inicio / Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 5% 40px 5%;
    position: relative;
    overflow: hidden;
}
.hero-content {
    flex: 1.2;
    z-index: 2;
}
.hero h1 {
    font-size: 4.8rem;
    line-height: 1.25;
    margin-bottom: 1.5rem;
}
.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 550px;
    margin-bottom: 3rem;
}
.cta-group {
    display: flex;
    gap: 1.2rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}
.logo-container {
    position: relative;
    width: 450px;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-container img {
    width: 90%;
    z-index: 10;
    filter: brightness(1.5);
    animation: floatLogo 5s ease-in-out infinite;
}

@keyframes floatLogo {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Brillos traseros antiguos removidos a favor del fondo global */

/* Secciones Generales */
section { padding: 7rem 5%; }
.section-title {
    font-size: 3.5rem;
    margin-bottom: 4rem;
    text-align: center;
}

/* Sobre mi / Skills */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}
.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
}
.skills-container h3 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--text-main);
}
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
.skill-item {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 1.2rem;
    font-weight: 500;
}
.skill-item i {
    font-size: 2.2rem;
}

/* Estilos base para Logos Adobe */
.adobe-logo {
    border-radius: 12px;
    transition: transform 0.3s ease, filter 0.3s ease;
}
.skill-item:hover .adobe-logo {
    transform: scale(1.1);
}

/* Deep Glow Final (User Config) */
.led-pr, .led-ae { 
    filter: brightness(1.8) saturate(2) drop-shadow(0 0 4px #fff) drop-shadow(0 0 14px #9999ff);
}
.led-ps { 
    filter: brightness(1.8) saturate(2) drop-shadow(0 0 4px #fff) drop-shadow(0 0 14px #00a8ff);
}
.led-ai { 
    filter: brightness(1.8) saturate(2) drop-shadow(0 0 4px #fff) drop-shadow(0 0 14px #ff9a00);
}

/* Portafolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}
.portfolio-item {
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    position: relative;
    height: 380px;
    border: 1px solid rgba(255,255,255,0.1);
}
.portfolio-featured {
    grid-column: 1 / -1; /* Ocupa todo el ancho */
    height: 500px; /* Más alto para destacar */
    margin-bottom: 1rem;
}
@media (max-width: 768px) {
    .portfolio-featured {
        height: 300px; /* Ajuste para móvil */
    }
}
.portfolio-item:hover .img-placeholder {
    transform: scale(1.08);
}
.portfolio-item:hover .portfolio-info {
    padding-bottom: 2.5rem;
}
.img-placeholder {
    height: 100%;
    width: 100%;
    background-color: #111;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}
.img-placeholder::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3); /* Oscurece un poco la foto para que el icono resalte */
    transition: background 0.3s ease;
}
.portfolio-item:hover .img-placeholder::before {
    background: rgba(0,0,0,0.1);
}
.img-placeholder i {
    font-size: 4rem;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
}
.img-placeholder span {
    position: relative;
    z-index: 2;
    font-weight: 600;
}
.portfolio-info {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 2rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 20%, transparent);
    transition: padding 0.3s ease;
}

/* Tarifas / Precios */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: center;
}
.pricing-card {
    position: relative;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.pricing-card.popular {
    border-color: var(--accent-red);
    box-shadow: 0 0 30px rgba(230, 32, 32, 0.15);
    transform: scale(1.05);
}
.pricing-card.popular:hover {
    transform: scale(1.08);
}
.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-red);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(230, 32, 32, 0.4);
}
.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 2rem;
}
.pricing-header h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 1rem;
}
.pricing-header .price {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    margin-bottom: 0.5rem;
}
.pricing-header .price span {
    font-size: 1.2rem;
    color: var(--text-muted);
}
.pricing-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.pricing-features {
    list-style: none;
    margin-bottom: 3rem;
    flex-grow: 1;
}
.pricing-features li {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
}
.pricing-features i {
    color: var(--accent-yellow);
    margin-top: 4px;
}
.pricing-card .btn {
    width: 100%;
    text-align: center;
}

/* Payment Methods */
.payment-methods {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}
.payment-methods p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.payment-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}
.pay-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 500;
}
.pay-icon i {
    font-size: 1.5rem;
    color: var(--accent-yellow);
}

/* Cotización a medida y Contacto */
.arrows-down {
    font-size: 2rem;
    color: var(--accent-red);
    margin-bottom: 0;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

/* Contacto */
.contact-card {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.contact-card p {
    font-size: 1.3rem;
}

/* WhatsApp Flotante */
.floating-wa {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 65px;
    height: 65px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    z-index: 100;
    transition: transform 0.3s, background-color 0.3s;
    text-decoration: none;
    animation: pulse-wa 2.5s infinite;
}
.floating-wa:hover {
    transform: translateY(-5px) scale(1.05);
    background-color: #1eb356;
}
@keyframes pulse-wa {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
    70% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Lightbox para videos */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5,5,5,0.95);
    backdrop-filter: blur(10px);
}
.lightbox-content {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1100px;
}
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* Relación 16:9 por defecto */
    height: 0;
    transition: all 0.5s ease;
}

/* Soporte para Reels/Vertical - Ajustado para que no se corte */
.video-wrapper.is-vertical {
    padding-bottom: 0; /* Eliminamos el hack antiguo */
    height: 85vh; /* Máximo 85% de la altura de la pantalla */
    width: calc(85vh * 9 / 16); /* Calculamos el ancho basado en la altura para mantener 9:16 */
    max-width: 90vw; /* Aseguramos que no se salga de los lados en móviles */
    margin: 0 auto;
    position: relative;
}

@media (max-width: 768px) {
    .video-wrapper.is-vertical {
        height: 70vh; /* Un poco más pequeño en móviles para dejar espacio */
        width: calc(70vh * 9 / 16);
    }
}

@media (max-width: 450px) {
    .video-wrapper.is-vertical {
        width: 100%;
    }
}
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(0,0,0,1);
}
.lightbox-nav {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 999999999; /* Prioridad absoluta sobre todo */
    pointer-events: auto;
}
.back-btn {
    color: white;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    background: #e62020;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 0 20px rgba(230, 32, 32, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid rgba(255,255,255,0.8);
}
.back-btn:hover {
    transform: scale(1.05);
    background: #ff3333;
    box-shadow: 0 0 35px rgba(230, 32, 32, 0.8);
}
.back-btn i {
    font-size: 1.2rem;
}
.close-lightbox {
    display: none; /* Reemplazado por el botón volver */
}

footer {
    text-align: center;
    padding: 3rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 3.5rem; }
    .logo-container { width: 350px; height: 350px; }
}

@media (max-width: 768px) {
    section { padding: 4rem 5%; }
    .glass-card { padding: 1.5rem; }
    .hero {
        flex-direction: column;
        padding-top: 120px;
        text-align: center;
        min-height: auto;
    }
    .hero h1 { font-size: 2.8rem; }
    .hero p { margin: 0 auto 2rem auto; }
    .cta-group { justify-content: center; flex-direction: column; width: 100%; max-width: 300px; margin: 0 auto; }
    .logo-container { 
        width: 280px; 
        height: 280px; 
        margin-top: 2rem; 
        margin-bottom: 1rem;
    }
    .navbar { padding: 1rem 5%; }
    .navbar nav { display: none; } /* Oculto nav para minimalismo, logo mas centrado */
    .navbar { justify-content: center; } /* Centrar logo en movil */
    .navbar-o-logo { height: 1.2em; margin-left: -5px; }
    
    .section-title { font-size: 2.2rem; margin-bottom: 2.5rem; }
    
    .skills-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .skill-item { justify-content: center; }

    .portfolio-grid { grid-template-columns: 1fr; }
    .portfolio-item { height: 300px; }

    .pricing-card.popular {
        transform: none;
    }
    .pricing-card.popular:hover {
        transform: translateY(-5px);
    }

    .btn-whatsapp-large { 
        width: 100%; 
        padding: 1.2rem 1.5rem; 
        font-size: 1rem; 
        justify-content: center;
    }

    .floating-wa { bottom: 20px; right: 20px; width: 55px; height: 55px; font-size: 30px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2.2rem; }
    .logo-container { width: 240px; height: 240px; }
    .logo-text { font-size: 1.4rem; }
}
