/* =========================================
   1. VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================= */
:root {
    --bg-dark: #050505;
    --accent-red: #949494;
    --accent-yellow: #ebe9e0;
    --text-light: #F4F4F4;
    --text-gray: #AAAAAA;
} 
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    
    /* ESTO BLOQUEA LA SELECCIÓN DE TEXTO */
    -webkit-user-select: none; 
    -ms-user-select: none; 
    user-select: none; 
}

h1, h2, h3 {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 2px;
}

/* PROTECCIÓN DE IMÁGENES POR CSS */
img {
    -webkit-user-drag: none;
    user-select: none;
}

/* =========================================
   2. NAVEGACIÓN (HEADER)
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: rgba(22, 22, 22, 0.9);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--text-light);
}

.logo span {
    color: var(--accent-red);
}

/* Estilos del icono de Instagram en el Header */
.ig-link {
    display: flex;
    align-items: center;
    /* Ahora es siempre visible por defecto */
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ig-icon {
    width: 24px;
    height: 24px;
    fill: var(--text-gray);
    transition: fill 0.3s ease, transform 0.3s ease;
}

/* Animación SOLAMENTE para cuando pases por encima del propio logo */
.ig-link:hover .ig-icon {
    fill: var(--accent-yellow);
    transform: scale(1.15) rotate(5deg);
}

/* =========================================
   3. HERO SECTION (Fondo Animado)
   ========================================= */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden; 
    padding: 0 20px;
    background-color: #000;
}

.hero-bg-slider {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}

.hero-track {
    display: flex;
    height: 100%;
    width: max-content;
    animation: slideLeft 40s linear infinite; 
}

.hero-track img {
    height: 100vh;
    width: auto;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(15, 15, 15, 0.85); 
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

@keyframes slideLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.hero h1 {
    font-size: 5rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 30px;
    font-weight: 300;
}

/* =========================================
   4. BOTONES Y LÍNEAS DE ACENTO
   ========================================= */
.btn-primary, .btn-secondary, .btn-contact {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-radius: 2px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-red);
    color: white;
    border: 2px solid var(--accent-red);
}

.btn-primary:hover {
    background-color: transparent;
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

.btn-secondary, .btn-contact {
    background-color: transparent;
    color: var(--accent-yellow);
    border: 2px solid var(--accent-yellow);
}

.btn-secondary:hover, .btn-contact:hover {
    background-color: var(--accent-yellow);
    color: var(--bg-dark);
}

.accent-line {
    height: 4px;
    width: 60px;
    background-color: var(--accent-red);
    margin: 15px 0 25px 0;
}

/* =========================================
   5. SECCIÓN SOBRE MÍ
   ========================================= */
.about-section {
    padding: 100px 5%;
}

.about-container {
    display: flex;
    gap: 50px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    height: auto;
    border-left: 8px solid var(--text-light);
    box-shadow: -15px 15px 0px rgba(202, 202, 202, 0.2);
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 3rem;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-gray);
    text-align: justify;
}

/* =========================================
   6. SECCIÓN DE GALERÍA
   ========================================= */
.gallery-section {
    padding: 100px 5%;
    background: radial-gradient(circle, rgba(61, 61, 61, 0.9), #050505);
}

.gallery-header {
    text-align: center;
    margin-bottom: 50px;
}

.gallery-header .accent-line {
    margin: 15px auto 25px auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    cursor: pointer;
}

.gallery-item2 {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    cursor: pointer;
    grid-column: 1 / -1; 
}

.gallery-item img, .gallery-item2 img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.gallery-item::after, .gallery-item2::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 0px solid transparent;
    transition: border 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover img, .gallery-item2:hover img {
    filter: grayscale(0%);
    transform: scale(1.01);
}

.gallery-item:hover::after, .gallery-item2:hover::after {
    border: 3px solid var(--text-light); 
}

/* =========================================
   7. EXPOSITOR DE PUBLICACIONES (CARRUSEL)
   ========================================= */
.publications-section {
    padding: 80px 5%;
    background-color: #0a0a0a;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.carousel-track {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 0;
    /* Ocultar barra de scroll para que quede más limpio */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.carousel-track::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.carousel-item {
    flex: 0 0 auto;
    width: 326px; /* Ancho fijo para los embeds de Instagram */
    border-radius: 8px;
    background-color: transparent;
    transition: transform 0.3s ease;
}

.carousel-item:hover {
    transform: translateY(-5px);
}

/* Botones de navegación del carrusel */
.carousel-btn {
    background-color: rgba(22, 22, 22, 0.8);
    color: var(--text-light);
    border: 2px solid var(--accent-red);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    position: absolute;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background-color: var(--accent-red);
    transform: scale(1.1);
}

.left-btn {
    left: -25px;
}

.right-btn {
    right: -25px;
}

/* Tarjetas personalizadas para Enlaces Externos (X, Artículos) */
.custom-link-card {
    display: flex;
    height: 100%;
    min-height: 400px; /* Alinearse con los embeds de IG */
}

.custom-link-card a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    text-decoration: none;
    color: var(--text-light);
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 30px;
    transition: all 0.3s ease;
}

.custom-link-card.x-card a {
    background: linear-gradient(145deg, #111, #000);
}

.custom-link-card a:hover {
    border-color: var(--accent-yellow);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--accent-yellow);
}

.card-content p {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 25px;
}

.read-more {
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--accent-red);
}


/* =========================================
   8. FOOTER Y BOTONES INFERIORES
   ========================================= */
footer {
    text-align: center;
    padding: 80px 20px;
    background-color: #111111;
    border-top: 2px solid var(--accent-red);
}

