@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Roboto:wght@300;400;500&display=swap');

:root {
  --color-ypf-orange: #e8a032;
  --color-ypf-dark-blue: #1b1c31;
  --color-bg-dark: #000000;
  --color-text-white: #ffffff;
  --color-text-gray: #e6e6e6;
  --color-panel-gray: #333333;
  --color-content-bg: #dcd5c5;
  --font-main: Tahoma, Verdana, Segoe, sans-serif;
  --max-width: 960px;
}

/* Reset basics */
* {
  box-sizing: border-box;
}

body {
  background-color: var(--color-bg-dark);
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  color: var(--color-text-white);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

/* Utilities */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.hidden-mobile {
  display: block;
}

/* Header */
.main-header {
  background-color: var(--color-ypf-dark-blue);
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  height: 90px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 15px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-img {
  height: auto;
}

.nav-menu {
  display: flex;
  gap: 20px;
}

.nav-menu a {
  color: var(--color-ypf-orange);
  font-size: 16px;
  letter-spacing: 1.2pt;
  text-transform: lowercase;
}

.nav-menu a:hover {
  color: var(--color-text-white);
}

/* Main Layout Grid */
.main-layout {
  display: grid;
  grid-template-columns: 245px 1fr;
  min-height: calc(100vh - 90px);
  margin-top: 90px;
  background-color: var(--color-content-bg);
}

/* Sidebar */
.sidebar {
  background-color: var(--color-panel-gray);
  padding: 30px 15px;
  text-align: right;
  color: var(--color-text-white);
}

.sidebar p {
  font-size: 12px;
  margin: 0 0 15px 0;
  line-height: 1.4;
}

.sidebar a.menu-item {
  display: block;
  font-size: 24px;
  color: var(--color-ypf-orange);
  margin-bottom: 5px;
  margin-top: 20px;
  letter-spacing: 2pt;
}

.sidebar a.menu-item:hover {
  color: var(--color-text-white);
}

/* Content Area */
.content-area {
  background-color: #cbcbcb;
  background-image: url('../index/img_fondo4.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  padding: 30px;
  color: #000;
  position: relative;
}

.content-box {
  background: rgba(255, 255, 255, 0.7);
  padding: 30px;
  border-radius: 4px;
  text-align: center;
}

.welcome-title {
  font-size: 32px;
  margin-bottom: 20px;
  display: block;
}

.welcome-text {
  font-size: 17px;
  margin-bottom: 30px;
  display: block;
  text-align: left;
}

/* Footer */
.main-footer {
  background-color: #666;
  color: var(--color-text-gray);
  font-size: 14px;
}

.footer-top {
  display: grid;
  grid-template-columns: 245px 1fr;
}

.footer-brand {
  background-color: #cc6633;
  padding: 10px 15px;
  text-align: right;
  color: #fff;
}

.footer-links {
  text-align: right;
  padding: 10px 30px;
}

.footer-links a {
  margin-left: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    padding: 10px;
    height: auto;
  }

  .main-header {
    height: auto;
    position: relative;
  }

  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
  }

  .main-layout {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .sidebar {
    text-align: center;
    padding: 20px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand,
  .footer-links {
    text-align: center;
    width: 100%;
  }

  .footer-links a {
    display: block;
    margin: 10px 0;
    margin-left: 0;
  }
}

/* =========================================
   ESTILO: LA BITÁCORA (Editorial / Museo)
   ========================================= */

.ficha-bitacora-container {
    background-color: #fdfdfd; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-radius: 2px;
    overflow: hidden;
    color: #333;
    font-family: 'Roboto', sans-serif;
}

/* --- Hero Section Parallax --- */
.ficha-bitacora-hero {
    position: relative;
    width: calc(100% + 60px);
    margin-left: -30px;
    margin-top: -30px; 
    margin-bottom: 40px;
    height: 450px;
    background-position: center;
    background-size: cover;
    display: flex;
    align-items: flex-end;
}

/* Overlay actualizado para Flexbox (Titulo Izq / Botones Der) */
.ficha-hero-overlay {
    background: linear-gradient(to top, rgba(27,28,49, 0.95) 0%, rgba(27,28,49, 0.4) 50%, transparent 100%);
    width: 100%;
    padding: 60px 40px 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.ficha-title-block {
    text-align: left;
}

.ficha-bitacora-title {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    color: #fff;
    margin: 0;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    line-height: 1;
}

.ficha-bitacora-subtitle {
    font-family: 'Roboto', sans-serif;
    color: var(--color-ypf-orange);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block;
    font-weight: 500;
}

/* --- Navegación Editorial (Botones al pie) --- */
.ficha-nav-editorial {
    display: flex;
    gap: 10px;
    margin-left: 20px;
    padding-bottom: 5px; /* Alineación óptica con el texto */
}

.nav-btn-editorial {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 2px; /* Ligeramente redondeado pero serio */
    font-size: 18px;
}

.nav-btn-editorial:hover {
    background: var(--color-ypf-orange);
    border-color: var(--color-ypf-orange);
    color: #fff;
    cursor: pointer;
}

/* Estado deshabilitado visualmente */
.nav-btn-editorial.disabled {
    opacity: 0.3;
    pointer-events: none;
    border-color: transparent;
}

/* --- Layout Principal --- */
.ficha-main-content {
    padding: 0 40px 40px 40px;
}

/* Sección Datos Técnicos */
.ficha-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: var(--color-ypf-dark-blue);
    margin-bottom: 25px;
    margin-top: 10px;
    border-bottom: 2px solid var(--color-ypf-orange);
    display: inline-block;
    padding-bottom: 5px;
}

.ficha-specs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

@media(min-width: 900px) {
    .ficha-specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ficha-specs-group {
    margin-bottom: 20px;
}

.specs-group-name {
    font-size: 14px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: 700;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.spec-label {
    color: #555;
    font-weight: 400;
}

.spec-value {
    color: #000;
    font-weight: 600;
    text-align: right;
}

/* Sección Narrativa */
.ficha-narrative-block {
    max-width: 800px;
    margin: 0 auto 60px auto;
}

.ficha-text-body {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    line-height: 1.8;
    color: #444;
    text-align: justify;
}

.ficha-text-body strong {
    color: var(--color-ypf-dark-blue);
}

.ficha-text-body::first-letter {
    float: left;
    font-size: 60px;
    line-height: 50px;
    padding-right: 15px;
    padding-top: 5px;
    color: var(--color-ypf-orange);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.ficha-separator {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #ccc, transparent);
    margin: 40px 0;
}

/* Galería (Grid Uniforme 90x90) */
.ficha-gallery-section {
    margin-top: 60px;
}

/* Usamos auto-fill para que entren tantas columnas de 90px como quepan */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, 90px);
    gap: 15px;
    justify-content: center; /* Centra el bloque de fotos si sobra espacio */
}

.gallery-item {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    /* TAMAÑO FIJO 90x90 */
    width: 90px;
    height: 90px;
    background-color: #eee; /* Fondo mientras carga */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* CLAVE: Recorta la imagen para llenar el cuadro 90x90 */
    object-position: center; /* Centra la foto */
    display: block;
    transition: transform 0.5s ease, filter 0.3s ease;
    filter: sepia(20%);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
    filter: sepia(0%);
}

/* Responsive ajustes generales */
@media (max-width: 768px) {
    .ficha-bitacora-hero {
        height: 350px;
        margin-left: -15px;
        width: calc(100% + 30px);
    }
    
    .ficha-hero-overlay {
        flex-direction: column;
        align-items: center;
        text-align: center;
        justify-content: flex-end;
        padding-bottom: 40px;
    }

    .ficha-title-block {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .ficha-bitacora-title {
        font-size: 32px;
    }

    .ficha-nav-editorial {
        margin-left: 0;
    }
    
    .ficha-main-content {
        padding: 0 15px 30px 15px;
    }
    
    .ficha-text-body {
        font-size: 16px;
        text-align: left;
    }
}
