/* ====== Fuente Montserrat Semibold para títulos ====== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600; /* Semibold */
}

/* ====== RESETEO BÁSICO ====== */
html {
  box-sizing: border-box;
}
*, *::before, *::after {
  box-sizing: inherit;
}

body, html {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  height: 100%;
  overflow-x: hidden;
}

/* Asegura que medios no desborden en móvil */
img, video, canvas, iframe {
  max-width: 100%;
  height: auto;
}

/* Evita que header/footer con padding excedan el ancho */
header, footer {
  max-width: 100vw;
}

/* Evita desbordes por palabras/URLs largas */
.blog-card h3, .blog-card p, #view-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Limita el ancho del menú móvil */
#menu-nav {
  max-width: 100vw;
}

/* ====== VIDEO DE FONDO ====== */
#bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

/* ====== HEADER ====== */
header {
  width: 100%;
  background: #000; /* fondo negro siempre */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  transform: translateY(-100%);
  animation: slideDown 1s ease forwards;
}

@keyframes slideDown {
  to {
    transform: translateY(0);
  }
}

.logo {
  height: 80px;
  margin-right: 20px;
  transform: scale(0);
  animation: zoomIn 1s ease forwards;
  animation-delay: 0.5s;
}

@keyframes zoomIn {
  to {
    transform: scale(1);
  }
}

/* ====== HEADER ====== */
header {
  width: 100%;
  background: #000;              /* fondo negro siempre */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
  position: fixed;                /* fijo para que acompañe el scroll */
  top: 0;
  left: 0;
  z-index: 10000;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* Fondo negro al hacer scroll */
header.header-solid { background: #000 !important; background-color: #000 !important; box-shadow: 0 2px 10px rgba(0,0,0,0.3); }
/* Alternativa robusta: clase en body */
body.scrolled header { background: #000 !important; box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important; }

@keyframes slideDown {
  to {
    transform: translateY(0);
  }
}

.logo {
  height: 80px;
  margin-right: 20px;
  transform: scale(0);
  animation: zoomIn 1s ease forwards;
  animation-delay: 0.5s;
}

@keyframes zoomIn {
  to {
    transform: scale(1);
  }
}

/* ====== MENÚ ====== */
nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  gap: 40px;
}

nav ul li {
  margin: 0 15px;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInUp 0.8s ease forwards;
}

nav ul li:nth-child(1) { animation-delay: 0.5s; }
nav ul li:nth-child(2) { animation-delay: 0.7s; }
nav ul li:nth-child(3) { animation-delay: 0.9s; }
nav ul li:nth-child(4) { animation-delay: 1.1s; }
nav ul li:nth-child(5) { animation-delay: 1.3s; }
nav ul li:nth-child(6) { animation-delay: 1.5s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

nav ul li a {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: #F23805;
}






/* ===== BUNKER BLOGS ===== */
.bunker-blogs {
  width: 100%;
  min-height: 100vh;
  background: rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  color: white;
}

.bunker-blogs h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 42px;
  margin-bottom: 20px;
}

#new-blog-btn {
  background: #ff6600;
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 10px;
  margin-bottom: 30px;
  cursor: pointer;
  font-size: 16px;
}

#blogs-container {
  display: flex;
  flex-direction: column; /* ✅ tarjetas apiladas en vertical */
  gap: 25px;
  width: 100%;
  max-width: 1000px;
}

/* ===== Tarjetas de vista previa ===== */
.blog-card {
  display: flex;                /* ✅ horizontal */
  flex-direction: row;
  align-items: flex-start;
  background: white;
  color: black;
  border-radius: 15px;
  padding: 15px;
  box-shadow: 0px 4px 10px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform 0.2s;
  height: 180px;                /* rectángulo largo */
}
.blog-card:hover {
  transform: scale(1.03);
}
.blog-card img {
  width: 40%;                   /* imagen ocupa parte izquierda */
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.blog-card div {
  flex: 1;
  padding-left: 15px;
  overflow: hidden;
}
.blog-card h3 {
  margin: 0 0 10px 0;
  font-size: 20px;
}
.blog-card p {
  font-size: 14px;
  color: #333;
  max-height: 80px;
  overflow: hidden;             /* ✅ corta texto */
}

/* ===== Botones de acción ===== */
.blog-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}
.blog-actions button {
  flex: 1;
  padding: 6px;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  font-size: 13px;
}
.edit-btn { background: #4B6034; color: white; }
.delete-btn { background: #d32f2f; color: white; }

/* ===== MODAL GENERAL ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
}

/* ===== Modal Crear Blog ===== */
.modal-content {
  background: white;
  padding: 25px;
  border-radius: 15px;
  max-width: 600px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;   /* ✅ centra todos los elementos */
  justify-content: center;
  text-align: center;
  gap: 12px;             /* espacio uniforme entre elementos */
}

.modal-content h3 {
  margin-bottom: 10px;
  font-size: 22px;
  font-family: 'Montserrat', sans-serif;
}

.modal-content label {
  align-self: flex-start; /* ✅ labels alineados al inicio */
  font-weight: bold;
  margin: 5px 0 2px 0;
}

.modal-content input, 
.modal-content textarea {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}

/* ✅ Textarea fijo con scroll */
.modal-content textarea {
  resize: none;
  height: 200px;
  overflow-y: auto;
  line-height: 1.5;
}

.modal-content button {
  background: #ff6600;
  color: white;
  padding: 10px;
  border: none;
  margin-top: 10px;
  cursor: pointer;
  border-radius: 8px;
}

.close, .close-view {
  float: right;
  font-size: 20px;
  cursor: pointer;
  color: red;
}

/* ===== Modal Ver Blog ===== */
#blog-view-modal .modal-content {
  max-width: 1000px;
  width: 95%;
  max-height: 90vh;           /* ✅ se adapta a pantalla */
  display: flex;
  flex-direction: row;        /* ✅ dos columnas: izq y der */
  gap: 20px;
  padding: 20px;
  overflow: hidden;           /* scroll solo en texto */
  align-items: flex-start;
}

/* Columna izquierda (título + imagen) */
#view-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 40%;
}