footer h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.footer-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
}

.ig-link-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: transparent;
    border: 2px solid var(--accent-yellow);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.ig-icon-footer {
    width: 22px;
    height: 22px;
    fill: var(--accent-yellow);
    transition: fill 0.3s ease;
}

.ig-link-footer:hover {
    background-color: var(--accent-yellow);
}

.ig-link-footer:hover .ig-icon-footer {
    fill: var(--bg-dark);
}

footer p {
    margin-top: 20px;
    color: var(--text-gray);
    font-size: 0.8rem;
}

/* =========================================
   9. FORMULARIO MODAL DE CONTACTO
   ========================================= */
.contact-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 3000; 
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}

.contact-modal.active {
    opacity: 1; pointer-events: auto;
}

.contact-content {
    background-color: #111; padding: 50px;
    border: 2px solid var(--accent-red);
    width: 90%; max-width: 500px;
    position: relative; text-align: center;
    transform: translateY(30px); transition: transform 0.4s ease;
}

.contact-modal.active .contact-content {
    transform: translateY(0);
}

.close-contact {
    position: absolute; top: 15px; right: 25px;
    font-size: 30px; color: var(--text-gray);
    cursor: pointer; transition: color 0.3s ease;
}

.close-contact:hover {
    color: var(--text-light);
}

.contact-form {
    display: flex; flex-direction: column; gap: 20px;
    margin-top: 30px; text-align: left;
}

.contact-form input, .contact-form textarea {
    width: 100%; padding: 15px;
    background-color: #050505; border: 1px solid #333;
    color: white; font-family: 'Montserrat', sans-serif;
    transition: border-color 0.3s ease;
    
    /* PERMITE ESCRIBIR EN EL FORMULARIO */
    -webkit-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--accent-yellow); 
}

.contact-form textarea {
    resize: vertical; min-height: 120px;
}

/* =========================================
   10. LIGHTBOX (Galería Ampliada)
   ========================================= */
.lightbox {
    position: fixed;
    z-index: 2000; 
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img {
    max-width: 85%;
    max-height: 90vh; 
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    border: 3px solid var(--text-light);
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 50px;
    color: var(--text-gray);
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2001;
}

.close-lightbox:hover {
    color: var(--text-light);
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    color: var(--text-gray);
    cursor: pointer;
    padding: 20px;
    transition: color 0.3s ease, transform 0.2s ease;
    z-index: 2002;
    user-select: none;
}

.lightbox-prev { left: 2%; }
.lightbox-next { right: 2%; }

.lightbox-prev:hover, .lightbox-next:hover {
    color: var(--accent-yellow);
    transform: translateY(-50%) scale(1.1);
}

/* =========================================
   11. BOTÓN VOLVER ARRIBA
   ========================================= */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: rgba(22, 22, 22, 0.8);
    border: 2px solid var(--accent-red);
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1999;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    background-color: var(--accent-red);
    transform: translateY(-5px); 
}

/* =========================================
   12. ANIMACIONES JS GLOBALES
   ========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   13. RESPONSIVE (Móviles y Tablets)
   ========================================= */
@media (max-width: 900px) {
    .about-container { flex-direction: column; }
    .hero h1 { font-size: 3.5rem; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    
    /* Ocultar botones laterales del carrusel en tablet/móvil para hacer swipe con el dedo */
    .carousel-btn { display: none; }
}

@media (max-width: 600px) {
    /* 1. Contenedor principal del Header */
    .navbar { 
        flex-direction: column; 
        gap: 15px; 
        padding: 15px 5%;
        background-color: rgba(22, 22, 22, 0.98); /* Fondo oscuro reforzado */
    }

    /* 2. Centramos Logo e icono de IG arriba */
    .logo-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    /* 3. La caja que contiene los enlaces */
    .nav-links { 
        display: flex; 
        gap: 15px; 
        justify-content: center;
        flex-wrap: wrap;
        list-style: none; /* Quitamos los puntos de la lista por si acaso */
        padding: 0;
        margin: 0;
    }

    /* 4. EL ESTILO DE LOS ENLACES (Para que no se vean azules ni feos) */
    .nav-links a {
        color: var(--text-light); /* Blanco */
        text-decoration: none; /* Quitamos el subrayado */
        font-weight: 700; /* Letra gordita */
        text-transform: uppercase; /* Todo en mayúsculas */
        font-size: 0.75rem; /* Tamaño ideal para móvil */
        letter-spacing: 1px; /* Un poco de aire entre las letras */
        transition: color 0.3s ease;
    }

    /* Efecto al tocar el enlace */
    .nav-links a:hover, .nav-links a:active {
        color: var(--accent-yellow);
    }

    /* El resto de ajustes que ya tenías para la galería y botones */
    .gallery-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.8rem; }
    .footer-buttons { flex-direction: column; gap: 15px; }
    .contact-content { padding: 30px 20px; }
    .lightbox-prev, .lightbox-next { font-size: 40px; padding: 10px; }
    .lightbox-prev { left: 0%; }
    .lightbox-next { right: 0%; }
    #backToTop { bottom: 20px; right: 20px; width: 40px; height: 40px; font-size: 18px; }
}

    .gallery-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.8rem; }
    
    .footer-buttons { flex-direction: column; gap: 15px; }
    .contact-content { padding: 30px 20px; }
    
    .lightbox-prev, .lightbox-next { font-size: 40px; padding: 10px; }
    .lightbox-prev { left: 0%; }
    .lightbox-next { right: 0%; }

    #backToTop { bottom: 20px; right: 20px; width: 40px; height: 40px; font-size: 18px; }
}