:root {
    --black: #090909;
    --black-soft: #141414;
    --red: #d90429;
    --red-2: #ef233c;
    --white: #f7f7f7;
    --yellow: #ffcc00;
    --text: #f2f2f2;
    --muted: #cfcfcf;
    --card: #1b1b1b;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    --maxw: 1160px;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: linear-gradient(180deg, var(--black) 0%, #101010 100%);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(94%, var(--maxw));
    margin-inline: auto;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    backdrop-filter: blur(8px);
    background: rgba(9, 9, 9, 0.9);
    border-bottom: 1px solid var(--border);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.brand-logo-img {
    width: 75px;
    height: 75px;
    object-fit: contain;
    border-radius: 50%;
    background: #000;
    border: 1px solid var(--border);
    padding: 4px;
}

.brand-logo-fallback {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    place-items: center;
    font-size: 1.6rem;
    background: linear-gradient(45deg, var(--red), var(--red-2));
}

.brand-texts {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    line-height: 1.05;
}

.brand-main {
    font-weight: 800;
    font-size: 1rem;
}

.brand-rotator {
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: 0.08em;
    color: var(--yellow);
    text-transform: uppercase;
    animation: brandFade 0.6s ease;
}

@keyframes brandFade {
    from {
        opacity: 0.2;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.site-nav > a,
.nav-dropbtn {
    padding: 0;
    border-radius: 0;
    color: #e8e8e8;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: default;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
}


.site-nav > a:hover,
.site-nav > a.active,
.nav-dropbtn:hover,
.nav-dropdown.active .nav-dropbtn {
    background: transparent;
    border-color: transparent;
    color: var(--yellow);
}

.nav-dropdown {
    position: relative;
}

.intranet-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.38rem;
    padding: 0.42rem 0.72rem !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 204, 0, 0.5) !important;
    background: rgba(255, 204, 0, 0.08) !important;
    color: var(--yellow) !important;
    font-weight: 800 !important;
    line-height: 1;
}

.intranet-btn:hover {
    background: rgba(255, 204, 0, 0.16) !important;
    transform: translateY(-1px);
}

.intranet-icon {
    font-size: 0.95rem;
}

.caret {
    margin-left: 0.25rem;
    color: var(--yellow);
}

.nav-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: #101010;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0.3rem 0;
    display: none;
    z-index: 25;
}

.nav-dropdown-content a {
    display: block;
    padding: 0.5rem 0.35rem;
    border-radius: 0;
    color: #f0f0f0;
}

.nav-dropdown-content a:hover,
.nav-dropdown-content a.active {
    background: transparent;
    color: var(--yellow);
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}


.menu-toggle {
    display: none;
    background: transparent;
    color: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.45rem 0.7rem;
    cursor: pointer;
}

/* General sections */
.section {
    padding: 52px 0;
}

.section h1,
.section h2 {
    margin-top: 0;
}

.page-hero {
    padding-top: 70px;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    min-height: 74vh;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
    background-size: cover;
    background-position: center;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.45) 45%, rgba(0,0,0,0.3) 100%);
}

.hero-slide.active {
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    margin: 0 0 12px;
    line-height: 1.1;
}

.hero-content p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.btn {
    display: inline-block;
    margin-top: 14px;
    padding: 0.84rem 1.12rem;
    border-radius: 12px;
    background: linear-gradient(45deg, var(--red), var(--red-2));
    color: #fff;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: var(--shadow);
    transition: transform .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.hero-controls {
    position: absolute;
    bottom: 22px;
    width: 100%;
    z-index: 3;
}

.hero-controls-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-btn {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid var(--border);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
}

.hero-dots button.active {
    background: var(--yellow);
}

/* Cards / grids */
.grid {
    display: grid;
    gap: 18px;
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: none;
}

.card h3 {
    margin-top: 0;
}

.card p {
    color: var(--muted);
    line-height: 1.56;
}


.story-preview {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
    align-items: stretch;
}

.home-news-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 14px;
}

.home-news-main {
    position: relative;
    min-height: 430px;
    border-radius: 14px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border);
}

.home-news-main .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 15%, rgba(0,0,0,0.82) 100%);
}

.home-news-main .content {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 2;
}

