:root {
    --primary: #8e9173;
    --primary-dark: #686b51;
    --forest: #2e3a2b;
    --forest-soft: #3f4d3a;
    --gold: #b17a45;
    --sand: #f5f3ed;
    --sand-2: #e9e3d5;
    --text: #2f3329;
    --muted: #6f7469;
    --white: #ffffff;
    --line: #e8e3d8;
    --shadow: 0 12px 35px rgba(46, 58, 43, 0.12);
    --shadow-hover: 0 20px 45px rgba(46, 58, 43, 0.20);
    --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(177,122,69,0.10), transparent 35%),
        linear-gradient(180deg, #ffffff 0%, var(--sand) 55%, #ffffff 100%);
    overflow-x: hidden;
}

a { text-decoration: none; }

.page-shell {
    width: 100%;
    overflow: hidden;
}

/* HERO */
.directorio-hero {
    min-height: 360px;
    background:
        linear-gradient(100deg, rgba(46,58,43,0.90), rgba(104,107,81,0.58), rgba(255,255,255,0.08)),
        url('img/cintillo-1.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 0 0 34px 34px;
    box-shadow: var(--shadow);
}

.directorio-hero__overlay {
    min-height: 360px;
    display: flex;
    align-items: center;
    padding: 55px 0;
}

.directorio-hero .container {
    max-width: 1180px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    background: rgba(142,145,115,0.14);
    color: var(--primary-dark);
}

.directorio-hero .eyebrow {
    background: rgba(177,122,69,0.96);
    color: #fff;
}

.directorio-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 5px 22px rgba(0,0,0,0.30);
}

.directorio-hero p {
    color: rgba(255,255,255,0.90);
    font-size: 18px;
    line-height: 1.7;
    max-width: 650px;
    margin: 0;
}

/* SECCIÓN PRINCIPAL */
.section-block {
    width: 92%;
    max-width: 1180px;
    margin: 34px auto;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(232,227,216,0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 34px;
    position: relative;
    overflow: hidden;
}

.section-block::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--gold), var(--forest));
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 26px;
}

.section-heading h2 {
    margin: 12px 0 0;
    color: var(--forest);
    font-size: clamp(25px, 3vw, 36px);
    font-weight: 900;
}

.section-note {
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

/* DIRECTORIO */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.directory-box {
    background: linear-gradient(180deg, #ffffff, #fbfaf6);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 6px 18px rgba(46,58,43,0.08);
    transition: 0.3s ease;
    overflow: hidden;
    min-height: 245px;
    position: relative;
}

.directory-box::before {
    content: "";
    position: absolute;
    left: 0;
    top: 22px;
    width: 5px;
    height: 58px;
    border-radius: 0 8px 8px 0;
    background: var(--gold);
}

.directory-box:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.directory-box h3 {
    color: var(--forest);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.3;
    margin: 0 0 16px;
    padding-left: 10px;
    text-transform: uppercase;
}

.directory-box .row {
    align-items: flex-start;
}

.directory-box p {
    color: var(--muted);
    font-size: 14px;
    margin: 5px 0;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.directory-box p strong {
    color: var(--forest);
}

.directory-photo {
    width: 100%;
    max-width: 125px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 18px;
    display: block;
    box-shadow: 0 10px 24px rgba(46,58,43,0.15);
    border: 4px solid #fff;
    background: var(--sand-2);
}

/* ATENCIÓN CIUDADANA */
.citizen-help-section{
    margin-top:70px;
    background:
        linear-gradient(135deg, rgba(46,58,43,.96), rgba(67,83,75,.95)),
        url('img/cintillo-1.jpg');
    background-size:cover;
    background-position:center;
    position:relative;
    padding:70px 7%;
    overflow:hidden;
}

.citizen-help-section::before{
    content:'';
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.18);
}

.citizen-help-container{
    position:relative;
    z-index:2;
    max-width:1280px;
    margin:0 auto;
}

.citizen-help-section h2{
    text-align:center;
    font-size:clamp(34px,4vw,50px);
    font-weight:900;
    color:white;
    margin:0 0 50px;
    text-shadow:0 4px 18px rgba(0,0,0,.30);
}

.citizen-help-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:28px;
}

.citizen-help-card{
    background:rgba(255,255,255,.10);
    border:1px solid rgba(255,255,255,.14);
    border-radius:26px;
    padding:28px 22px;
    backdrop-filter:blur(10px);
    transition:.35s ease;
    display:flex;
    gap:18px;
    align-items:flex-start;
    min-height:230px;
    box-shadow:0 12px 30px rgba(0,0,0,.16);
}

.citizen-help-card:hover{
    transform:translateY(-8px);
    background:rgba(255,255,255,.16);
}

.citizen-help-icon{
    min-width:62px;
    width:62px;
    height:62px;
    border-radius:50%;
    background:white;
    color:var(--gold);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:24px;
    box-shadow:0 10px 20px rgba(0,0,0,.18);
}

.citizen-help-content{
    flex:1;
}

.citizen-help-content h3{
    color:white;
    margin:0 0 10px;
    font-size:22px;
    font-weight:900;
}

.citizen-help-content p{
    color:rgba(255,255,255,.84);
    line-height:1.7;
    font-size:14px;
    margin:0 0 18px;
}

.citizen-help-content a{
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:#f4d1a5;
    font-size:13px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.4px;
    transition:.3s ease;
}

.citizen-help-content a:hover{
    color:white;
    transform:translateX(4px);
}

/* FOOTER */
.pantepec-footer{
    background:#ece7da;
    padding:55px 7% 35px;
    text-align:center;
}

.footer-logo-area img{
    max-width:250px;
    width:100%;
    height:auto;
    margin:0 auto 16px;
    display:block;
    filter:drop-shadow(0 8px 18px rgba(0,0,0,.12));
}

.footer-social{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:12px;
}

.footer-social a{
    width:34px;
    height:34px;
    border-radius:50%;
    background:var(--forest);
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    transition:.3s ease;
}

.footer-social a:hover{
    background:var(--gold);
    transform:translateY(-4px);
    color:#fff;
}

.footer-divider{
    max-width:900px;
    height:1px;
    background:#cfc5af;
    margin:30px auto;
    position:relative;
}

.footer-divider span{
    width:14px;
    height:14px;
    background:#cfc5af;
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%) rotate(45deg);
}

