/* ============================================
   Dietética Piedad — Estilos
   ============================================ */

/* --- Inter font --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300..700&display=swap');

/* --- Variables --- */
:root {
  --verde-50: #f0fdf4;
  --verde-100: #dcfce7;
  --verde-200: #bbf7d0;
  --verde-300: #86efac;
  --verde-400: #4ade80;
  --verde-500: #22c55e;
  --verde-600: #16a34a;
  --verde-700: #15803d;
  --verde-800: #166534;
  --verde-900: #14532d;

  --tierra-50: #faf8f5;
  --tierra-100: #f5f0ea;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--gray-800);
  background: #fff;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--gray-900);
}

/* --- Container --- */
.container {
  margin-left: auto;
  margin-right: auto;
  max-width: 72rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
  .container { padding-left: 2rem; padding-right: 2rem; }
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--verde-800);
}

.logo-icon {
  width: 2rem;
  height: 2rem;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .nav-desktop { display: flex; }
}

.nav-link {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
  background: var(--verde-50);
  color: var(--verde-700);
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--verde-600);
  color: #fff;
  transition: background 0.2s;
}

.btn-sm:hover {
  background: var(--verde-700);
}

/* --- Menu button (mobile) --- */
.menu-btn {
  display: block;
  padding: 0.5rem;
  border: none;
  background: none;
  border-radius: 0.5rem;
  color: var(--gray-600);
  cursor: pointer;
}

.menu-btn:hover {
  background: var(--verde-50);
  color: var(--verde-700);
}

@media (min-width: 768px) {
  .menu-btn { display: none; }
}

.menu-icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* --- Mobile menu --- */
.mobile-menu {
  display: none;
  border-top: 1px solid var(--gray-100);
  background: #fff;
}

.mobile-menu.open {
  display: block;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 0;
}

.mobile-nav .nav-link {
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
}

.mobile-nav .btn-sm {
  justify-content: center;
  margin-top: 0.5rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--verde-600);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-primary:hover {
  background: var(--verde-700);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.btn-outline {
  background: transparent;
  color: var(--verde-700);
  border: 2px solid var(--verde-600);
}

.btn-outline:hover {
  background: var(--verde-50);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.btn-white {
  background: #fff;
  color: var(--verde-800);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-white:hover {
  background: var(--verde-50);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--verde-50), #fff, var(--tierra-50));
  padding: 4rem 0;
}

@media (min-width: 640px) { .hero { padding: 6rem 0; } }
@media (min-width: 1024px) { .hero { padding: 8rem 0; } }

.hero-bg-circle-1 {
  position: absolute;
  top: -8rem;
  right: -8rem;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  background: rgba(187,247,208,0.3);
  filter: blur(64px);
  pointer-events: none;
}

.hero-bg-circle-2 {
  position: absolute;
  bottom: -10rem;
  left: -10rem;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  background: rgba(245,240,234,0.4);
  filter: blur(64px);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-top: 1rem;
  max-width: 48rem;
}

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

.hero p {
  margin-top: 0.75rem;
  font-size: 1.125rem;
  color: var(--gray-600);
  max-width: 36rem;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* --- Pill --- */
.pill {
  display: inline-block;
  border-radius: 9999px;
  background: var(--verde-100);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--verde-800);
}

/* --- Section --- */
.section {
  padding: 4rem 0;
}

@media (min-width: 640px) { .section { padding: 5rem 0; } }

.section-gray {
  background: var(--gray-50);
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-align: center;
}

@media (min-width: 640px) { .section-title { font-size: 2.25rem; } }

.section-subtitle {
  margin-top: 0.75rem;
  font-size: 1.125rem;
  color: var(--gray-600);
  text-align: center;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* --- Cards --- */
.card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  outline: 1px solid var(--gray-100);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card-verde {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  outline: 1px solid var(--gray-100);
  transition: box-shadow 0.2s;
  border-left: 4px solid var(--verde-500);
}

.card-verde:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card-icon {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 2rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.card-desc {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--gray-600);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--verde-600);
}

.card-link:hover {
  color: var(--verde-700);
}

.arrow-icon {
  width: 0.875rem;
  height: 0.875rem;
}

/* --- Grids --- */
.grid-2 { display: grid; gap: 1.5rem; }
.grid-3 { display: grid; gap: 1.5rem; }
.grid-4 { display: grid; gap: 1.5rem; }

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

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--verde-700), var(--verde-600), var(--verde-800));
  padding: 4rem 0;
  text-align: center;
}

@media (min-width: 640px) { .cta-section { padding: 5rem 0; } }

