/* =========================================
   1. CONFIGURACIÓN BASE (Variables, Reset, Body)
   ========================================= */
:root {
  --primary-color: #2c3e50;
  --accent-color: #e67e22;
  --text-dark: #333333;
  --text-white: #ffffff;
  --bg-light: #f4f4f4;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Lato', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  padding-top: 80px;
}

h1, h2, h3, .logo {
  font-family: 'Righteous', cursive;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* =========================================
   2. LAYOUT GENERAL (Header, Nav, Footer)
   ========================================= */
#main-header {
  background-color: var(--primary-color);
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  height: 80px;
  display: flex;
  align-items: center;
}

.container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
}

#main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- LOGO --- */
.logo {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--text-white);
  font-size: 1.5rem;
}

.logo-img-container {
  width: 50px;
  height: 50px;
  background: var(--text-white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.logo-img-container img {
  width: 80%;
  height: auto;
}

/* --- MENÚ PRINCIPAL --- */
#main-menu > ul {
  display: flex;
  gap: 20px;
  align-items: center;
}

#main-menu > ul > li {
  position: relative;
}

#main-menu a {
  color: var(--text-white);
  font-weight: 700;
  padding: 10px;
  display: block;
  transition: color 0.3s;
}

#main-menu a:hover {
  color: var(--accent-color);
}

.btn-contact {
  background-color: var(--accent-color);
  padding: 8px 20px !important;
  border-radius: 20px;
  color: white !important;
}

.btn-contact:hover {
  background-color: #d35400 !important;
}

/* --- SUBMENÚS (DROPDOWNS) --- */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  min-width: 180px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border-radius: 4px;
  z-index: 100;
}

.submenu li {
  width: 100%;
}

.submenu a {
  color: var(--text-dark) !important;
  padding: 12px 15px !important;
  border-bottom: 1px solid #eee;
  font-weight: 400 !important;
}

.submenu a:hover {
  background-color: #f9f9f9;
  color: var(--accent-color) !important;
}

.submenu.show {
  display: block;
}

.arrow {
  font-size: 0.8em;
  margin-left: 5px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

.hero {
  /* Imagen para PC */
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero_desktop.jpg');
  
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Efecto Parallax */
  color: white;
  text-align: center;
  padding: 80px 20px;
  
  /* Altura para PC */
  height: 85vh; 
  
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero h2 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: var(--accent-color);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero p {
  font-size: 1.5rem;
  max-width: 800px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

#main-footer {
  background-color: #1a252f; /* Un tono más oscuro que tu azul primario */
  color: #ecf0f1; /* Blanco grisáceo para leer cómodo */
  padding-top: 50px;
  margin-top: 0; /* Quitamos márgenes si los había */
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap; /* Para móvil */
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1); /* Línea separadora sutil */
}

.footer-col {
  flex: 1 1 250px; /* Columnas flexibles */
}

.footer-col h3 {
  color: var(--accent-color); /* Naranja */
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 10px;
  color: #bdc3c7; /* Gris claro */
}

/* Enlaces del footer */
.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #bdc3c7;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: var(--accent-color);
  padding-left: 5px; /* Pequeño movimiento al pasar el mouse */
}

/* Redes Sociales (Simuladas) */
.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.social-icons span {
  background: rgba(255,255,255,0.1);
  width: 35px;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.3s;
}

.social-icons span:hover {
  background: var(--accent-color);
}

/* Barra inferior de Copyright */
.footer-bottom {
  text-align: center;
  padding: 20px 0;
  font-size: 0.8rem;
  color: #7f8c8d;
}

/* =========================================
   3. RESPONSIVE (Móviles / Tablets)
   ========================================= */
@media (max-width: 768px) {
  
  .menu-toggle {
    display: block;
  }

  #main-menu {
    position: absolute;
    top: 80px; 
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  #main-menu.active {
    max-height: 100vh;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  #main-menu > ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
  }

  #main-menu > ul > li {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  #main-menu a {
    padding: 15px 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
  }

  .submenu {
    position: static;
    width: 100%;
    box-shadow: none;
    background-color: rgba(0,0,0,0.1);
  }

  .submenu a {
    color: #ddd !important;
    padding-left: 40px !important;
  }

  /* --- HERO MÓVIL --- */
  .hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/hero_mobile.jpg');
    height: 70vh; 
    background-attachment: scroll;
  }
}

/* =========================================
   3. COMPONENTES REUTILIZABLES (Botones, Tarjetas)
   ========================================= */

.models-preview {
  padding: 60px 0;
  background-color: #f9f9f9;
  text-align: center;
}

.models-preview h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 40px;
}

.cards-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
}