#view-title {
  font-size: 22px;
  margin-bottom: 15px;
  font-weight: bold;
  text-align: center;
  width: 100%;
}

#view-img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;        /* ✅ nunca se deforma */
  border-radius: 10px;
  background: #f9f9f9;
  padding: 5px;
}

/* Columna derecha (texto del blog) */
#view-text-container {
  flex: 2;
  max-height: 80vh;           /* ✅ limita al alto de pantalla */
  overflow-y: auto;           /* ✅ scroll solo en el texto */
  text-align: left;
  padding-right: 10px;
}

#view-text {
  line-height: 1.6;
  white-space: pre-wrap;
  font-size: 16px;
  text-align: justify;
}

/* ✅ Responsive: en móviles se apila */
@media (max-width: 768px) {
  #blog-view-modal .modal-content {
    flex-direction: column;
    align-items: center;
  }
  #view-left {
    max-width: 100%;
  }
  #view-img {
    max-height: 30vh;
  }
  #view-text-container {
    max-height: 40vh;
    width: 100%;
  }
}



/* ====== FOOTER ====== */
footer {
  position: relative;
  color: #fff;
  text-align: center;
  padding: 40px 20px;
  z-index: 1;
  background: rgba(0,0,0,0.6);
}

.footer-top {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.footer-item h3 {
  margin-bottom: 10px;
  font-size: 28px;
  font-weight: bold;
  position: relative;
}

.footer-item h3::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 5px;
  background-color: #F23805;
  border-radius: 3px;
}

.footer-item p {
  font-size: 16px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.3);
  padding-top: 15px;
  font-size: 14px;
}

.social-icons {
  margin: 15px 0;
}

.social-icons a {
  margin: 0 10px;
  font-size: 22px;
  color: #fff;
  transition: transform 0.3s, color 0.3s;
}

.social-icons a:hover {
  transform: scale(1.2);
  color: #1e90ff;
}

.footer-title-link {
  display: block;
  font-size: 40px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  margin-bottom: 30px;
  text-align: center;
  transition: color 0.3s, transform 0.3s;
}

.footer-title-link:hover {
  color: #F23805;
  transform: scale(1.05);
}

/* ====== BARRA INFERIOR IZQUIERDA ====== */
.barra-redes {
  position: fixed;
  bottom: 20px;                  /* 🔹 se pega abajo */
  left: 20px;                    /* 🔹 se pega a la izquierda */
  background: rgba(0, 0, 0, 0.9); /* fondo negro */
  padding: 10px 15px;
  border-radius: 10px;           /* bordes redondeados */
  display: flex;
  flex-direction: row;           /* 🔹 en fila horizontal */
  align-items: center;
  gap: 15px;                     /* separación entre iconos */
  z-index: 2000;
}

/* Íconos dentro de la barra */
.barra-redes a img {
  width: 35px;
  height: 35px;
  transition: transform 0.3s, filter 0.3s;
  cursor: pointer;
}

/* Hover: efecto zoom y color */
.barra-redes a img:hover {
  transform: scale(1.2);
  filter: brightness(1) invert(0);   /* recupera color original */
}

/* ====== ICONOS DE REDES EN EL FOOTER ====== */
.footer-bottom .social-icons {
  display: flex;
  justify-content: center;
  gap: 20px; /* separación entre íconos */
  margin: 15px 0;
}

.footer-bottom .social-icons a img {
  width: 35px;
  height: 35px;
  transition: transform 0.3s, filter 0.3s;
  cursor: pointer;
}

.footer-bottom .social-icons a img:hover {
  transform: scale(1.2);
  filter: brightness(1) invert(0); /* recupera color original */
}