.cta-title {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
}

@media (min-width: 640px) { .cta-title { font-size: 2.25rem; } }

.cta-desc {
  margin-top: 1rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 1rem;
  color: rgba(220,252,231,0.9);
}

.cta-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.cta-actions .btn-outline {
  border-color: #fff;
  color: #fff;
}

.cta-actions .btn-outline:hover {
  background: rgba(255,255,255,0.1);
}

/* --- Testimonial --- */
.testimonial {
  position: relative;
}

.testimonial-icon {
  margin-bottom: 0.5rem;
  width: 2rem;
  height: 2rem;
  color: var(--verde-200);
}

.testimonial blockquote {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--gray-600);
  font-style: italic;
}

.testimonial figcaption {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
}

/* --- Contact bar --- */
.contact-bar {
  padding: 3rem 0;
}

.contact-bar-inner {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  outline: 1px solid var(--gray-100);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-100);
}

.contact-item:last-child {
  border-bottom: none;
}

@media (min-width: 640px) {
  .contact-bar-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .contact-item {
    border-bottom: none;
    border-right: 1px solid var(--gray-100);
  }
  .contact-item:last-child { border-right: none; }
}

.contact-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--verde-100);
  flex-shrink: 0;
}

.contact-icon-box svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--verde-700);
}

.contact-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-900);
}

.contact-value {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.contact-value a {
  font-weight: 600;
  color: var(--verde-700);
}

.contact-value a:hover {
  color: var(--verde-600);
}

/* --- Footer --- */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

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

.footer-brand p {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.footer h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

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

.footer ul a {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.footer ul a:hover { color: var(--verde-700); }

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.footer-contact svg {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
  color: var(--verde-600);
}

.footer-hours li {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.footer-hours .fw { font-weight: 500; }

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-links a {
  color: var(--gray-400);
}

.social-links a:hover { color: var(--verde-600); }

.social-links svg {
  width: 1.25rem;
  height: 1.25rem;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
  text-align: center;
  font-size: 0.75rem;
  color: var(--gray-400);
}

.footer-bottom a {
  color: var(--gray-400);
}

.footer-bottom a:hover { color: var(--gray-600); }

/* --- Page hero (inner pages) --- */
.page-hero {
  background: linear-gradient(135deg, var(--verde-50), #fff, var(--tierra-50));
  padding: 4rem 0;
}

@media (min-width: 640px) { .page-hero { padding: 6rem 0; } }
@media (min-width: 1024px) { .page-hero { padding: 8rem 0; } }

.page-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  max-width: 48rem;
  margin-top: 0.75rem;
}

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

.page-hero p {
  margin-top: 1rem;
  max-width: 36rem;
  font-size: 1.125rem;
  color: var(--gray-600);
}

/* --- Service detail card (servicios page) --- */
.service-detail {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.service-detail-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--verde-100);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.service-detail h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

.service-detail p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--gray-600);
}

.feature-list {
  list-style: none;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.feature-list svg {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  color: var(--verde-500);
}

/* --- Timeline --- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.timeline-item {
  display: flex;
  gap: 1rem;
}

.timeline-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--verde-100);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--verde-700);
  flex-shrink: 0;
}

.timeline-item h3 {
  font-weight: 600;
}

.timeline-item p {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* --- Accordion (FAQ) --- */
details.card {
  cursor: pointer;
}

details.card summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
  font-weight: 500;
}

details.card[open] {
  outline-color: var(--verde-200);
}

details.card .chevron {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--gray-400);
  transition: transform 0.2s;
}

details.card[open] .chevron {
  transform: rotate(180deg);
}

details.card .answer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-100);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--gray-600);
}

/* --- Contact form --- */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
}

.form-input {
  display: block;
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--gray-200);
  background: #fff;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--gray-900);
}

.form-input:focus {
  outline: none;
  border-color: var(--verde-500);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.15);
}

.form-input::placeholder {
  color: var(--gray-400);
}

textarea.form-input {
  resize: vertical;
}

/* --- Map --- */
.map-container {
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  outline: 1px solid var(--gray-100);
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 400px;
  border: 0;
}

/* --- Legal prose --- */
.prose {
  max-width: 48rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--gray-600);
}

.prose h2 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  margin-bottom: 1rem;
}

.prose ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.25rem;
}

.prose a {
  color: var(--verde-600);
  text-decoration: underline;
}

.prose a:hover {
  color: var(--verde-700);
}

/* --- Utilities --- */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.gap-3 { gap: 0.75rem; }
.gap-6 { gap: 1.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }
