/* ⚙️ Configuración base */
:root {
    --negro: #121212;
    --gris-oscuro: #1e1e1e;
    --gris-claro: #2d2d2d;
    --azul: #0077b6;
    --naranja: #ff6b35;
    --blanco: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--negro);
    color: var(--blanco);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* 🔝 BARRA SUPERIOR */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--transparent);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.logo img {
    height: 80px;
    transition: transform 0.3s;
}

.logo img:hover {
    transform: scale(1.05);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav ul li a {
    color: var(--blanco);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
    position: relative;
}

nav ul li a:hover {
    color: var(--naranja);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--naranja);
    transition: width 0.3s;
}

nav ul li a:hover::after {
    width: 100%;
}

.carrito {
    position: relative;
    cursor: pointer;
    color: var(--blanco);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.carrito:hover {
    color: var(--naranja);
}

.carrito .contador-carrito {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--naranja);
    color: var(--negro);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* 🎞️ SLIDER FUNCIONAL CON TRANSICIÓN */
.slider {
    width: 100%;
    height: 70vh;
    margin-top: 80px;
    overflow: hidden;
    position: relative;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-text {
    position: absolute;
    bottom: 15%;
    left: 10%;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    max-width: 500px;
    animation: slideIn 1s ease-in-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-text h2 {
    color: var(--naranja);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.slide-text p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Controles del slider */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: rgba(255, 107, 53, 0.8);
}

.prev { left: 2%; }
.next { right: 2%; }

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.dot.active, .dot:hover {
    background: var(--naranja);
}

/* 📝 SOBRE NOSOTROS */
.nosotros {
    padding: 4rem 5%;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9));
}

.nosotros h2 {
    color: var(--azul);
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
    position: relative;
    display: inline-block;
}

.nosotros h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--naranja);
}

.nosotros p {
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* 🟦 GRID DE comments (4x4) CON ADAPTACIÓN PERFECTA */
.comments {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 2rem 5%;
}

.comment {
    background: var(--gris-claro);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
}

.comment:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* CONTENEDOR DE IMAGEN - AQUÍ CONTROLAS EL TAMAÑO */
.comment .image-container {
    position: relative;
    width: 100%;
    height: 300px; /* ← CAMBIA ESTE VALOR PARA AJUSTAR ALTURA */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gris-oscuro);
}

/* ESTILOS PARA LAS IMÁGENES - AQUÍ ESTÁ LA MAGIA DE ADAPTACIÓN */
.comment img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* ← 'contain' para ver imagen completa */
    transition: all 0.3s ease;
}

/* Imagen hover */
.comment .hover-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Efecto hover */
.comment:hover .main-img {
    opacity: 0;
}

.comment:hover .hover-img {
    opacity: 1;
}

.comment h3 {
    padding: 1rem 1rem 0;
    color: var(--azul);
    font-size: 1.2rem;
}

.comment p {
    padding: 0 1rem 1.5rem;
    font-size: 0.9rem;
    color: var(--gris-blanco);
}

/* 📊 ESTADÍSTICAS CON ICONOS PERSONALIZADOS */
.estadisticas {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 3rem 5%;
    background: var(--gris-oscuro);
    flex-wrap: wrap;
}

.estadistica {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    min-width: 200px;
}

.estadistica i {
    font-size: 2.5rem;
    color: var(--azul);
    margin-bottom: 1rem;
}

.profesional-icon {
    display: flex;
    gap: 5px;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--naranja);
    margin-bottom: 1rem;
}

.estadistica h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--naranja);
}

.estadistica p {
    color: var(--gris-blanco);
}

/* 💬 TESTIMONIOS */
.comentarios {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 3rem 5%;
    background: var(--negro);
    flex-wrap: wrap;
}

.comentario {
    background: var(--gris-claro);
    padding: 1.5rem;
    border-radius: 10px;
    max-width: 350px;
    text-align: center;
    transition: transform 0.3s;
}

.comentario:hover {
    transform: translateY(-5px);
}

.comentario img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
    border: 3px solid var(--naranja);
}

.comentario p {
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.comentario h4 {
    color: var(--azul);
    font-weight: bold;
}

/* 📜 PIE DE PÁGINA */
footer {
    background: var(--gris-oscuro);
    padding: 2rem 5%;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--blanco);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--naranja);
}

.social-media {
    display: flex;
    gap: 1.5rem;
}

.social-media a {
    color: var(--blanco);
    font-size: 1.5rem;
    transition: all 0.3s;
}

.social-media a:hover {
    color: var(--naranja);
    transform: translateY(-3px);
}

.footer-logo img {
    height: 40px;
    margin-bottom: 0.5rem;
}

.footer-logo p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* ✨ FONDO ANIMADO (estrellas + GIF) */
.fondo-animado {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.estrellas {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('assets/stars.png');
    background-size: 200px 200px;
    animation: moverEstrellas 120s linear infinite;
    opacity: 0.7;
}

@keyframes moverEstrellas {
    0% { background-position: 0 0; }
    100% { background-position: 2000px 0; }
}

.gif-fondo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centra perfectamente */
    width: 100%;
    height: 100%;
    opacity: 0.1;
    object-fit: cover; /* Para que cubra sin distorsionar */
}

.gif-fondo img {
    width: 100%;
    height: auto;
	object-fit: cover;
}

/* 📱 RESPONSIVE (móviles y tablets) */
@media (max-width: 1024px) {
    .comments {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .comments {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .comment .image-container {
        height: 200px; /* Altura para tablets */
    }

    .estadisticas, .comentarios {
        flex-direction: column;
        align-items: center;
    }

    .slide-text {
        bottom: 10%;
        left: 5%;
        max-width: 90%;
    }

    .slide-text h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .comments {
        grid-template-columns: 1fr;
    }
    
    .comment .image-container {
        height: 180px; /* Altura para móviles */
    }

    .nosotros h2 {
        font-size: 1.8rem;
    }

    .nosotros p {
        font-size: 1rem;
    }
}

/* ⚠️ Menú: "Láminas" destacado */
nav ul li a.active {
    color: var(--naranja);
}

nav ul li a.active::after {
    width: 100%;
    background: var(--naranja);
}

/* 🔐 SISTEMA DE AUTENTICACIÓN */
.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-login, .btn-register {
    background: var(--naranja);
    color: var(--negro);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-login:hover, .btn-register:hover {
    background: #e65c27;
    transform: translateY(-2px);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--naranja);
    object-fit: cover;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--gris-oscuro);
    border-radius: 5px;
    padding: 0.5rem 0;
    min-width: 150px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: none;
    z-index: 1001;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--blanco);
    text-decoration: none;
    transition: background 0.3s;
}

.user-dropdown a:hover {
    background: var(--gris-claro);
    color: var(--naranja);
}

/* 📱 RESPONSIVE PARA AUTENTICACIÓN */
@media (max-width: 768px) {
    .auth-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-login, .btn-register {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .user-menu span {
        display: none;
    }
}