.model-card {
  background: white;
  flex: 1 1 250px;
  max-width: 350px;  
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.model-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.card-image {
  height: 200px;
  width: 100%;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.model-card:hover .card-image img {
  transform: scale(1.1);
}

.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.card-content h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.card-content p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 20px;
  line-height: 1.5;
}

.btn-card {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s;
  align-self: center;
}

.btn-card:hover {
  background-color: var(--accent-color);
  color: white;
}

/* =========================================
   4. SECCIONES ESPECÍFICAS (Historia, Videos)
   ========================================= */

.workshop-section {
  background-color: var(--primary-color); 
  color: white;
  padding: 60px 0;
  text-align: center;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 50px; 
  color: var(--accent-color);
  font-family: 'Righteous', cursive;
}

/* Grilla de Ítems */
.workshop-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
}

.workshop-item {
  background-color: rgba(255, 255, 255, 0.1); 
  padding: 30px;
  border-radius: 10px;
  flex: 1 1 250px;
  max-width: 350px;
  transition: transform 0.3s ease, background 0.3s;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
}

.workshop-item:hover {
  transform: translateY(-5px);
  background-color: rgba(255, 255, 255, 0.2);
}

.icon-box {
  font-size: 3rem;
  margin-bottom: 15px;
}

.workshop-item h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text-white);
  font-family: 'Righteous', cursive;
}

.workshop-item p {
  font-size: 1rem;
  color: #ddd;
  line-height: 1.5;
}

/* Ajuste móvil */
@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
    margin-bottom: 30px;
  }
}

/* =========================================
   PÁGINAS INTERNAS (ESTILOS COMUNES)
   ========================================= */

/* Cabecera simple para títulos de página */
.page-title-header {
  background-color: var(--primary-color);
  color: white;
  padding: 60px 0 40px 0;
  text-align: center;
}

.page-title-header h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  color: var(--accent-color);
}

.split-section {
  padding: 80px 0;
}

.alt-bg {
  background-color: #f4f7f6; 
}

.split-container {
  display: flex;
  align-items: center;
  gap: 50px;
}

.split-container.reverse {
  flex-direction: row-reverse;
}

/* El bloque de texto */
.split-text {
  flex: 1;
}

.split-text h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.split-text p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #555;
}

.split-image {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.split-image img {
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15); 
  max-height: 400px;
  object-fit: cover;
}

/* Pie de foto pequeño */
.img-caption {
  display: block;
  margin-top: 10px;
  font-size: 0.9rem;
  color: #777;
  font-style: italic;
}

.cultural-icon-section {
  padding: 80px 0;
}

.text-center {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

.full-width-image-container img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
}

/* =========================================
   RESPONSIVE PARA HISTORIA
   ========================================= */
@media (max-width: 768px) {
  .page-title-header h1 {
    font-size: 2.2rem;
  }

  .split-container {
    flex-direction: column;
    gap: 30px;
  }

  .split-container.reverse {
    flex-direction: column-reverse;
  }

  .split-image img {
    width: 100%;
    max-height: auto;
  }
}

/* =========================================
   PÁGINA DE MODELOS
   ========================================= */

.model-detail-section {
  padding: 60px 0;
}

.model-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
}

.model-header h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin: 0;
}

.badge {
  background-color: var(--primary-color);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
}

.model-content {
  display: flex;
  gap: 40px;
}

.model-img-large {
  flex: 1;
}

.model-img-large img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.model-info {
  flex: 1;
}

.model-info p {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.tech-specs {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.tech-specs th, 
.tech-specs td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.tech-specs th {
  background-color: #f9f9f9;
  color: var(--primary-color);
  width: 40%;
  font-weight: bold;
}

.tech-specs tr:last-child td,
.tech-specs tr:last-child th {
  border-bottom: none;
}

/* Separador entre modelos */
.separator {
  border: 0;
  height: 1px;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
  margin: 0;
}

/* Responsive para Modelos */
@media (max-width: 768px) {
  .model-content {
    flex-direction: column;
  }
  
  .model-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

.modern-era-section {
  padding: 60px 0 80px 0;
  background-color: #f4f7f6;
  text-align: center;
}

.modern-header {
  max-width: 800px;
  margin: 0 auto 40px auto;
}

.modern-header h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.modern-grid {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.modern-card {
  background: white;
  padding: 25px;
  border-radius: 8px;
  flex: 1 1 250px;
  max-width: 350px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  border-top: 4px solid #bdc3c7;
}

.modern-card h4 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.modern-card p {
  font-size: 0.95rem;
  color: #666;
}

.modern-card.highlight {
  border-top-color: var(--accent-color);
  background-color: #fffaf0;
}

.modern-card.highlight h4 {
  color: var(--accent-color);
}

/* =========================================
   GALERÍA (USANDO CSS GRID)
   ========================================= */
.gallery-section {
  padding: 60px 0;
  background-color: white;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
}

.gallery-item {
  position: relative;
  height: 250px;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6); 
  color: white;
  padding: 10px;
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .overlay {
  transform: translateY(0);
}


/* =========================================
   SECCIÓN DE VIDEOS
   ========================================= */
.videos-section {
  padding: 60px 0;
  background-color: #f4f7f6;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.video-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Contenedor del Iframe para hacerlo Responsive */
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; 
  background-color: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-info {
  padding: 20px;
}

.video-info h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.video-info p {
  font-size: 0.9rem;
  color: #666;
}