.home-news-main h3 {
    margin: 0 0 10px;
    font-size: clamp(1.2rem, 2.4vw, 1.9rem);
}

.home-news-side {
    display: grid;
    grid-template-rows: 1fr 1fr auto;
    gap: 12px;
}

.home-news-mini {
    padding: 16px;
}

.home-news-mini h4 {
    margin: 0 0 8px;
}

.home-news-mini p {
    margin: 0 0 10px;
}

.home-news-mini a {
    color: var(--yellow);
    font-weight: 700;
}

.home-news-all {
    display: flex;
    justify-content: flex-start;
}

.home-gallery-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.home-gallery-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    min-height: 180px;
}

.home-gallery-item img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    display: block;
}

.home-gallery-actions {
    margin-top: 14px;
}

.story-image {
    border-radius: 14px;
    border: 1px solid var(--border);
    min-height: 280px;
    background: linear-gradient(rgba(0,0,0,.2), rgba(0,0,0,.2)), url("../images/galeria/historia.jpg") center/cover no-repeat;
}

/* Emergencias */
.emergency-section {
    background: linear-gradient(135deg, #100b0b 0%, #1a1010 100%);
    border-top: 2px solid rgba(255, 204, 0, .45);
    border-bottom: 2px solid rgba(255, 204, 0, .45);
}

.emergency-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0,1fr));
}

.emergency-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    padding: 14px;
    text-align: center;
}

.emergency-number {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
}

.emergency-label {
    color: var(--muted);
    margin-top: 5px;
    font-size: 0.95rem;
}

.emergency-card.main-132 {
    background: linear-gradient(180deg, rgba(217,4,41,.28), rgba(0,0,0,.35));
    border-color: rgba(255, 204, 0, 0.65);
    transform: scale(1.08);
    z-index: 2;
}

.emergency-card.main-132 .emergency-number {
    color: var(--yellow);
    font-size: 2.9rem;
}

/* Gallery / form */
.gallery {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0,1fr));
}

.gallery .item {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #111;
    aspect-ratio: 4/3;
    display: grid;
    place-items: center;
    color: var(--muted);
}

.form-group {
    margin-bottom: 12px;
}

input, textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: #0f0f0f;
    color: #fff;
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 44px;
    color: var(--muted);
    padding: 28px 0 18px;
    background: rgba(0, 0, 0, 0.22);
}

.footer-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1.2fr 1fr 1fr;
    align-items: start;
}

.footer-brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.footer-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #000;
    padding: 3px;
}

.footer-brand h3 {
    margin: 0;
    color: #fff;
    font-size: 1.05rem;
}

.footer-motto {
    margin: 6px 0 0;
    color: var(--yellow);
    font-weight: 700;
}

.site-footer h4 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 0.98rem;
}

.footer-links {
    display: grid;
    gap: 6px;
}

.footer-links a {
    color: var(--muted);
    transition: color .2s ease;
}

.footer-links a:hover {
    color: var(--yellow);
}

.footer-copy {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 0.93rem;
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: .6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 980px) {
    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
    .instagram-grid {
        grid-template-columns: 1fr 1fr;
    }
    .story-preview {
        grid-template-columns: 1fr;
    }
    .home-news-layout {
        grid-template-columns: 1fr;
    }
    .home-news-main {
        min-height: 360px;
    }
    .home-news-side {
        grid-template-rows: auto;
    }
    .home-gallery-preview {
        grid-template-columns: 1fr 1fr;
    }
    .emergency-grid {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }
}

@media (max-width: 760px) {
    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 78px;
        right: 3%;
        width: min(92vw, 320px);
        background: #0f0f0f;
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 0.55rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav > a,
    .nav-dropbtn {
        text-align: left;
        width: 100%;
    }

    .brand-logo-img,
    .brand-logo-fallback {
        width: 52px;
        height: 52px;
    }

    .brand-main {
        font-size: 0.92rem;
    }

    .brand-rotator {
        font-size: 0.8rem;
    }

    .nav-dropdown-content {
        position: static;
        box-shadow: none;
        border: 1px solid var(--border);
        margin-top: 6px;
    }

    .grid-3,
    .gallery,
    .home-gallery-preview,
    .emergency-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        align-items: flex-start;
    }

    .hero-slider {
        min-height: 70vh;
    }
}
