/* =============================================
 * ZIBAGENDA — Estilos Base y Design Tokens
 * Minimalista y limpio — DM Sans, escala de grises, acento índigo
 * ============================================= */

/* ─── Google Fonts ─────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ─── Design Tokens (Variables CSS) ────────────────────── */
:root {
    /* Escala de grises — columna vertebral del diseño */
    --color-bg:            #FAFAFA;
    --color-surface:       #FFFFFF;
    --color-surface-2:     #F4F4F5;
    --color-border:        #E4E4E7;
    --color-text-main:     #18181B;
    --color-text-muted:    #71717A;
    --color-text-subtle:   #A1A1AA;

    /* Acento único — azul índigo */
    --color-accent:        #4F46E5;
    --color-accent-hover:  #4338CA;
    --color-accent-soft:   #EEF2FF;

    /* Premium — tono dorado sobrio */
    --color-premium:       #B45309;
    --color-premium-bg:    #FFFBEB;
    --color-premium-border:#FCD34D;

    /* Estados semánticos */
    --color-success:       #16A34A;
    --color-success-bg:    #F0FDF4;
    --color-danger:        #DC2626;
    --color-danger-bg:     #FEF2F2;
    --color-warning:       #D97706;
    --color-warning-bg:    #FFFBEB;

    /* Sombras */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.07), 0 4px 6px -4px rgba(0,0,0,0.05);

    /* Tipografía */
    --font-base: 'DM Sans', system-ui, -apple-system, sans-serif;

    --text-xs:   12px;
    --text-sm:   13px;
    --text-base: 15px;
    --text-lg:   17px;
    --text-xl:   20px;
    --text-2xl:  24px;
    --text-3xl:  30px;
    --text-4xl:  38px;

    --weight-light:    300;
    --weight-normal:   400;
    --weight-medium:   500;
    --weight-semibold: 600;

    --leading-tight:   1.25;
    --leading-normal:  1.5;
    --leading-relaxed: 1.65;

    /* Espaciado */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Radios */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transiciones */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-base);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text-main);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

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

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--color-accent-hover);
}

/* ─── Tipografía ───────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--weight-semibold);
    line-height: var(--leading-tight);
    color: var(--color-text-main);
}
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); font-weight: var(--weight-medium); }

p {
    color: var(--color-text-muted);
    line-height: var(--leading-relaxed);
}

small {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* ─── Layout ───────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 768px)  { .container { padding: 0 var(--space-6); } }
@media (min-width: 1024px) { .container { padding: 0 var(--space-8); } }

/* ─── Grid del directorio ──────────────────────────────── */
.directory-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

@media (min-width: 768px)  {
    .directory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-5);
    }
}

@media (min-width: 1024px) {
    .directory-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-6);
    }
}

/* ─── Utilidades ───────────────────────────────────────── */
.text-center  { text-align: center; }
.text-muted   { color: var(--color-text-muted); }
.text-subtle  { color: var(--color-text-subtle); }
.text-sm      { font-size: var(--text-sm); }
.text-xs      { font-size: var(--text-xs); }
.text-lg      { font-size: var(--text-lg); }
.font-medium  { font-weight: var(--weight-medium); }
.font-semibold{ font-weight: var(--weight-semibold); }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.hidden { display: none !important; }

@media (max-width: 767px) {
    .hide-mobile { display: none !important; }
}
@media (min-width: 768px) {
    .hide-desktop { display: none !important; }
}
