/* =========================================================================
   VARIABLES Y CONFIGURACIÓN BÁSICA
   ========================================================================= */
   :root {
    /* Paleta Premium Oscura */
    --bg-dark: #07080b;
    --bg-darker: #040507;
    --bg-surface: rgba(255, 255, 255, 0.03);
    --bg-surface-hover: rgba(255, 255, 255, 0.08);
    
    /* Acentos */
    --accent-color: #00d2ff; /* Azul/Cyan moderno */
    --accent-glow: rgba(0, 210, 255, 0.4);
    
    /* Textos */
    --text-main: #f5f5f7;
    --text-muted: #9ca3af;
    
    /* Tipografías */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Efectos */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
    --glass-blur: blur(12px);
}

@font-face {
    font-family: 'Bigboss Signature';
    src: url('Bigboss Signature.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================================================
   UTILIDADES
   ========================================================================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-title span {
    color: var(--accent-color);
}

.section-subtitle, .section-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

.section-description {
    margin-bottom: 1.5rem;
    text-align: left;
}

.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 16px;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--bg-dark);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.6);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--text-muted);
}

.btn-secondary:hover {
    border-color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-outline {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    margin-top: 1rem;
}

.btn-outline:hover {
    background: var(--accent-color);
    color: var(--bg-dark);
}

.w-100 { width: 100%; }

/* =========================================================================
   NAVEGACIÓN
   ========================================================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar.scrolled {
    background: rgba(7, 8, 11, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: var(--glass-border);
    padding: 0.75rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Bigboss Signature', cursive;
    font-size: 2.2rem;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 1px;
}

/* Hamburger menu for mobile */
.menu-toggle {
    display: block;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    margin: 5px 0;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--bg-darker);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: 0.4s ease-in-out;
    border-left: var(--glass-border);
}

.nav-links.active {
    right: 0;
}

.nav-item {
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.2rem;
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--accent-color);
}

.nav-cta {
    background: var(--bg-surface);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.nav-cta:hover {
    background: var(--accent-color);
    color: var(--bg-dark);
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 6rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212,175,55,0.15) 0%, rgba(7,8,11,0) 70%);
    border-radius: 50%;
    z-index: -1;
}

.hero-content {
    display: flex;
    flex-direction: column-reverse;
    gap: 3rem;
    align-items: center;
}

.hero-text {
    text-align: center;
}

.hero-subtitle {
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.hero-title span {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-main);
    background: linear-gradient(90deg, #fff, #888);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
}

.hero-actions .btn {
    width: 100%;
}

.hero-image-wrapper {
    position: relative;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    padding: 10px;
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.4), rgba(255,255,255,0.05));
}

.glow-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 50%;
    background: var(--accent-color);
    filter: blur(40px);
    opacity: 0.3;
    z-index: -1;
    animation: pulse 4s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.2; }
    100% { transform: scale(1.1); opacity: 0.4; }
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-dark);
}

/* =========================================================================
   SOBRE MÍ
   ========================================================================= */
.about {
    background-color: var(--bg-darker);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
}

.stat-card {
    background: var(--bg-surface);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

/* =========================================================================
   SERVICIOS
   ========================================================================= */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Temas de Color para cada Servicio */
.service-card:nth-child(1) {
    --accent-theme: #00d2ff;
    --accent-glow: rgba(0, 210, 255, 0.15);
    --accent-bg: rgba(0, 210, 255, 0.08);
}
.service-card:nth-child(2) {
    --accent-theme: #a78bfa;
    --accent-glow: rgba(167, 139, 250, 0.15);
    --accent-bg: rgba(167, 139, 250, 0.08);
}
.service-card:nth-child(3) {
    --accent-theme: #ec4899;
    --accent-glow: rgba(236, 72, 153, 0.15);
    --accent-bg: rgba(236, 72, 153, 0.08);
}
.service-card:nth-child(4) {
    --accent-theme: #f59e0b;
    --accent-glow: rgba(245, 158, 11, 0.15);
    --accent-bg: rgba(245, 158, 11, 0.08);
}

.service-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 3.5rem 2.5rem;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

/* Efecto hover en bordes y elevacion */
.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent-theme);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), 
                0 0 35px var(--accent-glow);
}

/* Efecto de luz interactiva que sigue al cursor */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255, 255, 255, 0.06), transparent 40%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* Brillo de fondo estático */
.service-card::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    transition: transform 0.6s ease, filter 0.6s ease;
}

.service-card:hover::after {
    transform: scale(1.8) translate(-20px, 20px);
}

