/* ===========================
   PAGINAS DE PROYECTO
   Hero, secciones de detalle, galerias, carousel y lightbox.
   Antes estaba repetido dentro de cada pagina de proyecto.
   =========================== */

.hero-section {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
    padding: 4rem 0;
    margin-bottom: 4rem;
}

.hero-content {
    padding-right: 2rem;
}

.project-tag {
    display: inline-block;
    background: var(--accent-glow);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--accent);
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    border-left: 1px solid var(--border-color);
    padding-left: 1.5rem;
}

.action-buttons {
    display: flex; gap: 1rem; margin-bottom: 2.5rem; flex-wrap: wrap;
}
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; border-radius: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; font-size: 0.85rem;
    background: transparent; border: 1px solid var(--border-color); color: #fff;
    transition: 0.3s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(0, 212, 255, 0.05); }
.btn-primary { border-color: var(--accent); color: var(--accent); }
.btn-primary:hover { background: var(--accent); color: #000; box-shadow: 0 0 15px var(--accent-glow); }

.mini-highlights {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}
.mini-highlights h3 {
    font-size: 1.1rem; margin-bottom: 1rem; color: var(--accent);
    text-transform: uppercase; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem;
}
.highlight-list li {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    position: relative;
    padding-left: 1.2rem;
    color: var(--text-main);
}
.highlight-list li::before {
    content: ''; position: absolute; left: 0; top: 8px;
    width: 6px; height: 6px; background: var(--accent);
    box-shadow: 0 0 5px var(--accent);
}

.hero-media-wrapper {
    position: relative; height: 100%; display: flex; align-items: center;
}
.hero-image {
    width: 100%; border-radius: 12px; overflow: hidden;
    box-shadow: -20px 20px 60px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer; transition: transform 0.5s ease;
}
.hero-image:hover { transform: scale(1.02); border-color: var(--accent); }

.detail-section { margin-bottom: 8rem; }

.section-header {
    margin-bottom: 3rem; display: flex; align-items: center; gap: 1rem;
}
.section-header h3 { font-size: 2.5rem; }
.header-line { flex-grow: 1; height: 1px; background: linear-gradient(to right, var(--accent), transparent); }

.section-intro {
    font-size: 1.2rem; color: var(--text-muted); margin-bottom: 3rem; max-width: 1100px;
}
.highlight-text { color: var(--accent); font-weight: 500; }

.details-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-bottom: 4rem;
}
.details-column h4 {
    font-size: 1.1rem; color: var(--accent); margin-bottom: 1.5rem;
    text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem;
}
.styled-list li {
    position: relative; padding-left: 1.5rem; margin-bottom: 1rem; color: var(--text-main); font-size: 0.95rem;
}
.styled-list li::before {
    content: '>'; position: absolute; left: 0; color: var(--accent); font-weight: bold; font-family: monospace;
}

