/* ==============================
   VARIABLES
============================== */
:root {
  --primary: #00AEEF;
  --secondary: #0077A3;
  --accent: #004f6e;
  --light: #f9f9f9;
  --dark: #111;
  --gray: #666;
  --font-main: 'Cinzel', serif;
}

/* ==============================
   GLOBAL STYLES
============================== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  line-height: 1.7;
  color: var(--dark);
  background: white;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

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

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

h1, h2, h3, h4 {
  text-transform: uppercase;
  margin-bottom: 15px;
  color: var(--secondary);
  font-weight: 700;
  letter-spacing: 0.5px;
}

p {
  font-size: 1.05rem;
  color: var(--gray);
}

/* ==============================
   HEADER
============================== */
.header {
  background: #0E0E0E;
  border-bottom: 2px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}
.logo {
  height: 60px;
}
.nav {
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 0 30px; /* added margin to separate from logo and button */
}
.nav a {
  margin: 0;
  text-decoration: none;
  color: #ddd;
  font-weight: 600;
  transition: color 0.3s;
  white-space: nowrap;
}
.nav a:hover {
  color: var(--primary);
}

/* ==============================
   BOTONES
============================== */
.btn {
  background: var(--primary);
  color: white;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  font-weight: bold;
  box-shadow: 0 6px 14px rgba(0, 174, 239, 0.3);
  white-space: nowrap;
}
.btn:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 119, 163, 0.4);
}
.header .btn {
  padding: 10px 20px;
  font-size: 0.85rem;
}

/* ==============================
   HERO SLIDER
============================== */
.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 400px;
  padding: 100px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.hero-slide.active {
  opacity: 1;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}
.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  text-shadow: 0 3px 6px rgba(0,0,0,0.6);
}
.hero-content p {
  color:#fff;
  margin-bottom: 35px;
  font-size: 1.3rem;
  text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* ==============================
   SECTIONS
============================== */
.section {
  padding: 45px 0;
}
.bg-light {
  background: var(--light);
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 35px;
}

/* ==============================
   CARDS
============================== */
.card {
  background: #fff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.card h3 {
  margin-top: 10px;
  font-size: 1.4rem;
}
.card p {
  color: var(--gray);
  font-size: 1rem;
}
.card span {
  font-weight: bold;
  display: block;
  margin-top: 12px;
  color: var(--secondary);
}
.card .author {
  display: block;
  margin-top: 15px;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}

/* ==============================
   IMÁGENES PLACEHOLDER
============================== */
.img-placeholder {
  aspect-ratio: 4 / 2;
  width: 100%;
  border-radius: 12px;
  margin-bottom: 15px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
  overflow: hidden;
}
.img-placeholder.blue { background: var(--primary); }
.img-placeholder.green { background: #56b870; }
.img-placeholder.gray { background: #ccc; }
.img-placeholder.dark { background: #999; }
.img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: var(--primary) solid 2px;
  border-radius: 12px;
  display: block;
}

/* ==============================
   FORMULARIOS
============================== */
.form {
  display: grid;
  gap: 20px;
}
.form input, .form textarea {
  padding: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border 0.3s;
  width: 100%;
  box-sizing: border-box;
}
.form input:focus, .form textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 6px rgba(0,174,239,0.3);
}
.form button {
  justify-self: center;
}
.contact-methods p {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: none; /* Keep email/web case */
}
.contact-methods i {
  color: var(--primary);
  width: 20px;
  text-align: center;
}

/* Utils */
.mt-5 { margin-top: 50px; }
.mb-5 { margin-bottom: 50px; }
.text-center { text-align: center; }

/* ==============================
   FOOTER
============================== */
.footer {
  background: #0E0E0E;
  color: #ddd;
  padding: 60px 20px 30px;
}
.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  align-items: start;
}
.footer-col h4 {
  margin-bottom: 15px;
  color: var(--primary);
  font-size: 1.2rem;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col ul li {
  margin-bottom: 10px;
}
.footer-col ul li a {
  color: #bbb;
  text-decoration: none;
  transition: color 0.3s;
}
.footer-col ul li a:hover {
  color: var(--primary);
}
.footer-logo {
  height: 150px;
  margin-bottom: 20px;
}
.socials {
  margin-top: 15px;
  display: flex;
  gap: 12px;
}
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 174, 239, 0.15);
  font-size: 1.2rem;
  color: var(--primary);
  transition: background 0.3s, color 0.3s, transform 0.2s;
}
.socials a:hover {
  background: var(--primary);
  color: #fff;
  transform: scale(1.1);
}

/* Copy */
.copy {
  text-align: center;
  margin-top: 30px;
  font-size: 0.9rem;
  color: #777;
}

/* ==============================
   BOTÓN HAMBURGUESA
============================== */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  line-height: 1;
  transition: color 0.3s;
}
.menu-toggle:hover {
  color: #fff;
}

/* Overlay para cerrar menú al tocar fuera */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
}
.nav-overlay.active {
  display: block;
}

/* ==============================
   RESPONSIVE
============================== */

/* --- Tablets y pantallas medianas --- */
@media (max-width: 1024px) {
  .nav {
    gap: 12px;
    margin: 0 15px;
  }
  .nav a {
    font-size: 0.85rem;
  }
  .header .btn {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Móvil --- */
@media (max-width: 768px) {

  /* Header layout: logo a la izquierda, hamburguesa a la derecha */
  .header-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    position: relative;
  }

  /* Mostrar hamburguesa */
  .menu-toggle {
    display: block;
  }

  /* Ocultar botón desktop */
  .desktop-only {
    display: none;
  }

  /* Nav como panel lateral slide-in */
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 280px;
    max-width: 85vw;
    background: #0E0E0E;
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 30px 30px;
    border-left: 2px solid var(--primary);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    gap: 0;
    margin: 0;
    overflow-y: auto;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
  }
  .nav a {
    color: #ddd;
    margin: 0;
    padding: 14px 0;
    font-size: 1.05rem;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: color 0.2s, padding-left 0.2s;
  }
  .nav a:hover,
  .nav a:focus {
    color: var(--primary);
    padding-left: 8px;
  }
  .nav.active {
    transform: translateX(0);
  }

  /* Grids a 1 columna */
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  /* Hero ajustes */
  .hero-slider {
    min-height: 300px;
    padding: 60px 15px;
  }
  .hero-content h1 {
    font-size: 1.7rem;
    margin-bottom: 15px;
  }
  .hero-content p {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  /* Secciones con menos padding */
  .section {
    padding: 35px 0;
  }

  /* Cards */
  .card {
    padding: 20px;
  }

  /* Botones */
  .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

  /* Logo más pequeño */
  .logo {
    height: 45px;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }
  .footer-logo {
    height: 100px;
    margin: 0 auto 15px;
    display: block;
  }
  .footer {
    padding: 40px 15px 25px;
  }
  .socials {
    justify-content: center;
  }
  .socials a {
    font-size: 1.3rem;
    width: 44px;
    height: 44px;
  }

  /* Formulario */
  .form input, .form textarea {
    font-size: 16px; /* previene zoom en iOS */
  }

  /* Headings */
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.2rem;
  }
}

/* --- Móviles pequeños --- */
@media (max-width: 480px) {
  .hero-slider {
    min-height: 250px;
    padding: 50px 10px;
  }
  .hero-content h1 {
    font-size: 1.4rem;
  }
  .hero-content p {
    font-size: 0.9rem;
  }
  .container {
    width: 94%;
  }
  .section {
    padding: 25px 0;
  }
  h2 {
    font-size: 1.3rem;
  }
}

/* ==============================
   ALERTAS DE FORMULARIO
============================== */
.alert-msg {
  padding: 18px 20px;
  border-radius: 10px;
  margin-bottom: 25px;
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  animation: slideIn 0.5s ease;
}
.alert-msg i {
  font-size: 1.4rem;
}
.alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.alert-success i {
  color: #22c55e;
}
.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.alert-error i {
  color: #ef4444;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
