/* Reset Básico */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Variables */
:root {
  --primary-color: #e09f3e;
  --secondary-color: #06163a;
  --dark-blue: #0A0F2B;
  --text-color-dark: #333;
  --text-color-medium: #444;
  --text-color-light: #555;
  --bg-light: #f9f9f9;
  --bg-card: #ffffff;
  --border-color: #ccc;
  --shadow-light: rgba(0,0,0,0.06);
  --shadow-medium: rgba(0,0,0,0.1);
  --shadow-whatsapp: rgba(0,0,0,0.3);
  --shadow-btn: rgba(224, 159, 62, 0.3);
  --shadow-btn-hover: rgba(224, 159, 62, 0.4);
  --whatsapp-green: #25d366;
  --whatsapp-green-hover: #128C7E;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background-color: var(--bg-light);
  color: var(--text-color-dark);
}

/* NAVBAR */
.navbar {
  display: grid;
  grid-template-rows: auto auto; /* fila logo / fila menú */
  justify-items: center;
  row-gap: .4rem;
  background: var(--secondary-color);
  padding: .8rem 1.2rem;
  position: sticky; top:0; z-index:1000;
}



.logo { display: flex; align-items: center; gap: 15px; }
.logo img { height: 40px; width: auto; object-fit: contain; }
.logo-text { font-size: 1.1rem; color: var(--primary-color); font-weight: bold; white-space: nowrap; }

/* Nav escritorio */
.nav-desktop { display: flex; align-items: center; gap: 1rem; }
.nav-desktop a {
  color: #fff; text-decoration: none; font-weight: 500; padding: 6px 12px; position: relative;
}
.nav-desktop a:hover::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 2px; background-color: #00d8ff;
}

