/* PuntoComex - Premium mobile-first design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --navy: #0A2540;
  --navy-dark: #061a2e;
  --teal: #00A3A1;
  --teal-dark: #008a88;
  --orange: #FF6B35;
  --orange-dark: #e55a2b;
  --bg: #F8FAFC;
  --text: #1E293B;
  --text-light: #64748B;
  --border: #E2E8F0;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(10, 37, 64, 0.08);
  --shadow-hover: 0 8px 30px rgba(10, 37, 64, 0.12);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 38px;
  height: 38px;
}

.nav {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem 1.25rem;
  gap: 0.25rem;
  box-shadow: var(--shadow);
}

.nav.open {
  display: flex;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  padding: 0.7rem 0;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav a.active,
.nav a:hover {
  color: var(--teal);
}

.menu-toggle {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--navy);
  padding: 0.25rem;
}

/* Hero */
.hero {
  padding: 5.5rem 0 4.5rem;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

.hero h1 {
  font-size: 2.15rem;
  color: var(--navy);
  margin-bottom: 1.1rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.subtitle {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 2.25rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: center;
}

.btn {
  display: inline-block;
  padding: 0.9rem 1.9rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  transition: all 0.2s ease;
  letter-spacing: -0.01em;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--orange);
  color: white;
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.25);
}

.btn-primary:hover {
  background: var(--orange-dark);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.35);
}

.btn-secondary {
  background: var(--teal);
  color: white;
  box-shadow: 0 4px 14px rgba(0, 163, 161, 0.25);
}

.btn-secondary:hover {
  background: var(--teal-dark);
  box-shadow: 0 6px 20px rgba(0, 163, 161, 0.35);
}

/* Features */
.features {
  padding: 4rem 0 5rem;
}

