:root {
            /* --- Sistema de color: granito, oro de siega, rojo de pendón, teja y romero --- */
            --granite:      #18160f;
            --granite-mid:  #26221a;
            --granite-hi:   #302a20;
            --stone-line:   #473c29;
            --limestone:    #f3ecdb;
            --limestone-dim:#cdc3ac;
            --text-muted:   #9c9077;

            --wheat:        #d6a53f;
            --wheat-bright: #f0bd54;
            --clay:         #b8451f;
            --clay-bright:  #de5a30;
            --rosemary:     #4f7a63;
            --rosemary-bright:#6ba184;
            --dusk:         #4a6f8c;
            --dusk-bright:  #6e97b8;

            --display: 'Fraunces', serif;
            --body: 'Work Sans', -apple-system, Helvetica, Arial, sans-serif;
            --mono: 'IBM Plex Mono', monospace;
        }

        * { box-sizing: border-box; }

        body {
            font-family: var(--body);
            background-color: var(--granite);
            background-image:
                radial-gradient(circle at 12% 0%, rgba(214,165,63,0.07), transparent 42%),
                radial-gradient(circle at 100% 30%, rgba(184,69,31,0.05), transparent 40%),
                url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
            color: var(--limestone);
            margin: 0;
            padding: 0;
            line-height: 1.65;
        }

        h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; }
        a { color: inherit; }
        ::selection { background: var(--wheat); color: var(--granite); }

        /* --- NAV --- */
        .navbar {
            background-color: rgba(18, 16, 11, 0.92);
            border-bottom: 1px solid var(--stone-line);
            position: sticky;
            top: 0;
            z-index: 1000;
            backdrop-filter: blur(8px);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 40px;
            gap: 16px;
            flex-wrap: wrap;
        }

        .navbar-brand {
            font-family: var(--display);
            font-weight: 700;
            font-size: 1.2rem;
            color: var(--limestone);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 12px;
            letter-spacing: 0.01em;
        }

        .navbar-brand .logo-badge { width: 38px; height: 38px; flex-shrink: 0; }

        .nav-links { display: flex; gap: 3px; flex-wrap: wrap; }

        .nav-links a {
            color: var(--limestone-dim);
            text-decoration: none;
            font-family: var(--mono);
            font-weight: 500;
            font-size: 0.7rem;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            padding: 8px 12px;
            border-radius: 3px;
            transition: all 0.25s ease;
            border: 1px solid transparent;
            white-space: nowrap;
        }

        .nav-links a:hover { color: var(--limestone); border-color: var(--stone-line); }

        .nav-links a.active {
            background-color: rgba(214,165,63,0.12);
            color: var(--wheat-bright);
            border-color: rgba(214,165,63,0.4);
        }

        /* --- LOGO BADGE (reutilizable) --- */
        .logo-badge circle.ring { fill: var(--granite); stroke: var(--wheat); }
        .logo-badge path.mark { fill: var(--wheat); }
        .logo-badge text { fill: var(--limestone-dim); font-family: var(--mono); }

        /* --- HERO --- */
        .hero {
            position: relative;
            background:
                linear-gradient(155deg, rgba(18,16,11,0.94) 20%, rgba(184,69,31,0.24) 100%),
                var(--hero-image, url('cena-socios.jpg'));
            background-size: cover;
            background-position: center var(--hero-pos-y, 20%);
            padding: var(--hero-padding, 100px 20px 86px);
            border-bottom: 1px solid var(--stone-line);
            overflow: hidden;
        }

        .hero-inner {
            max-width: 1100px;
            margin: 0 auto;
            position: relative;
            z-index: 2;
            display: flex;
            align-items: center;
            gap: 44px;
        }

        .hero-logo { width: 128px; height: 128px; flex-shrink: 0; filter: drop-shadow(0 10px 24px rgba(0,0,0,0.5)); }

        .hero-text { flex: 1; min-width: 260px; }

        .hero-eyebrow {
            font-family: var(--mono);
            font-size: 0.76rem;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: var(--wheat-bright);
            display: block;
            margin-bottom: 16px;
        }

        .hero h1 {
            font-size: clamp(2.2rem, 5.4vw, 3.9rem);
            margin: 0;
            color: var(--limestone);
            font-weight: 700;
            line-height: 1.0;
            max-width: 14ch;
            text-shadow: 0.5px 0.5px 0 rgba(0,0,0,0.4), 0 6px 26px rgba(0,0,0,0.55);
        }

        .hero p {
            font-size: 1.04rem;
            color: var(--limestone-dim);
            margin: 20px 0 30px 0;
            max-width: 48ch;
        }

        .hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

        .container { max-width: 1100px; margin: 56px auto; padding: 0 20px; }

        .section { display: none; animation: fadeInUp 0.45s ease-in-out; }
        .section.active { display: block; }

        .section-title { font-size: 1.85rem; margin: 0 0 6px 0; color: var(--limestone); }

        .section-eyebrow {
            display: flex; align-items: center; gap: 9px;
            font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
            text-transform: uppercase; margin-bottom: 10px;
        }
        .section-eyebrow svg { width: 15px; height: 15px; }
        .section-eyebrow.c-wheat { color: var(--wheat); }
        .section-eyebrow.c-clay { color: var(--clay-bright); }
        .section-eyebrow.c-rosemary { color: var(--rosemary-bright); }
        .section-eyebrow.c-dusk { color: var(--dusk-bright); }

        .section-rule { width: 64px; height: 3px; border: none; border-radius: 2px; margin: 0 0 32px 0; }
        .section-rule.wheat { background: linear-gradient(90deg, var(--clay), var(--wheat)); }
        .section-rule.rosemary { background: linear-gradient(90deg, var(--dusk), var(--rosemary-bright)); }
        .section-rule.dusk { background: linear-gradient(90deg, var(--rosemary), var(--dusk-bright)); }

        .section-intro { color: var(--limestone-dim); max-width: 64ch; margin: 0 0 30px 0; }

        /* --- TARJETAS --- */
        .grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; }

        .custom-card {
            background-color: var(--granite-mid);
            border-radius: 6px;
            overflow: hidden;
            box-shadow: 0 14px 34px rgba(0,0,0,0.28);
            transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
            border: 1px solid var(--stone-line);
            display: flex;
            flex-direction: column;
        }

        .custom-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.4); border-color: rgba(214,165,63,0.4); }

        .card-img-wrap { display: block; overflow: hidden; border-bottom: 1px solid var(--stone-line); }

        .card-img {
            width: 100%; height: 340px; object-fit: cover; cursor: pointer; display: block;
            filter: saturate(0.9) contrast(1.02);
            transition: transform 0.5s ease, filter 0.5s ease;
        }

        .custom-card:hover .card-img { transform: scale(1.045); filter: saturate(1.1) contrast(1.05); }

        .card-body { padding: 22px; flex-grow: 1; }

        .card-tag {
            padding: 4px 11px; border-radius: 3px; font-family: var(--mono); font-size: 0.68rem;
            text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500;
            display: inline-block; margin-bottom: 12px; border: 1px solid;
        }
        .card-tag.gold    { background: rgba(214,165,63,0.14); border-color: rgba(214,165,63,0.45); color: var(--wheat-bright); }
        .card-tag.urgent  { background: rgba(184,69,31,0.16);  border-color: rgba(222,90,48,0.55);  color: #e88060; }
        .card-tag.green   { background: rgba(79,122,99,0.18);  border-color: rgba(107,161,132,0.5); color: var(--rosemary-bright); }
        .card-tag.blue    { background: rgba(74,111,140,0.2);  border-color: rgba(110,151,184,0.55); color: var(--dusk-bright); }

        .card-title { font-size: 1.2rem; margin: 0 0 10px 0; color: var(--limestone); font-weight: 600; }
        .card-meta { color: var(--text-muted); font-size: 0.9rem; }
        .card-meta strong { color: var(--limestone-dim); font-weight: 600; }

        /* --- HISTORIA / CONÓCENOS --- */
        .historia-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 34px; align-items: start; }
        @media (max-width: 820px) { .historia-layout { grid-template-columns: 1fr; } }

        .historia-text p { color: var(--limestone-dim); }
        .historia-text strong { color: var(--limestone); }

        .timeline { border-left: 2px solid var(--stone-line); padding-left: 22px; display: flex; flex-direction: column; gap: 22px; }
        .timeline-item { position: relative; }
        .timeline-item::before {
            content: ''; position: absolute; left: -27px; top: 4px; width: 10px; height: 10px;
            border-radius: 50%; background: var(--wheat); border: 2px solid var(--granite);
        }
        .timeline-year { font-family: var(--mono); font-size: 0.75rem; color: var(--wheat-bright); letter-spacing: 0.06em; }
        .timeline-item p { margin: 4px 0 0 0; color: var(--limestone-dim); font-size: 0.92rem; }

        .draft-note {
            font-family: var(--mono); font-size: 0.72rem; color: var(--text-muted);
            border: 1px dashed var(--stone-line); border-radius: 5px; padding: 10px 14px; margin-top: 26px;
        }

        /* --- VOTACIONES / BUZÓN (embebidos) --- */
        .embed-card {
            background: var(--granite-mid); border: 1px solid var(--stone-line); border-radius: 8px;
            padding: 26px; max-width: 720px;
        }
        .embed-frame-wrap {
            border-radius: 6px; overflow: hidden; border: 1px solid var(--stone-line);
            background: var(--limestone); min-height: 480px;
        }
        .embed-frame-wrap iframe { display: block; width: 100%; height: 480px; border: none; }
        .anon-pill {
            display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.7rem;
            color: var(--rosemary-bright); background: rgba(79,122,99,0.16); border: 1px solid rgba(107,161,132,0.45);
            padding: 5px 12px; border-radius: 20px; margin-bottom: 16px; letter-spacing: 0.04em; text-transform: uppercase;
        }

        /* --- JUNTA DIRECTIVA --- */
        .grid-junta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }

        .junta-member {
            background-color: var(--granite-mid); border-radius: 6px; padding: 30px 15px 24px; text-align: center;
            border: 1px solid var(--stone-line); border-top: 3px solid var(--wheat);
            transition: border-color 0.25s ease, transform 0.25s ease;
        }
        .junta-member:hover { transform: translateY(-3px); border-top-color: var(--clay-bright); }

        .member-avatar {
            font-size: 1.7rem; background: var(--granite);
            width: var(--avatar-size, 62px); height: var(--avatar-size, 62px); line-height: var(--avatar-size, 62px);
            margin: 0 auto 16px auto; border: 1px solid var(--stone-line);
            clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
        }
        .junta-member h3 { font-size: 1.02rem; margin: 0 0 4px 0; color: var(--limestone); }
        .junta-member p { margin: 0; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--wheat); }

        /* --- CONTROL INTERNO --- */
        .admin-nav { display: flex; gap: 8px; margin-bottom: 28px; border-bottom: 1px solid var(--stone-line); padding-bottom: 12px; flex-wrap: wrap; }

        .admin-tab-btn {
            background: transparent; color: var(--text-muted); border: 1px solid var(--stone-line);
            padding: 10px 18px; border-radius: 4px; cursor: pointer; font-family: var(--mono);
            font-size: 0.78rem; letter-spacing: 0.03em; transition: all 0.2s ease;
        }
        .admin-tab-btn.active { background: rgba(214,165,63,0.12); color: var(--wheat-bright); border-color: rgba(214,165,63,0.5); }

        .admin-panel { display: none; }
        .admin-panel.active { display: block; animation: fadeInUp 0.35s ease; }

        .grid-management-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

        .folder-link-box {
            background: var(--granite-hi); border: 1px dashed var(--stone-line); padding: 32px 20px;
            text-align: center; border-radius: 6px; text-decoration: none; color: inherit; display: block; transition: 0.25s ease;
        }
        .folder-link-box:hover { border-color: var(--wheat); background: #3a3122; transform: translateY(-2px); }
        .folder-link-box span { font-size: 2.4rem; }

        .vote-card { background: var(--granite-hi); border-left: 3px solid var(--dusk-bright); padding: 20px; border-radius: 5px; margin-bottom: 15px; }

        .economic-row {
            background: var(--granite-hi); border: 1px solid var(--stone-line); padding: 16px 20px; border-radius: 5px;
            margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
        }

        .year-divider {
            font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
            color: var(--wheat); border-bottom: 1px dashed var(--stone-line); padding-bottom: 8px; margin: 30px 0 16px 0;
        }

        .btn-custom {
            background-color: var(--clay); color: var(--limestone); border: none; padding: 13px 26px; border-radius: 4px;
            cursor: pointer; font-weight: 600; font-size: 0.92rem; transition: background 0.2s ease, transform 0.2s ease;
            text-decoration: none; display: inline-block;
        }
        .btn-custom:hover { background-color: var(--clay-bright); transform: translateY(-1px); }
        .btn-custom.ghost {
            background: transparent; border: 1px solid var(--limestone-dim); color: var(--limestone);
        }
        .btn-custom.ghost:hover { background: rgba(243,236,219,0.08); }

        .btn-custom:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible {
            outline: 2px solid var(--wheat-bright); outline-offset: 2px;
        }

        .input-custom {
            padding: 12px 14px; border-radius: 4px; border: 1px solid var(--stone-line); background: var(--granite);
            color: var(--limestone); width: 100%; max-width: 300px; box-sizing: border-box; margin-bottom: 16px; font-family: var(--body);
        }

        .pass-field-wrap {
            position: relative; display: inline-block; width: 100%; max-width: 300px;
        }
        .pass-field-wrap .input-custom { max-width: 100%; padding-right: 44px; margin-bottom: 16px; }
        .pass-toggle {
            position: absolute; right: 8px; top: 0; bottom: 16px; margin: auto 0;
            height: 28px; width: 28px; display: flex; align-items: center; justify-content: center;
            background: transparent; border: none; cursor: pointer; color: var(--text-muted);
            padding: 0; transition: color 0.2s ease;
        }
        .pass-toggle:hover { color: var(--wheat-bright); }

        .security-note {
            font-family: var(--mono); font-size: 0.72rem; color: var(--text-muted); margin-top: 18px;
            border-top: 1px dashed var(--stone-line); padding-top: 14px;
        }

        @keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

        @media (prefers-reduced-motion: reduce) {
            .section, .admin-panel { animation: none; }
            .custom-card, .junta-member, .card-img { transition: none; }
        }

        @media (max-width: 768px) {
            .navbar { flex-direction: column; gap: 14px; padding: 16px; }
            .nav-links { justify-content: center; }
            .admin-nav { flex-direction: column; }
            .economic-row { flex-direction: column; text-align: center; }
            .hero { padding: 70px 20px 54px; }
            .hero-inner { flex-direction: column; text-align: center; gap: 24px; }
            .hero p { margin-left: auto; margin-right: auto; }
            .hero-logo { width: 96px; height: 96px; }
        }
