/* Homepage — layout premium */
.home-page .section {
    padding: 5rem 0;
}

.home-page .section-head {
    margin-bottom: 3rem;
}

.home-page .section-head-center {
    text-align: center;
}

.home-page .section-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 0.75rem;
}

.home-page .section-head h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    margin-bottom: 0.75rem;
}

.home-page .section-head p {
    max-width: 640px;
    margin: 0;
    color: var(--text-secondary);
}

.home-page .section-head-center p {
    margin-left: auto;
    margin-right: auto;
}

/* Hero */
.home-hero {
    position: relative;
    min-height: calc(100vh - 70px);
    margin-top: 70px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    background: #050505;
}

.home-hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.home-hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}

.home-hero-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(5, 5, 5, 0.92) 0%, rgba(5, 5, 5, 0.55) 42%, rgba(5, 5, 5, 0.25) 100%),
        linear-gradient(180deg, rgba(5, 5, 5, 0.2) 0%, rgba(5, 5, 5, 0.85) 100%),
        radial-gradient(circle at 85% 20%, rgba(225, 6, 19, 0.22) 0%, transparent 45%);
    z-index: 1;
}

.home-hero-grid {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 4rem 2rem 7rem;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: center;
}

.home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(225, 6, 19, 0.35);
    background: rgba(225, 6, 19, 0.1);
    color: #ffb4b4;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.home-hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 10px var(--red);
    animation: homePulse 2s ease-in-out infinite;
}