.features h2 {
  text-align: center;
  color: var(--navy);
  margin-bottom: 2.5rem;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.features-grid {
  display: grid;
  gap: 1.75rem;
}

.feature-card {
  background: var(--white);
  padding: 2rem 1.75rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.feature-card h3 {
  color: var(--navy);
  margin-bottom: 0.65rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* Footer */
footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  padding: 2.5rem 0;
  text-align: center;
  margin-top: 4rem;
  font-size: 0.95rem;
}

/* Page content */
.page-content {
  padding: 4rem 0 5rem;
}

.page-content h1 {
  color: var(--navy);
  margin-bottom: 1.25rem;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.page-content h2 {
  color: var(--navy);
  margin: 2.5rem 0 1rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.page-content p {
  margin-bottom: 1.1rem;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
}

.page-content ul {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text);
}

.page-content li {
  margin-bottom: 0.5rem;
}

/* Desktop */
@media (min-width: 768px) {
  .nav {
    display: flex;
    flex-direction: row;
    position: static;
    border: none;
    padding: 0;
    gap: 1.75rem;
    box-shadow: none;
  }

  .menu-toggle {
    display: none;
  }

  .hero h1 {
    font-size: 3.1rem;
  }

  .subtitle {
    font-size: 1.25rem;
  }

  .cta-buttons {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-content h1 {
    font-size: 2.75rem;
  }
}

/* Directorio */
.dir-tools { display: flex; flex-direction: column; gap: 1rem; margin: 1.5rem 0 0.5rem; }
.dir-index { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dir-index a { text-decoration: none; color: var(--navy); background: var(--white); border: 1px solid var(--border); border-radius: 999px; padding: 0.4rem 0.95rem; font-size: 0.9rem; font-weight: 500; transition: all 0.2s; }
.dir-index a:hover { border-color: var(--teal); color: var(--teal); }
.dir-search { width: 100%; padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 1rem; background: var(--white); color: var(--text); }
.dir-search:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 163, 161, 0.15); }
.dir-zone { scroll-margin-top: 90px; }
.dir-zone[hidden], .dir-card[hidden] { display: none; }
.page-content .dir-zone h2 { display: flex; align-items: center; gap: 0.6rem; }
.dir-count { background: var(--teal); color: var(--white); font-size: 0.8rem; font-weight: 600; border-radius: 999px; padding: 0.1rem 0.6rem; }
.dir-grid { display: grid; gap: 1.25rem; }
.dir-card { background: var(--white); border: 1px solid var(--border); border-top: 3px solid var(--teal); border-radius: 14px; padding: 1.4rem 1.4rem 1.2rem; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.dir-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.page-content .dir-type { color: var(--text-light); font-size: 0.88rem; font-weight: 500; margin: 0.2rem 0 0; }
.dir-card h3 { color: var(--navy); font-size: 1.1rem; font-weight: 600; line-height: 1.35; }
.page-content .dir-loc { color: var(--orange); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin: 0.25rem 0 0.9rem; }
.dir-data { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 0.9rem; font-size: 0.92rem; }
.dir-data dt { color: var(--text-light); font-weight: 500; }
.dir-data dd { overflow-wrap: anywhere; }
.dir-data a { color: var(--teal-dark); text-decoration: none; }
.dir-data a:hover { text-decoration: underline; }
.dir-nd { color: #94A3B8; font-style: italic; }
.page-content .dir-note { margin-top: 3rem; font-size: 0.92rem; color: var(--text-light); border-top: 1px solid var(--border); padding-top: 1.25rem; }
.dir-note a { color: var(--teal); }
.page-content .dir-empty { color: var(--text-light); font-style: italic; }
@media (min-width: 768px) {
  .dir-tools { flex-direction: row; align-items: center; justify-content: space-between; }
  .dir-search { max-width: 320px; }
  .dir-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .dir-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Menú con 7 ítems en tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .nav { gap: 1rem; }
  .nav a { font-size: 0.88rem; }
}

/* Novedades */
.nov-date { display: inline-block; font-size: 0.85rem; font-weight: 600; color: var(--teal); margin-bottom: 0.8rem; }
.nov-note { font-size: 0.9rem; color: #555; }
.nov-section { margin-top: 2rem; }
.nov-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1rem; }
.nov-item { background: var(--white); border: 1px solid var(--border); border-left: 3px solid var(--teal); border-radius: 12px; padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.nov-item p { margin: 0; line-height: 1.6; }
.nov-item strong { color: var(--navy); }
.nov-item .nov-src { margin-top: 0.6rem; font-size: 0.85rem; }
.nov-item .nov-src a { overflow-wrap: anywhere; }
.nov-ctx { border-left-color: #b8b8b8; }
.nov-badge { display: inline-block; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; background: #eef1f4; color: #555; border-radius: 999px; padding: 0.1rem 0.55rem; vertical-align: 0.1em; }

/* Contacto */
.contact-social { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.contact-social a { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; border: 1px solid var(--border); border-radius: 999px; background: var(--white); color: var(--navy); font-weight: 600; text-decoration: none; transition: border-color 0.2s, color 0.2s; }
.contact-social a:hover, .contact-social a:focus-visible { border-color: var(--teal); color: var(--teal); }
.contact-icon { flex-shrink: 0; }
.contact-form { background: var(--white); border: 1px solid var(--border); border-top: 3px solid var(--teal); border-radius: 14px; padding: 1.4rem; box-shadow: var(--shadow); margin: 1rem 0 2rem; max-width: 640px; }
.form-field { margin-bottom: 1rem; }
.form-field label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 0.35rem; font-size: 0.95rem; }
.form-field input, .form-field textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; padding: 0.7rem 0.85rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: inherit; }
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 163, 161, 0.18); }
.form-field [aria-invalid="true"] { border-color: #c0392b; }
.form-req { color: #c0392b; }
.form-hint { font-size: 0.85rem; color: #666; margin: 0 0 1rem; }
.form-honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn[disabled] { opacity: 0.6; cursor: wait; }
.form-status { margin: 0.9rem 0 0; font-size: 0.95rem; min-height: 1.2em; }
.form-ok { color: var(--teal-dark); }
.form-error { color: #c0392b; }
@media (min-width: 768px) { .contact-form { padding: 2rem; } }

/* Accesibilidad: skip link y foco visible */
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 1000; background: var(--navy); color: var(--white); padding: 0.6rem 1rem; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 0.75rem; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
main:focus { outline: none; }

/* Footer con enlaces */
footer .footer-links { margin-bottom: 0.5rem; }
footer .footer-links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Texto de inicio */
.home-intro { padding-top: 0; }
.home-intro .container { max-width: 820px; }
.home-intro h2 { text-align: left; }
.home-intro h3 { color: var(--navy); margin: 1.5rem 0 0.5rem; font-size: 1.15rem; }
.home-intro p, .home-intro li { margin-bottom: 0.75rem; }
.home-intro ul { padding-left: 1.2rem; }
.home-intro a { color: var(--teal-dark); }

/* Menú con 8 ítems: en tablet se usa el menú desplegable */
@media (min-width: 768px) and (max-width: 1023px) {
  .nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); padding: 1rem 1.5rem 1.25rem; gap: 0.25rem; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { font-size: 0.95rem; }
  .menu-toggle { display: block; }
}
@media (min-width: 1024px) {
  .nav { gap: 1.25rem; }
  .nav a { font-size: 0.92rem; }
}

/* Modal de confirmación del formulario de contacto */
.contact-modal-open { overflow: hidden; }
.contact-modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(10, 37, 64, 0.6); }
.contact-modal { width: 100%; max-width: 420px; background: #fff; border-radius: 14px; border-top: 4px solid #00A3A1; padding: 1.75rem 1.5rem 1.5rem; text-align: center; box-shadow: 0 20px 50px rgba(10, 37, 64, 0.3); color: #0A2540; }
.contact-modal-error { border-top-color: #c0392b; }
.contact-modal-icon { width: 56px; height: 56px; margin: 0 auto 0.9rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: #00A3A1; }
.contact-modal-error .contact-modal-icon { background: #c0392b; }
.contact-modal h2 { margin: 0 0 0.5rem; font-size: 1.35rem; color: #0A2540; }
.contact-modal p { margin: 0 0 1.25rem; line-height: 1.5; }
.contact-modal a { color: #0A2540; font-weight: 600; }
.contact-modal-close { min-width: 140px; }
.form-status.form-ok, .form-status.form-error { padding: 0.6rem 0.8rem; border-radius: 8px; }
.form-status.form-ok { background: rgba(0, 163, 161, 0.1); }
.form-status.form-error { background: rgba(192, 57, 43, 0.08); }
@media (min-width: 768px) { .contact-modal { padding: 2rem; } }