/* Nav móvil (checkbox hack) */
.menu-toggle { display: none; }
.hamburger { display: none; font-size: 2rem; color: #fff; cursor: pointer; }
.nav-mobile {
  display: none; flex-direction: column; background-color: var(--secondary-color);
  position: absolute; top: 72px; right: 0; width: 100%; padding: 1rem; z-index: 999;
}
.nav-mobile a { color: #fff; text-decoration: none; font-weight: 500; padding: 12px 0; }

/* Mostrar menú móvil cuando el checkbox está activo */
.menu-toggle:checked + .hamburger + .nav-mobile { display: flex; }

/* HERO */
.hero {
  background: linear-gradient(to right, #1e2a38, #0d1b2a);
  color: #fff; padding: 80px 40px; text-align: center;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; max-width: 700px; margin: 0 auto 30px; }

/* Botón */
.btn {
  background-color: var(--primary-color); color: #fff; padding: 12px 25px; border: 0; cursor: pointer;
  font-size: 1rem; border-radius: 5px; text-decoration: none; display: inline-block;
  transition: all 0.3s ease; box-shadow: 0 4px 8px var(--shadow-btn);
}
.btn:hover { background-color: #cc8e2c; box-shadow: 0 6px 12px var(--shadow-btn-hover); }
.btn:active { background-color: #b87f24; }

/* Secciones base */
section { padding: 60px 40px; max-width: 1000px; margin: auto; }
section h2 { text-align: center; margin-bottom: 40px; font-size: 2rem; }
section h2 i { color: var(--primary-color); margin-right: 10px; }

/* Grids */
.services-grid, .features-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; max-width: 1200px; margin: auto;
}

/* Cards */
.card {
  background: var(--bg-card); padding: 25px 20px; border-radius: 12px;
  box-shadow: 0 2px 8px var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  flex: 0 1 300px; max-width: 100%;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 6px 16px var(--shadow-medium); }

/* About */
#about .about-content { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 800px; margin: auto; }
.profile-img {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-bottom: 20px; border: 3px solid var(--primary-color);
}
#about .about-content p { font-size: 1.1rem; color: var(--text-color-medium); line-height: 1.7; }
.about-features {
  list-style: none; padding: 0; margin-top: 20px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; font-size: 1rem; color: var(--text-color-dark);
}

/* Contacto */
.contact-intro-text { text-align: center; font-size: 1rem; color: var(--text-color-light); margin-bottom: 40px; }
#custom-contact-form { max-width: 600px; margin: auto; text-align: center; }
#custom-contact-form input[type="text"],
#custom-contact-form input[type="email"],
#custom-contact-form input[type="tel"],
#custom-contact-form textarea {
  width: 100%; padding: 10px; margin-bottom: 15px; border: 1px solid var(--border-color); border-radius: 5px; font-family: inherit; font-size: 1rem;
}
#custom-contact-form textarea { resize: vertical; }
#form-status { margin-top: 10px; font-weight: bold; }

/* Footer */
footer { background-color: var(--dark-blue); color: #fff; text-align: center; padding: 20px 40px; font-size: 0.9rem; }
footer p { margin-bottom: 5px; }
footer a { color: var(--primary-color); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* WhatsApp botón flotante */
.whatsapp-float {
  position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1000;
  font-family: Arial, sans-serif;
}
.whatsapp-label {
  margin-bottom: 8px; background-color: var(--bg-card); color: var(--text-color-dark);
  padding: 4px 12px; border-radius: 20px; box-shadow: 0 2px 6px var(--shadow-whatsapp);
  font-size: 13px; font-weight: bold;
}
.whatsapp-icon-link {
  display: inline-flex; align-items: center; justify-content: center; background-color: var(--whatsapp-green);
  width: 50px; height: 50px; border-radius: 50%; text-decoration: none; box-shadow: 0 4px 10px var(--shadow-whatsapp);
  transition: background-color 0.3s ease;
}
.whatsapp-icon-link:hover { background-color: var(--whatsapp-green-hover); }
.whatsapp-icon-link img { width: 28px; height: 28px; filter: brightness(1.2); }

/* Demos */
.demo-gallery { background: #f8f9fa; padding: 40px 20px; }
.demo-gallery h2 { text-align: center; margin-bottom: 2rem; }

.demo-card {
  background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 20px;
  margin: 1rem auto; max-width: 900px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); text-align: center;
}
.demo-card h3 { margin-top: 0; }
.demo-card a {
  display: inline-block; margin-top: 10px; background: var(--secondary-color); color: #fff; padding: 10px 16px; border-radius: 5px; text-decoration: none;
}
.demo-card a:hover { background: #00d8ff; color: var(--secondary-color); }

/* Sección de demos interactivas */
.interactive-demos { background: #eef6fa; padding: 40px 20px; border-top: 3px solid #00d8ff; }
.interactive-demos h2 { text-align: center; font-size: 1.8rem; color: var(--secondary-color); margin-bottom: 1.5rem; }
.interactive-demos p { text-align: center; max-width: 600px; margin: 0 auto 2rem; color: #444; }

/* Grid Responsive para demos */
.demo-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); padding-top: 2rem; }

/* Sección unificada (tarjeta grande) */
.section-unificada {
  background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 2rem; margin: 2rem auto; max-width: 1000px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.section-unificada h2 { font-size: 2rem; margin-bottom: 1rem; color: var(--secondary-color); text-align: center; }
.section-unificada p, .section-unificada li { font-size: 1.1rem; line-height: 1.6; color: #333; text-align: center; }

/* Media Queries */
@media (max-width: 768px) {
  .logo { flex-direction: column; align-items: center; gap: 5px; }
  .logo img { display: block; margin: 0 auto; /* Centra horizontalmente */ height: 30px; white-space: normal; text-align: center; }
  .logo-text { font-size: 0.9rem; white-space: normal; text-align: center; }

  .nav-desktop { display:none; }
  .hamburger { display:block; align-self: center; justify-self: end; position: absolute; right: 16px; top: 14px; }


  .hero { padding: 60px 20px; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }

  section { padding: 40px 20px; }
  section h2 { font-size: 1.7rem; margin-bottom: 30px; }

  .card { flex: 0 1 90%; padding: 20px 15px; }
  #custom-contact-form input, #custom-contact-form textarea { padding: 10px; font-size: 0.95rem; }
  .btn { font-size: 0.95rem; padding: 10px 20px; }

  footer { padding: 15px 20px; font-size: 0.8rem; }
  .whatsapp-float { bottom: 15px; right: 15px; }
  .whatsapp-icon-link { width: 45px; height: 45px; }
  .whatsapp-icon-link img { width: 25px; height: 25px; }
}

@media (max-width: 480px) {
  .logo { align-items: flex-start; }
  .logo-text { font-size: 0.85rem; }
}