/* Contenedor del icono SVG */
.service-icon-container {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background: var(--accent-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
    position: relative;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                background 0.3s ease, 
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.service-icon-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, var(--accent-theme), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.service-icon-container svg {
    width: 32px;
    height: 32px;
    color: var(--accent-theme);
    transition: transform 0.5s ease, color 0.3s ease;
    filter: drop-shadow(0 0 5px var(--accent-glow));
}

.service-card:hover .service-icon-container {
    background: var(--accent-theme);
    border-color: var(--accent-theme);
    box-shadow: 0 8px 25px var(--accent-glow);
    transform: scale(1.1) rotate(8deg);
}

.service-card:hover .service-icon-container svg {
    color: #07080b;
    transform: scale(1.1);
    filter: none;
}

.service-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    color: #fff;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.service-card:hover .service-title {
    color: var(--accent-theme);
}

/* =========================================================================
   PORTAFOLIO
   ========================================================================= */
.portfolio {
    background-color: var(--bg-darker);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--text-muted);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--accent-color);
    color: var(--bg-dark);
    border-color: var(--accent-color);
}

.portfolio-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.portfolio-item {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1 / 1;
}

.portfolio-img-wrapper {
    width: 100%;
    height: 100%;
}

.portfolio-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.6s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item.hide {
    display: none;
}

/* =========================================================================
   CONTACTO Y PIE DE PÁGINA (CON CAPTCHA SLIDER)
   ========================================================================= */
.contact-container {
    max-width: 750px;
}

.contact-card {
    padding: 3.5rem 2.5rem;
    text-align: center;
    position: relative;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    z-index: 1;
}

.contact-ambient-glow {
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.contact-form {
    margin-top: 2.5rem;
    text-align: left;
}

.form-group {
    margin-bottom: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-label {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff; /* Alta visibilidad */
    letter-spacing: 0.5px;
    margin-left: 2px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 1.35rem;
    color: rgba(255, 255, 255, 0.45); /* Alta visibilidad */
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.input-icon svg {
    width: 20px;
    height: 20px;
}

.textarea-icon {
    top: 1.25rem;
    align-items: flex-start;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 1.15rem 1.5rem 1.15rem 3.4rem;
    background: rgba(255, 255, 255, 0.05); /* Cristal mas visible */
    border: 1px solid rgba(255, 255, 255, 0.12); /* Borde visible */
    border-radius: 16px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: background 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
                border-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
                box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                transform 0.2s ease;
}

.form-group textarea {
    padding-top: 1.15rem;
    resize: none;
}

.form-group input::placeholder, 
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.45); /* Placeholder visible */
}

/* Hover en inputs */
.form-group input:hover, 
.form-group textarea:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.input-focus-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #00d2ff, #0066ff);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 0 0 16px 16px;
    pointer-events: none;
}

/* Enfoque en inputs con alto contraste */
.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: #00d2ff;
    background: rgba(7, 8, 11, 0.96); /* Fondo oscuro profundo al escribir para legibilidad perfecta */
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.15), 0 0 0 1px #00d2ff;
    transform: translateY(-2px);
}

.form-group input:focus ~ .input-icon, 
.form-group textarea:focus ~ .input-icon {
    color: #00d2ff;
    transform: scale(1.1);
}

.form-group input:focus ~ .input-focus-border, 
.form-group textarea:focus ~ .input-focus-border {
    transform: scaleX(1);
}

/* =========================================================================
   SLIDER CAPTCHA (DESLIZAR PARA VERIFICAR)
   ========================================================================= */
.slider-captcha-container {
    width: 100%;
    margin-bottom: 1.8rem;
    user-select: none;
    -webkit-user-select: none;
}

.slider-captcha-track {
    position: relative;
    width: 100%;
    height: 55px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.slider-captcha-bg {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, rgba(0, 210, 255, 0.1) 0%, rgba(0, 210, 255, 0.25) 100%);
    border-radius: 14px 0 0 14px;
    transition: width 0.05s linear;
}

.slider-captcha-text {
    position: absolute;
    width: 100%;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    z-index: 2;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.slider-captcha-handle {
    position: absolute;
    left: 4px;
    width: 47px;
    height: 47px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 3;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.slider-captcha-handle:active {
    cursor: grabbing;
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.98);
}

.slider-captcha-handle svg {
    width: 20px;
    height: 20px;
    color: #fff;
    transition: transform 0.3s ease, color 0.3s ease;
}

.slider-captcha-track:hover {
    border-color: rgba(0, 210, 255, 0.25);
}

/* Estado Desbloqueado */
.slider-captcha-track.unlocked {
    background: rgba(5, 150, 105, 0.08);
    border-color: rgba(5, 150, 105, 0.3);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 15px rgba(5, 150, 105, 0.15);
}

.slider-captcha-track.unlocked .slider-captcha-bg {
    background: linear-gradient(90deg, rgba(5, 150, 105, 0.1) 0%, rgba(5, 150, 105, 0.3) 100%);
    width: 100% !important;
    border-radius: 14px;
}

.slider-captcha-track.unlocked .slider-captcha-text {
    color: #34d399;
}

.slider-captcha-track.unlocked .slider-captcha-handle {
    background: #059669;
    border-color: #34d399;
    box-shadow: 0 0 15px rgba(5, 150, 105, 0.4);
    cursor: default;
    transform: none;
}

.slider-captcha-track.unlocked .slider-captcha-handle svg {
    color: #fff;
}

/* Botón de Enviar Deshabilitado */
#submitBtn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.25);
    box-shadow: none !important;
    transform: none !important;
}

/* Animación de pulso para botón habilitado */
#submitBtn.verified-pulse {
    animation: buttonPulse 2s infinite;
}

@keyframes buttonPulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 210, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 210, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 210, 255, 0); }
}

.footer {
    background: #020305;
    padding: 3rem 0;
    text-align: center;
    border-top: var(--glass-border);
}

.footer-logo {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.footer-socials {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.linkedin-btn-footer {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1.8rem;
    background: rgba(0, 119, 181, 0.06);
    border: 1px solid rgba(0, 119, 181, 0.25);
    border-radius: 50px;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.linkedin-btn-footer svg {
    width: 20px;
    height: 20px;
    color: #0077b5;
    transition: transform 0.4s ease, color 0.4s ease;
}

.linkedin-btn-footer:hover {
    background: #0077b5;
    color: #fff;
    border-color: #0077b5;
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 119, 181, 0.4), 0 0 15px rgba(0, 119, 181, 0.2);
}

.linkedin-btn-footer:hover svg {
    color: #fff;
    transform: rotate(360deg);
}

/* =========================================================================
   ANIMACIONES SCROLL
   ========================================================================= */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-on-scroll.appear {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================================
   MEDIA QUERIES (TABLET Y ESCRITORIO)
   ========================================================================= */
@media (min-width: 768px) {
    .section-title { font-size: 3.5rem; }
    
    .menu-toggle { display: none; }
    
    .nav-links {
        position: static;
        flex-direction: row;
        width: auto;
        height: auto;
        background: transparent;
        border: none;
        gap: 2rem;
    }
    
    .nav-item { font-size: 1rem; }
    
    .hero-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    
    .hero-text {
        text-align: left;
        flex: 1;
    }
    
    .hero-title { font-size: 4rem; }
    .hero-description { margin-left: 0; }
    
    .hero-actions {
        flex-direction: row;
    }
    
    .hero-actions .btn {
        width: auto;
    }
    
    .hero-image-wrapper {
        width: 350px;
        height: 350px;
        flex-shrink: 0;
    }
    
    .about-container {
        display: flex;
        gap: 4rem;
        align-items: center;
    }
    
    .about-text { flex: 1; }
    .about-stats {
        flex: 1;
        margin-top: 0;
    }
    
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    
    .portfolio-gallery { grid-template-columns: repeat(2, 1fr); }
    
    .contact-card { padding: 4rem; }
}

@media (min-width: 1024px) {
    .portfolio-gallery { grid-template-columns: repeat(4, 1fr); }
    .hero-image-wrapper {
        width: 400px;
        height: 400px;
    }
}

/* =========================================================================
   LIGHTBOX (MODAL)
   ========================================================================= */
.portfolio-item {
    cursor: pointer;
}

.lightbox {
    display: none; /* Hide by default */
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.3);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    background: transparent;
    border: none;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
}

/* Botones de Navegación del Lightbox */
.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition);
    user-select: none;
    z-index: 10000;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background: var(--accent-color);
    color: var(--bg-dark);
    box-shadow: 0 0 15px var(--accent-glow);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

@media (max-width: 768px) {
    .lightbox-prev, .lightbox-next {
        font-size: 20px;
        padding: 10px 14px;
    }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { right: 20px; top: 10px; }
}

/* =========================================================================
   Botón Flotante e Interactivo de WhatsApp
   ========================================================================= */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: transform 0.3s ease, bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

.whatsapp-btn svg {
    width: 35px;
    height: 35px;
}

.whatsapp-btn-text {
    display: none;
}

/* Si el banner de cookies está activo, empujamos el botón flotante en desktop */
body.cookie-banner-active .whatsapp-btn {
    bottom: 120px;
}

/* =========================================================================
   ESTILOS RESPONSIVOS PARA MÓVIL (WHATSAPP BAR & COOKIES COLLISION)
   ========================================================================= */
@media (max-width: 768px) {
    .whatsapp-btn {
        width: 100%;
        height: 55px;
        bottom: 0 !important; /* Fijado abajo del todo */
        right: 0;
        left: 0;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
        padding: 0 20px;
        animation: pulse-whatsapp-bar 3s infinite ease-in-out;
        z-index: 100000; /* Prioridad alta */
    }
    
    .whatsapp-btn:hover {
        transform: none;
    }

    .whatsapp-btn-text {
        display: inline-block;
        font-family: var(--font-heading);
        font-weight: 700;
        font-size: 1.05rem;
        color: #ffffff;
        letter-spacing: 0.5px;
    }

    .whatsapp-btn svg {
        width: 26px;
        height: 26px;
        animation: shake-whatsapp 4s infinite ease-in-out;
    }

    /* Si el banner de cookies está activo, se coloca justo encima de la barra de WhatsApp */
    body.cookie-banner-active #cookie-banner {
        bottom: 55px !important;
    }

    /* Separar el footer para que no lo tape la barra de WhatsApp */
    body {
        padding-bottom: 55px;
    }
}

@keyframes pulse-whatsapp-bar {
    0%, 100% { box-shadow: 0 -4px 20px rgba(37, 211, 102, 0.35); }
    50% { box-shadow: 0 -4px 30px rgba(37, 211, 102, 0.6); }
}

@keyframes shake-whatsapp {
    0%, 100% { transform: rotate(0); }
    5%, 15%, 25% { transform: rotate(-10deg); }
    10%, 20% { transform: rotate(10deg); }
    30% { transform: rotate(0); }
}


/* =========================================================================
   NOTIFICACIÓN TOAST PERSONALIZADA
   ========================================================================= */
.toast {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 210, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 210, 255, 0.15);
    border-radius: 12px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 99999;
    transform: translateY(150%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    pointer-events: none;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #059669;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.toast-icon.error {
    background: #dc2626;
}

.toast-message {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
}

@media (max-width: 640px) {
    .toast {
        left: 20px;
        right: 20px;
        bottom: 20px;
        justify-content: center;
    }
}

/* =========================================================================
   ESPACIADO DE SECCIONES Y CABECERA DE CONTACTO CREATIVA
   ========================================================================= */
.portfolio.section {
    padding-bottom: 2rem;
}

.contact.section {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.contact-title-creative {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    color: #fff;
    letter-spacing: -0.5px;
}

.contact-pre-title {
    display: block;
    font-family: 'Bigboss Signature', cursive;
    font-size: 2.8rem;
    color: var(--accent-color);
    font-weight: normal;
    margin-bottom: 0.2rem;
    text-transform: none;
    letter-spacing: 1px;
    filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.25));
}

.text-gradient {
    background: linear-gradient(135deg, #00d2ff 0%, #0066ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .contact-title-creative {
        font-size: 2.1rem;
        line-height: 1.2;
    }
    .contact-pre-title {
        font-size: 2.2rem;
        margin-bottom: 0.1rem;
    }
}

/* =========================================================================
   PANTALLA DE ÉXITO INTEGRADA EN EL FORMULARIO
   ========================================================================= */
.contact-form-wrapper, .contact-success-wrapper {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.contact-success-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.success-icon-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.15);
    position: relative;
}

.success-checkmark {
    width: 38px;
    height: 38px;
    color: #10b981;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw-checkmark 0.8s ease-out forwards 0.2s;
}

@keyframes draw-checkmark {
    to {
        stroke-dashoffset: 0;
    }
}

.success-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.success-message {
    font-family: var(--font-body);
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 550px;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.btn-send-again {
    margin-top: 1rem;
    padding: 0.7rem 1.8rem;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    transition: var(--transition);
}

.btn-send-again:hover {
    background: var(--text-main);
    color: var(--bg-dark);
    border-color: var(--text-main);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .success-title {
        font-size: 1.8rem;
    }
    .success-message {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    .success-icon-container {
        width: 70px;
        height: 70px;
        margin-bottom: 1.5rem;
    }
    .success-checkmark {
        width: 32px;
        height: 32px;
    }
}

/* =========================================================================
   PANTALLA DE ERROR / FALLBACK CORREO DIRECTO
   ========================================================================= */
.contact-error-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.error-icon-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.15);
    position: relative;
}

.error-cross {
    width: 38px;
    height: 38px;
    color: #ef4444;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw-checkmark 0.8s ease-out forwards 0.2s; /* Reutiliza animación para dibujar cruz */
}

.error-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.error-message {
    font-family: var(--font-body);
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 550px;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
    .error-title {
        font-size: 1.8rem;
    }
    .error-message {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    .error-icon-container {
        width: 70px;
        height: 70px;
        margin-bottom: 1.5rem;
    }
    .error-cross {
        width: 32px;
        height: 32px;
    }
}