.footer-menu{
    max-width:950px;
    margin:0 auto;
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:40px;
    text-align:left;
}

.footer-menu h4{
    color:var(--forest);
    font-size:15px;
    font-weight:900;
    margin-bottom:14px;
}

.footer-menu a{
    display:block;
    color:#465245;
    font-size:13px;
    margin-bottom:10px;
    transition:.3s ease;
}

.footer-menu a:hover{
    color:var(--gold);
    transform:translateX(4px);
}

.footer-address{
    max-width:900px;
    margin:35px auto 0;
    padding-top:22px;
    border-top:1px solid #cfc5af;
    font-size:13px;
    line-height:1.8;
    color:#4f5848;
}

.footer-address strong{
    display:block;
    color:var(--forest);
    margin-bottom:8px;
    font-size:14px;
}

.footer-address p{
    margin:2px 0;
}

.footer-strip{
    background:var(--primary);
    color:white;
    text-align:center;
    padding:14px 20px;
    font-size:12px;
    font-weight:700;
    letter-spacing:.3px;
}

/* ANIMACIÓN */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE */
@media(max-width:1100px){
    .directory-grid{
        grid-template-columns:1fr;
    }

    .citizen-help-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .footer-menu{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:768px){
    .directorio-hero,
    .directorio-hero__overlay {
        min-height: 330px;
    }

    .directorio-hero__overlay {
        padding: 40px 12px;
    }

    .section-block {
        width: 94%;
        padding: 24px;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-note {
        white-space: normal;
    }

    .directory-box {
        text-align: center;
    }

    .directory-box::before {
        left: 50%;
        transform: translateX(-50%);
        top: 0;
        width: 70px;
        height: 5px;
        border-radius: 0 0 8px 8px;
    }

    .directory-box h3 {
        padding-left: 0;
    }

    .directory-photo {
        margin: 0 auto 16px;
    }

    .citizen-help-section{
        padding:55px 22px;
    }

    .citizen-help-grid{
        grid-template-columns:1fr;
    }

    .citizen-help-card{
        flex-direction:column;
        text-align:center;
        align-items:center;
        min-height:auto;
    }

    .footer-menu{
        grid-template-columns:1fr;
        text-align:center;
        gap:26px;
    }

    .pantepec-footer{
        padding:45px 24px 30px;
    }

    .footer-address{
        font-size:12px;
    }
}

@media(max-width:520px){
    .directorio-hero p {
        font-size: 15px;
    }

    .directory-box {
        padding: 20px 16px;
    }
}
