/* ============================================================
   AREA-DETALLE.CSS
   CSS compartido para todas las páginas de detalle
   de las áreas de trabajo.
   Estructura:
   1. Botón volver (esquina superior izquierda)
   2. Hero
   3. Contenido principal
   4. Párrafos
   5. Galería de imágenes
   6. Lightbox
   7. Botón volver final
   8. Responsive
============================================================ */


/* ============================================================
   1. BOTÓN VOLVER — fijo en esquina superior izquierda
============================================================ */
.btn-volver {
    position: fixed;
    top: 105px; /* Justo debajo de la navbar */
    left: 20px;
    z-index: 900;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 18, 38, 0.85);
    color: #ffffff;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: bold;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-volver:hover {
    background: rgba(255, 65, 54, 0.9);
    transform: translateX(-3px);
}

.btn-volver i { font-size: 0.9rem; }


/* ============================================================
   2. HERO
============================================================ */
.detalle-hero {
    position: relative;
    width: 100%;
    height: 60vh;
    overflow: hidden;
    margin-top: 0 !important;
    padding-top: 0 !important;
    background: #001226;
}

.detalle-hero-imagen {
    width: 100%;
    height: 100%;
}

.detalle-hero-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Overlay con gradiente inferior */
.detalle-hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.88) 0%,
        rgba(0,0,0,0.35) 50%,
        rgba(0,0,0,0.05) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 50px 8%;
}

/* Etiqueta de categoría */
.detalle-categoria {
    display: inline-block;
    background-color: #ff4136;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 5px 16px;
    border-radius: 20px;
    margin-bottom: 12px;
}

/* Título del hero */
.detalle-hero-overlay h2 {
    font-size: 3.8rem;
    color: #ffffff;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1;
}

.detalle-hero-overlay h2 span {
    color: #daa520; /* Palabra destacada en dorado */
}


/* ============================================================
   3. CONTENIDO PRINCIPAL
============================================================ */
.detalle-main {
    background-color: #f4f4f4;
    padding: 70px 20px 100px 20px;
}

.detalle-container {
    max-width: 1000px;
    margin: 0 auto;
}


/* ============================================================
   4. TÍTULO Y PÁRRAFOS
============================================================ */
.detalle-contenido {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 50px 55px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    margin-bottom: 40px;
}

/* Título de la sección */
.detalle-titulo {
    font-size: 2.2rem;
    color: #001226;
    font-weight: 900;
    margin-bottom: 12px;
}

/* Línea dorada decorativa */
.detalle-linea {
    width: 70px;
    height: 4px;
    background-color: #daa520;
    border-radius: 2px;
    margin-bottom: 35px;
}

/* Párrafos del contenido */
.detalle-parrafos p {
    color: #555555;
    font-size: 1.05rem;
    line-height: 1.9;
    text-align: justify;
    margin-bottom: 22px;
}

.detalle-parrafos p:last-child {
    margin-bottom: 0;
}


/* ============================================================
   5. GALERÍA DE IMÁGENES
============================================================ */
.detalle-galeria {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 40px 55px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    margin-bottom: 40px;
}

/* Título de la galería */
.detalle-galeria-titulo {
    font-size: 1.4rem;
    color: #001226;
    font-weight: 800;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detalle-galeria-titulo i {
    color: #daa520;
}

/* Grid de 3 imágenes */
.detalle-galeria-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* Cada imagen de la galería */
.detalle-galeria-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.detalle-galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.detalle-galeria-item:hover img {
    transform: scale(1.08);
}

/* Overlay con ícono de expandir */
.detalle-galeria-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 18, 38, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.detalle-galeria-item:hover .detalle-galeria-overlay {
    opacity: 1;
}

.detalle-galeria-overlay i {
    font-size: 2rem;
    color: #ffffff;
}


/* ============================================================
   6. LIGHTBOX
============================================================ */
.detalle-lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.detalle-lightbox.activo {
    display: flex;
}

.detalle-lightbox-contenido {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.detalle-lightbox-contenido img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

/* Botón cerrar del lightbox */
.detalle-lightbox-cerrar {
    position: absolute;
    top: -45px;
    right: 0;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.detalle-lightbox-cerrar:hover {
    background: #ff4136;
}


/* ============================================================
   7. BOTÓN VOLVER AL FINAL
============================================================ */
.detalle-volver-final {
    text-align: center;
    margin-top: 10px;
}

.btn-volver-final {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #001226;
    color: #ffffff;
    text-decoration: none;
    padding: 14px 35px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.95rem;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-volver-final:hover {
    background-color: #ff4136;
    transform: scale(1.04);
}

.btn-volver-final i { font-size: 0.9rem; }


/* ============================================================
   8. RESPONSIVE
============================================================ */
@media (max-width: 768px) {

    .detalle-hero { height: 45vh; }
    .detalle-hero-overlay h2 { font-size: 2.4rem; }

    .detalle-contenido { padding: 30px 25px; }
    .detalle-galeria   { padding: 30px 25px; }

    .detalle-titulo { font-size: 1.7rem; }

    .detalle-galeria-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-volver span { display: none; } /* En móvil solo muestra el ícono */
    .btn-volver { padding: 10px 14px; }
}

@media (max-width: 480px) {

    .detalle-hero-overlay h2 { font-size: 1.8rem; }

    .detalle-galeria-grid {
        grid-template-columns: 1fr;
    }

    .detalle-titulo { font-size: 1.4rem; }
}