@keyframes homePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.home-hero-title {
    font-size: clamp(2.75rem, 6vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
    margin-bottom: 1.25rem;
}

.home-hero-title span {
    display: block;
    background: linear-gradient(135deg, #fff 0%, #ffcaca 45%, var(--red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-hero-lead {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.78);
    max-width: 34rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 2.5rem;
    align-items: stretch;
}

.home-hero-actions-row {
    display: flex;
    flex: 1 1 100%;
    gap: 0.85rem;
    align-items: stretch;
    min-width: 0;
    width: 100%;
}

.home-hero-actions-row .btn {
    flex: 0 0 auto;
    flex-shrink: 0;
}

.home-hero-actions-row .home-hero-emergency-line {
    flex: 1 1 auto;
    min-width: 0;
}

.home-hero-trust {
    margin-top: 0.25rem;
}

.home-hero-emergency-line {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.15rem;
    border-radius: 14px;
    border: 1px solid rgba(225, 6, 19, 0.4);
    background: linear-gradient(135deg, rgba(225, 6, 19, 0.12) 0%, rgba(225, 6, 19, 0.04) 100%);
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    max-width: 100%;
}

.home-hero-emergency-line:hover {
    border-color: rgba(225, 6, 19, 0.65);
    background: rgba(225, 6, 19, 0.14);
    color: inherit;
    transform: translateY(-1px);
}

.home-hero-emergency-num {
    flex: 0 0 auto;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    color: var(--red-light);
    letter-spacing: -0.02em;
}

.home-hero-emergency-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.home-hero-emergency-text strong {
    display: block;
    font-size: 0.92rem;
    color: #fff;
}

.home-hero-emergency-text span {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.home-hero-trust-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.home-hero-trust-item strong {
    font-size: 1.35rem;
    color: #fff;
    line-height: 1;
}

.home-hero-trust-item span {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.home-hero-panel {
    display: flex;
    align-items: stretch;
}

.home-hero-aside {
    width: 100%;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(12, 12, 12, 0.78);
    backdrop-filter: blur(18px);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.home-hero-counter {
    text-align: center;
    padding: 2.15rem 1.75rem 1.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(145deg, rgba(225, 6, 19, 0.2) 0%, rgba(12, 12, 12, 0.24) 100%);
}

.home-hero-counter-num {
    display: block;
    font-size: clamp(4rem, 9vw, 6rem);
    font-weight: 700;
    line-height: 0.92;
    background: linear-gradient(135deg, var(--red-light) 0%, var(--red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.65rem;
    text-shadow: 0 0 30px rgba(225, 6, 19, 0.2);
}

.home-hero-counter-label {
    display: block;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.home-hero-counter-meta {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.home-hero-panel-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.home-hero-panel-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    text-decoration: none;
    color: inherit;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.25s ease, padding-left 0.25s ease;
}

.home-hero-panel-card:first-child {
    border-top: none;
}

.home-hero-panel-card:hover {
    background: rgba(225, 6, 19, 0.08);
    color: inherit;
    padding-left: 1.55rem;
}

.home-hero-panel-card-primary {
    background: rgba(225, 6, 19, 0.06);
}

.home-hero-panel-card-primary:hover {
    background: rgba(225, 6, 19, 0.12);
}

.home-hero-panel-card-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(225, 6, 19, 0.16);
    color: var(--red-light);
    line-height: 0;
}

.home-hero-panel-card-icon svg {
    display: block;
}

.home-hero-panel-card-body {
    flex: 1;
    min-width: 0;
}

.home-hero-panel-card-body strong {
    display: block;
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 0.2rem;
}

.home-hero-panel-card-body span {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.home-hero-panel-card-arrow {
    flex: 0 0 auto;
    color: var(--text-muted);
    transition: color 0.25s ease, transform 0.25s ease;
}

.home-hero-panel-card:hover .home-hero-panel-card-arrow {
    color: var(--red-light);
    transform: translateX(3px);
}

.home-hero-panel-socio {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem 1.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(225, 6, 19, 0.05);
}

.home-hero-panel-actions > .home-hero-panel-socio:only-child {
    border-top: none;
}

.home-hero-panel-socio-eyebrow {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffb4b4;
    margin-bottom: 0.35rem;
}

.home-hero-panel-socio-copy strong {
    display: block;
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 0.2rem;
}

.home-hero-panel-socio-copy span {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.home-hero-panel-socio-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex-shrink: 0;
}

.home-hero-panel-socio-actions .btn {
    justify-content: center;
    white-space: nowrap;
    min-width: 148px;
    padding: 0.65rem 0.9rem;
    font-size: 0.82rem;
}

/* Stats strip */
.home-stats-strip {
    position: relative;
    z-index: 5;
    margin-top: -2.5rem;
    padding-bottom: 1rem;
}

.home-stats-inner {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(22, 22, 22, 0.98) 0%, rgba(14, 14, 14, 0.99) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.75rem 1.85rem 1.65rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.home-stats-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(225, 6, 19, 0.55), transparent);
}

.home-stats-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.home-stats-head-eyebrow {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.home-stats-head h3 {
    font-size: clamp(1.15rem, 2.2vw, 1.45rem);
    margin: 0;
    color: #fff;
    line-height: 1.2;
}

.home-stats-head h3 span {
    color: var(--text-muted);
    font-weight: 600;
}

.home-stats-head-total {
    text-align: right;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.28);
    min-width: 7.5rem;
}

.home-stats-head-total-num {
    display: block;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 700;
    line-height: 1;
    color: #fff;
    margin-bottom: 0.2rem;
}

.home-stats-head-total-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.home-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.85rem;
}

.home-stat-pill {
    position: relative;
    text-align: center;
    padding: 1.15rem 0.65rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: border-color 0.2s ease, background 0.2s ease;
    min-height: 6.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-decoration: none;
    color: inherit;
}

.home-stat-pill:hover {
    border-color: rgba(225, 6, 19, 0.28);
    background: rgba(255, 255, 255, 0.04);
    color: inherit;
}

.home-stat-pill-num {
    display: block;
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
    color: #fff;
}

.home-stat-pill:hover .home-stat-pill-num {
    color: var(--red-light);
}

.home-stat-pill-pct {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.home-stat-pill-label {
    display: block;
    font-size: 0.66rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.35;
}

@media (max-width: 1100px) {
    .home-stat-pill {
        min-height: 5.75rem;
        padding: 1rem 0.45rem 0.9rem;
    }

    .home-stat-pill-label {
        font-size: 0.58rem;
        letter-spacing: 0.03em;
    }

    .home-stat-pill-num {
        font-size: 1.55rem;
    }

    .home-stats-head-total {
        width: 100%;
        text-align: left;
    }
}

/* Bento accesos */
.home-bento {
    padding-top: 3rem;
}

.home-stats-featured {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 2rem 2.25rem;
    border-radius: 20px;
    border: 1px solid rgba(225, 6, 19, 0.35);
    background:
        linear-gradient(135deg, rgba(225, 6, 19, 0.14) 0%, rgba(18, 18, 18, 0.95) 45%, rgba(12, 12, 12, 0.98) 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.home-stats-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--red-dark), var(--red-light), var(--red-dark));
}

.home-stats-featured:hover {
    transform: translateY(-3px);
    border-color: rgba(225, 6, 19, 0.55);
    box-shadow: 0 24px 60px rgba(225, 6, 19, 0.15);
    color: inherit;
}

.home-stats-featured-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffb4b4;
    margin-bottom: 0.65rem;
}

.home-stats-featured h3 {
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    margin-bottom: 0.65rem;
    color: #fff;
}

.home-stats-featured p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
    max-width: 38rem;
    margin: 0;
}

.home-stats-featured-side {
    text-align: center;
    padding: 1.25rem 1rem;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.home-stats-featured-num {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, var(--red-light) 0%, var(--red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.35rem;
}

.home-stats-featured-num-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.home-stats-featured-btn {
    width: 100%;
    justify-content: center;
}

.home-tile-alerts {
    max-width: none;
}

.home-tile {
    position: relative;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, rgba(26, 26, 26, 0.95) 0%, rgba(18, 18, 18, 0.98) 100%);
    padding: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    text-decoration: none;
    color: inherit;
}

a.home-tile:hover {
    color: inherit;
}

.home-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.home-tile:hover {
    border-color: rgba(225, 6, 19, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.home-tile:hover::before {
    opacity: 1;
}

.home-tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(225, 6, 19, 0.12);
    color: var(--red-light);
    margin-bottom: 1rem;
}

.home-tile h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.home-tile p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    flex: 1;
    margin-bottom: 1rem;
}

.home-tile-action {
    margin-top: auto;
}

.home-tile-alerts {
    min-height: 100%;
}

/* Emergencias */
.home-emergencies {
    background: linear-gradient(180deg, transparent 0%, rgba(225, 6, 19, 0.03) 50%, transparent 100%);
}

.home-page #clima {
    scroll-margin-top: 92px;
}

.home-emergencies .emergencies-grid {
    margin-top: 0;
}

.home-emergency-card-link {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.home-emergency-card-link:hover,
.home-emergency-card-link:focus {
    color: inherit;
}

.home-emergency-card-link .emergency-type,
.home-emergency-card-link .emergency-number {
    transition: color 0.2s ease;
}

.home-emergency-card-link:hover .emergency-type,
.home-emergency-card-link:focus .emergency-type,
.home-emergency-card-link:hover .emergency-number,
.home-emergency-card-link:focus .emergency-number {
    color: var(--red-light);
}

/* Split info */
.home-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.home-info-card {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(26, 26, 26, 0.6);
    padding: 2rem;
    height: 100%;
}

.home-info-card h3 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.home-info-card p {
    font-size: 0.95rem;
    line-height: 1.75;
}

.home-info-card .btn {
    margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 1100px) {
    .home-hero-grid {
        grid-template-columns: 1fr;
        padding-bottom: 5rem;
    }

    .home-hero-panel {
        max-width: 100%;
    }

    .home-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-stat-pill:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }

    .home-stat-pill:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
    }

    .home-stat-pill:nth-child(3) {
        grid-column: 1;
        grid-row: 2;
    }

    .home-stat-pill:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
    }

    .home-stat-pill:nth-child(5) {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .home-stats-featured {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .home-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .home-page .section {
        padding: 3.5rem 0;
    }

    .home-hero-grid {
        padding: 2.5rem 1.5rem 3.5rem;
    }

    .home-hero-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .home-hero-actions #homeActivarAlertasBtn {
        width: 100%;
    }

    .home-hero-actions-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .home-hero-actions-row .btn {
        width: 100%;
        white-space: nowrap;
        font-size: 0.92rem;
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .home-hero-actions-row .home-hero-emergency-line {
        grid-column: 1 / -1;
        width: 100%;
    }

    .home-hero-panel-socio {
        grid-template-columns: 1fr;
    }

    .home-hero-panel-socio-actions {
        width: 100%;
    }

    .home-hero-panel-socio-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .home-hero-trust {
        gap: 1rem;
    }

    .home-stats-strip {
        margin-top: -1rem;
    }

    .home-stats-inner {
        padding: 1.35rem 1.15rem 1.25rem;
    }

}
