/* ==========================================================================
   SER CENTRO PSICOLÓGICO - DESIGN TOKENS & BASE STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* PALETA DE COLORES */
  --color-primary:        #82c341;
  --color-primary-dark:   #72ae36;
  --color-primary-light:  #8cc63f;
  --color-primary-pale:   #e6f3d8;
  --color-primary-pale2:  #f0f9e8;
  --color-primary-border: #d8f0c2;

  --color-bg-cream:    #faf9f5;
  --color-bg-white:    #ffffff;
  --color-bg-light:    #fafdf8;
  --color-bg-card:     #f4f2ea;
  --color-bg-card-alt: #eae7dc;

  --color-text-dark:    #1c1c1c;
  --color-text-heading: #1e2e21;
  --color-text-body:    #555555;
  --color-text-muted:   #666666;
  --color-text-sub:     #8e8e8e;
  --color-text-light:   #a0a0a0;

  --color-border:      #e2e8f0;
  --color-border-soft: rgba(226, 232, 240, 0.8);

  --color-dark-card-bg:     #1e2e21;
  --color-dark-card-border: #2b3e2e;

  --color-footer-bg:     #181818;
  --color-footer-border: #262626;
  --color-footer-text:   #a0a0a0;
  --color-footer-accent: #82c341;

  /* TIPOGRAFIA */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* ESPACIADO & LAYOUT */
  --container-max: 1280px;

  /* BORDES */
  --radius-sm:   0.75rem; /* 12px */
  --radius-md:   1rem;    /* 16px */
  --radius-lg:   1.5rem;  /* 24px */
  --radius-full: 9999px;

  /* SOMBRAS */
  --shadow-2xs: 0 1px 2px rgba(0,0,0,0.03);
  --shadow-xs:  0 1px 3px rgba(0,0,0,0.05);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.14);
}

/* RESET & CORE BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-body);
  background-color: var(--color-bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .font-serif-title {
  font-family: var(--font-display);
  color: var(--color-text-heading);
  line-height: 1.2;
}

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

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

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

/* SELECTION & SCROLLBAR */
::selection {
  background-color: var(--color-primary);
  color: #ffffff;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* UTILITY LAYOUT */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  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; }
}

/* SECTION SPACING */
.section-py { padding-top: 4rem; padding-bottom: 4rem; }
@media (min-width: 768px) {
  .section-py { padding-top: 6rem; padding-bottom: 6rem; }
}

/* GRID SYSTEM */
.grid { display: grid; }

/* 1 columna base */
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }

/* 2 columnas */
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* 3 columnas — breakpoint principal del diseño */
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Shorthand used in templates */
.grid.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }

@media (min-width: 768px) {
  .grid.md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .grid.md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .grid.lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid.lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Gap utilities */
.gap-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-12 { gap: 3rem; }

/* Flex utilities */
.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.justify-center{ justify-content: center; }
.flex-wrap     { flex-wrap: wrap; }
.gap-2         { gap: 0.5rem; }
.gap-3         { gap: 0.75rem; }

/* Text utilities */
.text-center   { text-align: center; }
.text-left     { text-align: left; }
.font-serif    { font-family: var(--font-display); }

/* Size utilities (w-* / h-* used by ser_render_icon() and templates) */
.w-1  { width: 0.25rem;  } .h-1  { height: 0.25rem;  }
.w-2  { width: 0.5rem;   } .h-2  { height: 0.5rem;   }
.w-3  { width: 0.75rem;  } .h-3  { height: 0.75rem;  }
.w-3\.5 { width: 0.875rem; } .h-3\.5 { height: 0.875rem; }
.w-4  { width: 1rem;     } .h-4  { height: 1rem;     }
.w-5  { width: 1.25rem;  } .h-5  { height: 1.25rem;  }
.w-6  { width: 1.5rem;   } .h-6  { height: 1.5rem;   }
.w-8  { width: 2rem;     } .h-8  { height: 2rem;     }
.w-10 { width: 2.5rem;   } .h-10 { height: 2.5rem;   }
.w-12 { width: 3rem;     } .h-12 { height: 3rem;     }

/* SVGs sin width/height nativos no deben desbordar su contenedor */
svg { max-width: 100%; }

/* Typography / spacing utilities usadas por widgets.php y plantillas */
.text-xs      { font-size: 0.75rem; }
.font-bold    { font-weight: 700; }
.uppercase    { text-transform: uppercase; }
.tracking-widest { letter-spacing: 0.1em; }
.mb-4         { margin-bottom: 1rem; }
.text-primary { color: var(--color-primary); }
.text-\[\#82c341\] { color: #82c341; }