.impact-box {
    background: rgba(0, 212, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 2rem; border-radius: 6px;
}
.impact-box h5 { font-size: 1rem; color: #fff; margin-bottom: 1rem; text-transform: uppercase; }
.impact-box p { color: var(--text-muted); font-size: 0.95rem; }

.section-gallery {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 1.5rem;
}
.gallery-item {
    position: relative; border-radius: 8px; overflow: hidden; cursor: pointer; aspect-ratio: 16/9;
}
.gallery-item img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; opacity: 0.8;
}
.gallery-item:hover img { transform: scale(1.1); opacity: 1; }

.gallery-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0; transition: 0.3s;
    display: flex; align-items: flex-end; justify-content: center; padding-bottom: 1.5rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-caption {
    color: #fff; font-family: 'Orbitron'; font-size: 0.9rem; letter-spacing: 1px;
    transform: translateY(20px); transition: 0.3s;
}
.gallery-item:hover .gallery-caption { transform: translateY(0); }

.carousel-container {
    position: relative;
    padding: 0 60px;
    margin: 2rem 0;
}
.carousel-viewport {
    overflow: hidden;
    width: 100%;
}
.carousel-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.5s ease;
}
.carousel-track .gallery-item {
    flex: 0 0 calc(33.333% - 1rem);
    min-width: 300px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-panel);
    color: var(--accent);
    border: 1px solid var(--border-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    z-index: 10;
}
.carousel-btn:hover { background: var(--accent); color: #000; box-shadow: 0 0 15px var(--accent-glow); }
.carousel-btn.prev { left: 0; }
.carousel-btn.next { right: 0; }

@media (max-width: 1024px) {
    .carousel-track .gallery-item { flex: 0 0 calc(50% - 0.75rem); }
}
@media (max-width: 600px) {
    .carousel-container { padding: 0 40px; }
    .carousel-track .gallery-item { flex: 0 0 100%; }
}

.play-icon {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem; color: #fff; opacity: 0.5; transition: opacity 0.3s ease;
    z-index: 10; pointer-events: none;
}
.gallery-item:hover .play-icon { opacity: 0.8; color: var(--accent); }

.lightbox {
    display: none; position: fixed; z-index: 2000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.95); backdrop-filter: blur(8px);
    justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.lightbox.show { display: flex; opacity: 1; }
.lightbox-content-wrapper {
    position: relative; display: flex; justify-content: center; align-items: center;
    max-width: 90%; max-height: 90vh; width: 100%;
}
.lightbox-content, .lightbox-video { max-width: 100%; max-height: 85vh; border-radius: 4px; }
.lightbox-video { width: 80%; aspect-ratio: 16/9; background: #000; border: none; }

.close-btn {
    position: absolute; top: 30px; right: 40px;
    color: #fff; font-size: 3rem; cursor: pointer; transition: 0.3s; z-index: 2005;
    background: transparent; border: none; padding: 0; line-height: 1;
    font-family: inherit;
}
.close-btn:hover { color: var(--accent); transform: rotate(90deg); }

.nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: transparent; color: rgba(255,255,255,0.5); border: none;
    font-size: 3rem; cursor: pointer; transition: 0.3s; padding: 20px;
}
.nav-btn:hover { color: var(--accent); opacity: 1; }
.prev { left: 40px; } .next { right: 40px; }

@media (max-width: 1024px) {
    .hero-section { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
    .hero-content { padding-right: 0; }
    .hero-description { border-left: none; padding-left: 0; margin-left: auto; margin-right: auto; }
    .mini-highlights { text-align: left; }
    .action-buttons { justify-content: center; }
    .details-grid { grid-template-columns: 1fr; }
}


/* ===========================
   BLOQUES EXCLUSIVOS DE PROJECT-SHELTER
   Indice de sistemas y boton "back to index".
   =========================== */

.hero-image .gallery-overlay {
    opacity: 1;
}

.systems-index {
    margin: 4rem 0;
}

.index-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.index-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.index-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    transition: 0.3s;
    cursor: pointer;
    text-decoration: none;
}

.index-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.05);
}

.index-number {
    font-family: 'Orbitron';
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.index-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.index-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero-image .gallery-overlay {
    opacity: 0;
}

.hero-image:hover .gallery-overlay {
    opacity: 1;
}

.hero-image .gallery-caption {
    transform: translateY(20px);
}

.hero-image:hover .gallery-caption {
    transform: translateY(0);
}

.back-to-index {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent);
    color: #fff;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.back-to-index:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.5);
}

.back-to-index::before {
    content: "Go to Index";
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.back-to-index:hover::before {
    opacity: 1;
}

@media (max-width: 1024px) {
    .index-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .index-grid { grid-template-columns: 1fr; }
}


/* ===========================
   VARIANTE COMPACTA
   La usa project-shelter (<body class="project-compact">): mismo diseno,
   con las medidas algo mas ajustadas y su propio estilo de carousel.
   Reproduce exactamente lo que esa pagina tenia en su <style> inline.
   =========================== */

.project-compact .section-header { margin-bottom: 2rem; }
.project-compact .section-header h3 { font-size: 2rem; }
.project-compact .section-intro { font-size: 1.1rem; margin-bottom: 2rem; }
.project-compact .detail-section { margin-bottom: 5rem; }
.project-compact .details-grid { gap: 2rem; margin-bottom: 2.5rem; }
.project-compact .details-column h4 { font-size: 1rem; margin-bottom: 1rem; }
.project-compact .styled-list li { font-size: 0.9rem; margin-bottom: 0.8rem; }

.project-compact .impact-box { padding: 1.5rem; }
.project-compact .impact-box h5 { font-size: 0.95rem; margin-bottom: 0.8rem; }
.project-compact .impact-box p { font-size: 0.9rem; }

.project-compact .hero-image {
    position: relative;
    aspect-ratio: 16/9;
    box-shadow: -10px 10px 10px rgba(4, 105, 187, 0.233);
    transition: all 0.5s ease;
}
.project-compact .hero-image:hover { box-shadow: -20px 20px 60px rgba(0, 212, 255, 0.2); }

.project-compact .section-gallery { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.project-compact .gallery-item { width: 400px; max-width: 100%; }

.project-compact .carousel-container {
    padding: 0;
    margin: 0 60px;
    overflow: hidden;
}
.project-compact .carousel-btn {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: rgba(255, 255, 255, 0.8);
}
.project-compact .carousel-btn:hover {
    background: rgba(0, 212, 255, 0.3);
    color: var(--accent);
    box-shadow: none;
}
.project-compact .carousel-btn.prev { left: 10px; }
.project-compact .carousel-btn.next { right: 10px; }

@media (max-width: 1024px) {
    /* la variante compacta mantiene 3 columnas hasta 768px */
    .project-compact .carousel-track .gallery-item { flex: 0 0 calc(33.333% - 1rem); }
}

@media (max-width: 768px) {
    .project-compact .carousel-track .gallery-item { flex: 0 0 calc(50% - 0.75rem); }
}

@media (max-width: 600px) {
    .project-compact .carousel-container { padding: 0; }
}

@media (max-width: 480px) {
    .project-compact .carousel-track .gallery-item { flex: 0 0 100%; }
}

/* ===========================
   DETALLES
   =========================== */

/* Fondo tenue mientras la imagen baja: el hueco no queda en blanco
   y la pagina se siente mas rapida aunque tarde lo mismo. */
.gallery-item,
.hero-image {
    background-color: #14181f;
}

/* Mismo aire bajo la navbar que en la home, tambien en mobile. */
@media (max-width: 768px) {
    .hero-section { padding-top: 2.5rem; }
}

/* ===========================
   ESTILOS QUE ANTES ESTABAN INLINE EN EL HTML
   Los generaba a mano cada pagina; ahora el HTML lo escribe
   tools/build.py y estas reglas hacen exactamente lo mismo.
   =========================== */

/* Parrafo de arriba del panel de highlights */
.mini-highlights .panel-intro {
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Dentro del panel el acento no lleva peso extra, como estaba antes */
.mini-highlights .highlight-text {
    font-weight: inherit;
}

/* El nombre de cada highlight */
.highlight-list li strong {
    color: #fff;
}


/* ===========================
   HERO SIN MATERIAL VISUAL
   Para proyectos donde no se pueden mostrar capturas (NDA). El panel de
   highlights ocupa la columna donde iria la imagen; si tampoco hay panel,
   el hero pasa a una sola columna con el ancho de lectura acotado.
   =========================== */

.hero-media-wrapper > .mini-highlights {
    width: 100%;
}

.hero-section.hero-no-media {
    grid-template-columns: minmax(0, 980px);
    justify-content: start;
}


/* ===========================
   AVISO DE PAGINA
   Franja arriba de las secciones para dejar algo en claro antes de que
   se empiece a leer (NDA, work in progress). Lo arma tools/build.py.
   =========================== */

.page-notice {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 5rem;
}

.page-notice > i {
    color: var(--accent);
    font-size: 1.35rem;
    line-height: 1.4;
    flex-shrink: 0;
}

.page-notice strong {
    display: block;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.page-notice p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}
