/* styles.css - Hoja de estilos compartida para sitios públicos de WhatsApp Business */
:root {
  --color-primary: #1e40af;
  --color-primary-dark: #1e3a8a;
  --color-primary-light: #3b82f6;
  --color-accent: #0ea5e9;
  --color-whatsapp: #25d366;
  --color-whatsapp-dark: #1ebe5d;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-warning-bg: #fffbeb;
  --color-warning-border: #fef3c7;
  --color-warning-text: #92400e;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.05);
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1080px;
}

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

html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-primary-dark);
}

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Nav */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: 1.25rem;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: inline-block;
  object-fit: contain;
}

.site-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.site-nav .nav-link,
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
  background: rgba(30, 64, 175, 0.07);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #0369a1 100%);
  color: #ffffff;
  padding: 3rem 0;
  margin-bottom: 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.hero h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
}

.hero-lead {
  font-size: 1.125rem;
  line-height: 1.5;
  margin-bottom: 1.75rem;
  color: #e0f2fe;
}

.hero-image-wrapper {
  display: flex;
  justify-content: center;
}

.hero-image {
  width: 100%;
  max-width: 430px;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  background: #ffffff;
  border: 3px solid rgba(255, 255, 255, 0.2);
}

/* WhatsApp Buttons */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background-color: var(--color-whatsapp);
  color: #064e3b;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-whatsapp:hover {
  background-color: var(--color-whatsapp-dark);
  color: #064e3b;
  transform: translateY(-1px);
}

.btn-whatsapp-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  width: 100%;
}

.btn-whatsapp-lg {
  font-size: 1.2rem;
  padding: 1.1rem 2.2rem;
}

.whatsapp-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Main Content */
main {
  flex: 1 0 auto;
  padding-bottom: 3rem;
}

.section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}

/* Cards & Grid */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.card-category {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  background: rgba(30, 64, 175, 0.08);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  align-self: flex-start;
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.card p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  flex-grow: 1;
}

.card-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--color-border);
}

/* Honest Disclaimer Notice */
.notice-box {
  background: var(--color-warning-bg);
  border-left: 4px solid var(--color-warning-text);
  padding: 1.15rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
  color: var(--color-warning-text);
  font-size: 0.95rem;
}

.notice-box strong {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

/* Info Box / Contact */
.info-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.info-value {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-text);
}

/* Legal text formatting */
.legal-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.legal-content h1 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--color-primary-dark);
}

.legal-content h2 {
  font-size: 1.25rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.3rem;
}

.legal-content p, .legal-content ul {
  margin-bottom: 1rem;
  color: var(--color-text);
  font-size: 0.95rem;
}

.legal-content ul {
  padding-left: 1.5rem;
}

.legal-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

/* Filter controls for /servicios/ */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--color-text);
  font-weight: 500;
  transition: all 0.15s ease;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
  border-top: 1px solid #1e293b;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.footer-brand h4 {
  color: #ffffff;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}