/* ====== MARCA DE AGUA ====== */
.marca-agua {
  position: fixed;
  bottom: 20px;
  right: 20px;
  opacity: 0.4;
  z-index: 9999;
  pointer-events: none;
  width: 250px;
}

/* Ocultar botón hamburguesa en pantallas grandes (PC) */
#menu-toggle {
  display: none;
  font-size: 30px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 110;
  position: fixed;
  top: 15px;
  right: 20px;
}

/* ====== 🔹 RESPONSIVE DESIGN COMPLETO 🔹 ====== */

/* ====== TABLET (hasta 1024px) ====== */
@media (max-width: 1024px) {
  header {
    padding: 10px 15px;
    max-width: 100%;
  }

  nav ul {
    gap: 20px;
    flex-wrap: wrap;
  }

  .bunker-blogs h2 {
    font-size: 34px;
  }

  .blog-card {
    height: auto;
    flex-wrap: wrap;
  }

  .blog-card img {
    width: 100%;
    max-width: 100%;
  }

  footer .footer-item h3 {
    font-size: 22px;
  }
}

/* ====== MÓVILES (hasta 768px) ====== */
@media (max-width: 768px) {
  header {
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.95);
    width: 100%;
    padding: 10px 15px;
  }

  /* Botón hamburguesa visible */
  #menu-toggle {
    display: block;
    font-size: 30px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
    z-index: 1100;
  }

  /* Menú oculto inicialmente */
  #menu-nav {
    display: none;
    position: absolute;
    top: 70px;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    width: 85vw;
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
    border-radius: 0 0 0 10px;
    box-shadow: -2px 4px 10px rgba(0, 0, 0, 0.4);
  }

  #menu-nav.active {
    display: flex;
  }

  nav ul {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    padding: 0;
    margin: 0;
  }

  nav ul li a {
    font-size: 18px;
    color: white;
    width: 100%;
    display: block;
  }

  nav ul li a:hover {
    color: #ff6600;
  }

  /* ===== Blogs ===== */
  .bunker-blogs {
    padding: 120px 10px 60px;
    width: 100%;
    overflow-x: hidden;
  }

  .blog-card {
    flex-direction: column;
    align-items: center;
    height: auto;
    width: 100%;
    max-width: 100%;
  }

  .blog-card img {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 10px;
  }

  .blog-card h3 {
    font-size: 18px;
    text-align: center;
  }

  .blog-card p {
    font-size: 14px;
    text-align: center;
  }

  /* ===== Modales ===== */
  #blog-view-modal .modal-content {
    flex-direction: column;
    align-items: center;
    width: 95%;
    max-width: 95%;
  }

  #view-left {
    max-width: 100%;
  }

  #view-img {
    max-height: 35vh;
    width: 100%;
    object-fit: cover;
  }

  #view-text-container {
    max-height: 45vh;
    width: 100%;
  }

  /* ===== Footer ===== */
  footer {
    padding: 30px 10px;
    width: 100%;
    overflow-x: hidden;
  }

  .footer-top {
    flex-direction: column;
    align-items: center;
    gap: 18px; /* igual que servicios.css */
  }

  .footer-item {
    width: 100%;
    text-align: center;
  }

  .footer-item h3 {
    font-size: 20px;
  }

  .footer-item p {
    font-size: 14px;
  }

  .footer-bottom {
    font-size: 14px; /* igual que servicios.css (base) */
    text-align: center;
  }

  /* ===== Barra redes (ajuste) ===== */
  .barra-redes {
    flex-direction: row;
    bottom: 10px;
    left: 10px;
    right: auto;
    padding: 8px 12px;
    gap: 10px;
    width: auto;
    max-width: 90%;
  }

  .barra-redes a img {
    width: 30px;
    height: 30px;
  }
}

/* ====== MÓVILES PEQUEÑOS (hasta 480px) ====== */
@media (max-width: 480px) {
  .logo {
    height: 55px;
    max-width: 90%;
  }

  .bunker-blogs h2 {
    font-size: 26px;
    text-align: center;
  }

  #new-blog-btn {
    font-size: 14px;
    padding: 10px 20px;
  }

  .blog-card h3 {
    font-size: 16px;
  }

  .footer-title-link {
    font-size: 26px;
  }

  .footer-item h3 {
    font-size: 18px;
  }

  .footer-item p {
    font-size: 13px;
  }

  .footer-bottom {
    font-size: 11px;
  }

  .marca-agua {
    width: 160px;
    opacity: 0.3;
  }

  /* Evita desbordes */
  section, div, img, p, h1, h2, h3 {
    max-width: 100%;
    overflow-x: hidden;
  }
}
/* ====== Footer Color Overrides (White BG, Black Text) ====== */
footer {
  background: #ffffff !important;
  color: #000000 !important;
}
footer a,
footer .footer-title-link,
footer .footer-item h3,
footer .footer-item p,
footer .footer-bottom {
  color: #000000 !important;
}
/* Remove any dark overlay on footer */
footer::before {
  display: none !important;
  background: transparent !important;
}
