/* =========================================
   VARIABLES GLOBALES Y CONFIGURACIÓN
   Estética "Premium Dark" - Mobile First
   ========================================= */
:root {
    /* Paleta Principal */
    --bg-color: #0b0c10;          /* Fondo muy oscuro / Premium Black */
    --surface-color: #1f2833;     /* Superficies / Tarjetas oscuras */
    --surface-light: #2c3947;     /* Variación más clara para efectos hover */
    
    /* Textos */
    --text-main: #c5c6c7;         /* Texto gris claro para legibilidad superior */
    --text-title: #ffffff;        /* Blanco puro para dar jerarquía a los títulos */
    
    /* Color de Acento Enérgico */
    --accent-color: #ff3b00;      /* Naranja/Rojo Deportivo */
    --accent-hover: #e03400;      /* Variación sutil para el CTA al pasar el mouse */
    
    /* Tipografía */
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Utilidades */
    --transition-fast: 0.3s ease;
    --border-radius: 8px;
}

/* =========================================
   RESET ESTRUCTURAL (Clean Code)
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden; /* Evita scrolls horizontales indeseados */
}

/* Contenedor centralizado */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Globales Tipografía */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-title);
    line-height: 1.2;
}

/* Span reutilizable para destacar textos */
span {
    color: var(--accent-color);
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================
   COMPONENTES UI GLOBALES
   ========================================= */
/* Botón Primario y CTA */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #fff;
    /* Resplandor externo premium */
    box-shadow: 0 4px 15px rgba(255, 59, 0, 0.4); 
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 59, 0, 0.6);
}

.btn-block {
    width: 100%; /* Botón al 100% de la caja contenedor */
}

/* Títulos de Sección Subrayados */
.section-title {
    font-size: 2.2rem;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

/* =========================================
   HEADER / NAVEGACIÓN
   ========================================= */
.header {
    background-color: rgba(11, 12, 16, 0.96);
    backdrop-filter: blur(10px); /* Efecto cristal / Glassmorphism */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-title);
    letter-spacing: 1px;
}

/* Menú Móvil (Hamburger) */
.menu-toggle {
    background: none;
    border: none;
    color: var(--text-title);
    font-size: 1.5rem;
    cursor: pointer;
    display: block; /* Solo tablet y móvil por defecto */
}

.nav {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--surface-color);
    display: none; /* Estado oculto. JS lo activa con toggle */
    flex-direction: column;
    padding: 1rem 0;
    border-bottom: 2px solid var(--accent-color);
}

.nav.active {
    display: flex; /* Estado Activo */
}

.nav-list {
    list-style: none;
}

.nav-link {
    display: block;
    padding: 1rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    text-transform: uppercase;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--accent-color);
}

/* =========================================
   SECCIÓN: HERO INICIO
   Layout flexible: columna en mobile,
   dos columnas (texto + imagen) en desktop.
   ========================================= */
.hero {
    min-height: 100dvh; /* Soporte moderno para alturas completas móviles */
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    padding-bottom: 40px;
    background-color: var(--bg-color);
    /* Fondo radial sutil para dar profundidad */
    background: radial-gradient(circle at top center, rgba(31, 40, 51, 0.4) 0%, var(--bg-color) 70%);
    overflow: hidden;
}

/* Contenedor principal del Hero - Flex column en mobile */
.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    padding: 2rem 0;
}

/* Columna de Texto */
.hero-text-col {
    text-align: center;
    order: 2; /* En mobile: texto debajo de la imagen */
}

.hero-subtitle {
    color: var(--accent-color);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-title {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero-text {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Columna de Imagen — Contenedor */
.hero-image-col {
    width: 100%;
    max-width: 380px; /* Limita el tamaño en mobile */
    order: 1; /* En mobile: imagen arriba del texto */
}

/* Wrapper con efectos premium (sombra, bordes, brillo) */
.hero-image-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(255, 59, 0, 0.08); /* Brillo acento sutil */
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Imagen Hero principal */
.hero-img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 3 / 4; /* Proporciones consistentes tipo retrato */
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s ease;
}

/* Efecto zoom sutil al pasar el mouse */
.hero-image-wrapper:hover .hero-img {
    transform: scale(1.04);
}

/* Iluminación Radial Dark — Profundidad premium */
.hero-overlay {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 59, 0, 0.08) 0%, rgba(11, 12, 16, 0) 70%);
    border-radius: 50%;
    z-index: 1;
}

/* =========================================
   SECCIÓN: SERVICIOS
   ========================================= */
.services {
    padding: 5rem 0;
    background-color: var(--bg-color);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.service-card {
    background-color: var(--surface-color);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: all var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.service-card:hover {
    transform: translateY(-10px); /* Efecto elevación moderno */
    background-color: var(--surface-light);
    border-color: rgba(255, 59, 0, 0.2);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-text {
    font-size: 0.95rem;
}

/* =========================================
   SECCIÓN: SOBRE MÍ
   ========================================= */
.about {
    padding: 5rem 0;
    background-color: #12151c; /* Fondo suavemente distinto para romper el padrón visual */
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.about-text .section-title {
    text-align: left;
}

/* Posiciona la línea naranja a la izquierda en Mobile */
.about-text .section-title::after {
    left: 0;
    transform: none;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--accent-color);
    font-weight: 700;
    line-height: 1;
}

.stat-desc {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

/* Contenedor de la Imagen Sobre Mí */
.image-wrapper {
    width: 100%;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.about-img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 3 / 4; /* Aspecto más vertical para retrato */
    object-fit: cover;
    object-position: top center;
    transition: transform var(--transition-fast);
}

.image-wrapper:hover .about-img {
    transform: scale(1.05); /* Efecto zoom premium sutil */
}

/* =========================================
   SECCIÓN: CONTACTO
   ========================================= */
.contact {
    padding: 5rem 0;
    background-color: var(--bg-color);
}

.contact-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* Estilización Premium Floating Form */
.contact-form {
    background-color: var(--surface-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.input-group {
    position: relative;
    margin-bottom: 2.5rem;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 10px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-title);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: all var(--transition-fast);
}

.input-group label {
    position: absolute;
    top: 10px;
    left: 0;
    color: var(--text-main);
    pointer-events: none;
    transition: all var(--transition-fast);
}

/* Lógica CSS pura para la animación del placeholder estético */
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
    top: -20px;
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 600;
}

.input-group input:focus,
.input-group textarea:focus {
    border-bottom-color: var(--accent-color);
}

/* Botones Directos - Redes */
.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Botones de contacto premium */
.contact-btn {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.contact-btn:hover {
    transform: translateX(10px); /* Efecto cinético hacia la derecha */
}

/* Colores de Marca al Hover */
.contact-btn.whatsapp:hover { background-color: #25D366; color: #fff; border-color: #25D366;}
.contact-btn.email:hover { background-color: #EA4335; color: #fff; border-color: #EA4335; }
.contact-btn.instagram:hover { background-color: #E1306C; color: #fff; border-color: #E1306C;}

.contact-btn i {
    font-size: 1.6rem;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    padding: 2rem 0;
    background-color: #050608;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* =========================================
   ANIMACIONES ON SCROLL
   ========================================= */

/* Clases base ocultas */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}

/* Clase añadida vía JS al ser visible en pantalla */
.fade-up.visible,
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Retrasos progresivos (Staggered effect) para tarjetas */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

/* =========================================
   MEDIA QUERIES — RESPONSIVIDAD COMPLETA
   Mobile First: base → tablet → desktop
   ========================================= */

/* -----------------------------------------
   Móviles pequeños (< 480px)
   Ajustes finos para pantallas compactas
   ----------------------------------------- */
@media screen and (max-width: 479px) {
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 0.85rem; letter-spacing: 2px; }
    .hero-text { font-size: 1rem; }
    .hero-image-col { max-width: 280px; }
    .section-title { font-size: 1.8rem; }
    .stat-num { font-size: 2.5rem; }
}

/* -----------------------------------------
   Móviles (< 768px)
   Hero en columna, imagen sobre el texto
   ----------------------------------------- */
@media screen and (max-width: 767px) {
    .hero {
        align-items: center;
        min-height: 100dvh;
    }
}

/* -----------------------------------------
   Tablet y Desktop (≥ 768px)
   Layouts en dos columnas donde corresponde
   ----------------------------------------- */
@media screen and (min-width: 768px) {
    /* Tipografía ampliada */
    .section-title { font-size: 2.8rem; }
    .hero-title { font-size: 3.5rem; }
    .hero-subtitle { font-size: 1rem; }

    /* Hero: dos columnas lado a lado */
    .hero-content {
        flex-direction: row;
        align-items: center;
        gap: 3rem;
        padding: 4rem 0;
    }
    .hero-text-col {
        flex: 1;
        text-align: left;
        order: 1; /* Texto a la izquierda */
    }
    .hero-image-col {
        flex: 1;
        max-width: 420px;
        order: 2; /* Imagen a la derecha */
    }
    .hero-text {
        margin-left: 0;
        margin-right: 0;
    }

    /* Servicios en 3 columnas */
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Sobre Mí en dos columnas */
    .about-content {
        flex-direction: row;
        align-items: center;
    }
    .about-text, .about-image {
        flex: 1; /* Distribuye 50/50 entre texto e imagen */
    }

    /* Header Desktop — Navegación en línea */
    .menu-toggle {
        display: none;
    }
    .nav {
        position: static;
        display: block;
        background: transparent;
        width: auto;
        border: none;
        padding: 0;
    }
    .nav-list {
        display: flex;
        gap: 2rem;
    }
    .nav-link {
        padding: 0;
        font-size: 1rem;
    }

    /* Contacto en dos columnas */
    .contact-wrapper {
        flex-direction: row;
    }
    .contact-form {
        flex: 3;
        padding: 3rem;
    }
    .contact-info {
        flex: 2;
        padding-top: 1rem;
    }
}

/* -----------------------------------------
   Desktop Grande (≥ 1024px)
   Ajustes finos para pantallas amplias
   ----------------------------------------- */
@media screen and (min-width: 1024px) {
    .hero-title { font-size: 4rem; }
    .hero-image-col { max-width: 480px; }
    .hero-content { gap: 4rem; }
}
