/* ===== Header Styles ===== */

body.dark-mode .floating-text {
    color:white !important;
}
/* Top Bar */
.top-bar {
    background-color: #1a1a1a;
    color: #fff;
    padding: 8px 0;
    font-size: 14px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.emergency-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.emergency-link:hover {
    color: #ff6b6b;
}

.divider {
    color: #555;
    font-weight: normal;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    color: #fff;
    font-size: 16px;
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: #ff6b6b;
}

/* Main Navigation */
#mainNav {
    background: url('../img/fondodesnivel.png') no-repeat center center;
    background-size: cover;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

#mainNav .navbar-brand {
    padding: 0;
}

#mainNav .navbar-brand img {
    height: 60px;
    transition: all 0.3s ease;
}

#mainNav .nav-link {
    color: #333;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    padding: 10px 15px;
    position: relative;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    color: #e74c3c;
    border-bottom: 1px solid #e74c3c;
}

/* Eliminamos el pseudo-elemento after que creaba el segundo borde */
#mainNav .nav-link:after {
    display: none;
}

#mainNav .dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    padding: 10px 0;
    margin-top: 10px;
}

#mainNav .dropdown-item {
    padding: 8px 20px;
    font-size: 13px;
    color: #333;
    transition: all 0.3s ease;
}

#mainNav .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #e74c3c;
    padding-left: 25px;
}

#mainNav .dropdown-divider {
    margin: 5px 0;
}

 /* Responsive Styles */
@media (max-width: 991.98px) {
     #mainNav .container {
        position: relative;
     }

     #mainNav .navbar-collapse {
         position: absolute;
         top: 100%;
         left: 0;
         right: 0;
         background-color: #212529;
         color: #fff;
         padding: 15px;
         margin-top: 0;
         box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
         max-height: calc(100vh - 120px);
         overflow-y: auto;
     }

    #mainNav .navbar-nav {
        gap: 5px;
    }

    #mainNav .nav-link {
        padding: 10px;
        color: #fff;
    }

    #mainNav .nav-link .active{
        border-bottom: solid 1px #da4d3e;
    }

     #mainNav .dropdown-menu {
         box-shadow: none;
         padding: 0;
         margin: 0 0 0 20px;
         border-left: 2px solid #f1f1f1;
     }
 }

 .mainnav-backdrop {
     position: fixed;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     background: rgba(0, 0, 0, 0.35);
     z-index: 999;
 }

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    overflow-x: hidden;
    margin: 0;
    min-height: 100vh;
    background: url('../img/fondodesnivel2.png') no-repeat center center;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-attachment: fixed;
}

 body.dark-mode{
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    --dm-bg: #0b1220;
    --dm-surface: rgba(17, 24, 39, 0.88);
    --dm-surface-2: rgba(30, 41, 59, 0.82);
    --dm-text: #e5e7eb;
    --dm-muted: #9ca3af;
    --dm-border: rgba(148, 163, 184, 0.22);
    --dm-accent: #ea4e1a;
    color: var(--dm-text);
    overflow-x: hidden;
    margin: 0;
    min-height: 100vh;
    background: url('../img/background-dark.png') no-repeat center center;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-attachment: fixed;
 }

@media (max-width: 768px) {
    body {
        background: url('../img/fondodesnivel2-movil.png');
        background-attachment: scroll;
        background-position: center top;
    }

    body.dark-mode {
        background: url('../img/background-dark-movil.png');
        background-attachment: scroll;
        background-position: center top;
    }
}

body.dark-mode a {
    color: var(--dm-text);
}

body.dark-mode a:hover {
    color: var(--dm-accent);
}

body.dark-mode .divider {
    color: rgba(148, 163, 184, 0.45);
}

body.dark-mode .emergency-link,
body.dark-mode .social-icon {
    color: var(--dm-text);
}

body.dark-mode .emergency-link:hover,
body.dark-mode .social-icon:hover {
    color: #ff6b6b;
}


body.dark-mode section {
    color: var(--dm-text);
}

body.dark-mode .section-title {
    color: var(--dm-accent);
}

body.dark-mode .section-subtitle {
    color: var(--dm-muted);
}

body.dark-mode .services {
    background: transparent;
}

body.dark-mode .service-card h3,
body.dark-mode .news-card h3 {
    color: var(--dm-accent);
}

body.dark-mode .service-card p,
body.dark-mode .news-date {
    color: var(--dm-muted);
}

body.dark-mode .services h5{
    color: #fff;
}

body.dark-mode .news-card p {
    color: var(--dm-muted);
}

body.dark-mode .news-category {
    background: var(--dm-accent);
}

body.dark-mode .pagination-btn {
    background: rgba(15, 23, 42, 0.75);
    color: var(--dm-muted);
    border-color: var(--dm-border);
}

body.dark-mode .pagination-btn:hover {
    border-color: var(--dm-accent);
    color: var(--dm-accent);
}

body.dark-mode .pagination-btn.active {
    background: var(--dm-accent);
    color: #ffffff;
    border-color: var(--dm-accent);
}

body.dark-mode .team {
    background: transparent;
}

body.dark-mode .team-member {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--dm-border);
}

body.dark-mode .team-member h4 {
    color: var(--dm-accent);
}

body.dark-mode .member-role,
body.dark-mode .member-bio {
    color: var(--dm-muted);
}

body.dark-mode .gallery-overlay {
    background: linear-gradient(to top, rgba(15, 23, 42, 0.92), transparent);
}

body.dark-mode .contact-item,
body.dark-mode .contact-form {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--dm-border);
}

body.dark-mode .contact-item p {
    color: var(--dm-muted);
}

body.dark-mode .contact-item h4,
body.dark-mode .contact-form h3 {
    color: var(--dm-accent);
}

body.dark-mode .contact-form .title-contact-form{
    color:white !important;
}

body.dark-mode .contact-icon {
    background: rgba(2, 6, 23, 0.85);
    color: var(--dm-text);
}

body.dark-mode .footer {
    background: rgba(2, 6, 23, 0.92);
    color: var(--dm-text);
}

body.dark-mode .footer-emergency a {
    color: #fbbf24;
}

body.dark-mode .history-grid::before {
    background: rgba(148, 163, 184, 0.35);
}

body.dark-mode .history-year h3 {
    background: var(--dm-accent);
}

body.dark-mode .modal-content,
body.dark-mode .toast {
    background: rgba(2, 6, 23, 0.92);
    color: var(--dm-text);
    border: 1px solid var(--dm-border);
}

body.dark-mode .modal-header,
body.dark-mode .modal-footer {
    border-color: var(--dm-border);
}

body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode input,
body.dark-mode textarea {
    background-color: rgba(15, 23, 42, 0.75);
    color: var(--dm-text);
    border-color: var(--dm-border);
}

body.dark-mode .form-control::placeholder,
body.dark-mode textarea::placeholder {
    color: rgba(229, 231, 235, 0.6);
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus,
body.dark-mode input:focus,
body.dark-mode textarea:focus {
    border-color: rgba(234, 78, 26, 0.6);
    box-shadow: 0 0 0 0.2rem rgba(234, 78, 26, 0.18);
}

 @supports (-webkit-touch-callout: none) {
     body {
         background-attachment: scroll;
     }
 }

.modal-extra-background {
    background: url('../img/fondodesnivel.png') no-repeat center center;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
}

body.dark-mode .modal-extra-background {
    background-color: #182333f2;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
}

.modal-extra-background.dark-mode {
    background: url('../img/background-dark.png') no-repeat center center;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
}

body.dark-mode #mainNav {
    background-image: none !important;
    background: #182333f2 !important;
    color: white !important;
}

body.dark-mode #mainNav .nav-link {
    color: white !important;
}

body.dark-mode .section-title {
    color: white !important;
}

body.dark-mode .section-subtitle {
    color: white !important;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar:not(#mainNav):not(#navbarBlur) {
    position: fixed;
    top: 0;
    width: 100%;
    color: white;
    backdrop-filter: blur(10px);
    border-bottom: 3px solid transparent;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: #212529;
    border-bottom: 3px solid #ea4e1a;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Always dark navbar on mobile for main landing nav */
@media (max-width: 991.98px) {
    #mainNav {
        background: #212529 !important;
        border-bottom: 3px solid #ea4e1a;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    font-size: 1.2rem;
    color: white;
}

.brand-icon {
    font-size: 1.5rem;
}


.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
}

.nav-link:hover {
    border-bottom: 1px solid #EA4E1A;
    transform: translateY(-2px);
}

.nav-link.emergency {
    background: #ef4444;
    animation: pulse 2s infinite;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* Hero Section */
/* Estilos del carrusel */
 #heroCarousel {
     width: 100%;
     height: 100vh;
     overflow: hidden;
 }

#heroCarousel .carousel-item {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#heroCarousel .carousel-inner,
#heroCarousel .carousel-item {
    height: 100%;
}

 .hero {
     position: relative;
     height: 100vh;
     min-height: 600px;
     display: flex;
     align-items: center;
     justify-content: center;
     text-align: center;
     color: white;
     overflow: hidden;
     background-color: #000;
 }

 @supports (height: 100svh) {
     #heroCarousel {
         height: 100svh;
     }

     .hero {
         height: 100svh;
         min-height: 0;
     }
 }

 @supports (height: 100dvh) {
     #heroCarousel {
         height: 100dvh;
     }

     .hero {
         height: 100dvh;
         min-height: 0;
     }
 }

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(83, 83, 83, 0.8), rgba(46, 72, 114, 0.6));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    opacity: 1;
    animation: heroFadeIn 1s ease-out forwards;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

/* Efectos de animación para el carrusel */
.carousel-item {
    transition: transform 0.6s ease-in-out;
}

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
    transition: opacity 0s 0.6s;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
    animation-delay: 0.5s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Estilos para móviles */
@media (max-width: 768px) {
    .carousel-control-prev,
    .carousel-control-next {
        width: 15%;
        min-width: 40px;
        margin: 0 5px;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 2.5rem;
        height: 2.5rem;
        padding: 10px;
    }

    .hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 1rem;
        text-align: center;
        padding: 0 1rem;
    }

    .hero-content {
        padding: 2rem 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        text-align: center;
    }

    .hero-stats {
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 1.5rem;
        padding: 0 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        text-align: center;
        padding: 0 0.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
        margin: 1.5rem 0;
        padding: 0 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .social-links {
        margin-bottom: 1rem;
    }

    .social-links a {
        font-size: 1.2rem;
        margin: 0 0.5rem;
    }

    .stat {
        text-align: center;
        min-width: 80px;
        padding: 0.5rem;
    }

    .stat-number {
        font-size: 1.2rem;
        font-weight: bold;
        display: block;
        margin-bottom: 0.25rem;
    }

    .stat-label {
        font-size: 0.7rem;
        line-height: 1.2;
        display: block;
    }
}

/* Estilos para tablets */
@media (max-width: 992px) and (min-width: 769px) {
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.3;
        text-align: center;
        padding: 0 2rem;
    }

    .hero-content {
        padding: 2rem 2rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        text-align: center;
        margin-bottom: 1.8rem;
    }

    .hero-buttons {
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
        margin: 1.8rem 0;
    }

    .hero-buttons .btn {
        padding: 0.8rem 2rem;
        font-size: 0.95rem;
    }

    .hero-stats {
        gap: 1rem;
        justify-content: center;
        margin-top: 2rem;
    }

    .stat {
        min-width: 100px;
        padding: 0.8rem;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }
}

/* Estilos adicionales para móviles muy pequeños */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
        padding: 0 0.5rem;
    }

    .hero-content {
        padding: 1.5rem 0.5rem;
    }

    .hero-buttons .btn {
        max-width: 240px;
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }

    .hero-stats {
        gap: 0.6rem;
        padding: 0 0.5rem;
    }

    .stat {
        min-width: 70px;
        padding: 0.4rem;
    }

    .stat-number {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }
}

/* Estilos para el acordeón de documentación */
.accordion {
    margin-top: 1rem;
}

.accordion-item {
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.5rem !important;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.accordion-button {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 600;
    padding: 1rem 1.25rem;
    border: none;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background-color: #2e4e72;
    color: white;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-button::after {
    filter: brightness(0) invert(1);
}

.accordion-button:not(.collapsed)::after {
    filter: brightness(0) invert(1);
}

.accordion-body {
    padding: 1.5rem;
    background-color: white;
}

.accordion-body .btn {
    margin-bottom: 0.5rem;
    width: 100%;
    text-align: left;
    white-space: normal;
    line-height: 1.4;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accordion-body .btn i {
    font-size: 1rem;
    flex-shrink: 0;
}

.accordion-body hr {
    border-color: #66ccfb;
    opacity: 0.5;
    margin: 1rem 0;
}

/* Responsive para acordeón */
@media (max-width: 768px) {
    .accordion {
        margin: 0.5rem;
    }

    .accordion-item {
        border-radius: 0.375rem !important;
        margin-bottom: 0.75rem;
    }

    .accordion-button {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .accordion-body {
        padding: 1rem;
    }

    .accordion-body .btn {
        font-size: 0.85rem;
        padding: 0.625rem 0.875rem;
        gap: 0.375rem;
    }

    .accordion-body .btn i {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .accordion {
        margin: 0.25rem;
    }

    .accordion-button {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }

    .accordion-body {
        padding: 0.875rem;
    }

    .accordion-body .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
        gap: 0.25rem;
        min-height: auto;
    }

    .accordion-body .btn i {
        font-size: 0.8rem;
    }

    .accordion-body hr {
        margin: 0.75rem 0;
    }
}

/* Estilos adicionales para móviles muy pequeños */
@media (max-width: 360px) {
    .accordion-button {
        padding: 0.625rem 0.75rem;
        font-size: 0.85rem;
    }

    .accordion-body {
        padding: 0.75rem;
    }

    .accordion-body .btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.625rem;
        line-height: 1.3;
    }
}

/* Estilos para los indicadores del carrusel */
.carousel-indicators {
    width: 14px;
    height: 14px;
    bottom: 20px;
    margin: 0;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    list-style: none;
}

.carousel-indicators [data-bs-target] {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin: 0;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.carousel-indicators .active {
    background-color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Efecto hover para los indicadores */
.carousel-indicators [data-bs-target]:hover {
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
}

/* Estilos para los controles de navegación */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}



.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
    animation-delay: 1.5s;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem auto; /* center container horizontally */
    width: 100%;
    max-width: 500px;
    background: transparent !important;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-emergency {
    background: #EA4E1A;
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    animation: pulse 2s infinite;
}

.btn-emergency:hover {
    background: #EA4E1A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: #EA4E1A;
    transform: translateY(-2px);
}

.btn-primary {
    background: #EA4E1A;
    color: white;
}

.btn-primary:hover {
    background: #EA4E1A;
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 1200px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 2px;
    height: 30px;
    background: white;
    margin: 0.5rem auto;
    position: relative;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -3px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 8px solid white;
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #EA4E1A;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* Services Section */
.services {
    background: #ffffff;
}

body.dark-mode .services{
    background-image: none;
    background: #182333f2;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: url('../img/fondito.png') no-repeat center center fixed;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

@media (max-width: 768px) {
    .service-card{
        background: url('../img/fondito.png');
        background-attachment: scroll;
        background-position: center top;
    }
}

body.dark-mode .service-card {
    background-image: none;
    background-color: #182333f2;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #EA4E1A;
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: bold;
    color: #EA4E1A;
    margin-bottom: 1rem;
}

.service-card p {
    color: #64748b;
    line-height: 1.6;
}

/* Snow Effect */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    animation: fall linear infinite;
    pointer-events: none;
    user-select: none;
}

@keyframes fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) translateX(var(--drift, 0px)) rotate(180deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) translateX(var(--drift, 0px)) rotate(360deg);
        opacity: 0;
    }
}

/* News Section */
.news {
    position: relative;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.news-card {
    background: url('../img/fondito.png') no-repeat center center fixed;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(59, 130, 246, 0.1);
    position: relative;
}

@media (max-width: 768px) {
    .news-card{
        background: url('../img/fondito.png');
        background-attachment: scroll;
        background-position: center top;
    }
}


body.dark-mode .news-card {
    background-image: none;
    background: #182333f2;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(59, 130, 246, 0.1);
    position: relative;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #EA4E1A;
}

.news-card.featured {
    grid-column: auto;
    display: block;
    min-height: auto;
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-card.featured .news-image {
    height: 200px;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card.featured .news-content {
    padding: 1.5rem;
    justify-content: flex-start;
}

.news-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.news-date {
    color: #64748b;
    font-weight: 500;
}

.news-category {
    background: #EA4E1A;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card h3 {
    font-size: 1.3rem;
    font-weight: bold;
    color: #EA4E1A;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-card.featured h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.news .pagination {
    display: flex;
    justify-content: center;
}

.news-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 14px;
    backdrop-filter: blur(6px);
}

body.dark-mode .news-pagination-bar {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(148, 163, 184, 0.25);
}

.news-pagination-summary {
    font-weight: 600;
    color: #64748b;
    font-size: 0.95rem;
    white-space: nowrap;
}

body.dark-mode .news-pagination-summary {
    color: var(--dm-muted);
}

@media (max-width: 575.98px) {
    .news-pagination-bar {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
    }

    .news-pagination-summary {
        white-space: normal;
        text-align: center;
    }
}

.news .pagination .pagination {
    margin: 0;
}

.news .pagination .page-link {
    color: #64748b;
    border-color: #e2e8f0;
    border-radius: 8px;
    margin: 0 4px;
    padding: 0.6rem 0.9rem;
    transition: all 0.2s ease;
}

.news .pagination .page-link:hover {
    border-color: #EA4E1A;
    color: #EA4E1A;
    transform: translateY(-1px);
}

.news .pagination .page-item.active .page-link {
    background: #EA4E1A;
    border-color: #EA4E1A;
    color: #fff;
}

.news .pagination .page-item.disabled .page-link {
    color: #94a3b8;
}

.news-card p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.news-link {
    color: #EA4E1A;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.news-link:hover {
    color: #EA4E1A;
    transform: translateX(5px);
}

.news-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-btn:hover {
    border-color: #EA4E1A;
    color: #EA4E1A;
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: #EA4E1A;
    color: white;
    border-color: #EA4E1A;
}

.team{
    background: #ffffff;
}

body.dark .team{
    background: #182333f2;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.team-member {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.member-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 4px solid #EA4E1A;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-member h4 {
    font-size: 1.3rem;
    font-weight: bold;
    color: #EA4E1A;
    margin-bottom: 0.5rem;
}

.member-role {
    font-weight: 600;
    color: #64748b;
    margin-bottom: 1rem;
}

.member-bio {
    color: #64748b;
    line-height: 1.6;
}

/* Gallery Section */
.gallery {
    background-color: #ffffff;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
}

body.dark-mode .gallery {
    background-image: none;
    background: #182333f2;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(219, 115, 25, 0.8), transparent);
    color: white;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h4 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.emergency-card {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 0.5rem;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.emergency-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.emergency-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: url('../img/fondito.png') no-repeat center center fixed;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

@media (max-width: 768px) {
    .contact-item{
        background: url('../img/fondito.png');
        background-attachment: scroll;
        background-position: center top;
    }
}

body.dark-mode .contact-item{
    background-image: none;
    background: #182333f2;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.contact-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #EA4E1A;
}

.contact-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    background: #212529;
    color:white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item h4 {
    font-weight: bold;
    color: #EA4E1A;
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: #64748b;
}

.contact-form {
    background: url('../img/fondito.png') no-repeat center center fixed;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

@media (max-width: 768px) {
    .contact-form{
        background: url('../img/fondito.png');
        background-attachment: scroll;
        background-position: center top;
    }
}

body.dark-mode .contact-form{
    background-image: none;
    background: #182333f2;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.contact-form h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #EA4E1A;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #EA4E1A;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: #EA4E1A;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer-emergency {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: bold;
}

.footer-emergency a {
    color: #fbbf24;
    text-decoration: none;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -10px); }
    60% { transform: translate(-50%, -5px); }
}

@keyframes heroZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

@keyframes heroFadeIn {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: #EA4E1A;
        flex-direction: column;
        padding: 2rem 0;
        transform: translateX(-100%);
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    body.dark-mode .section-title {
        color: white !important;
    }

    .services-grid,
    .team-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .news-card.featured {
        grid-column: span 1;
        display: block;
    }

    .news-card.featured .news-image {
        height: 200px;
    }

    .news-card.featured .news-content {
        padding: 1.5rem;
    }

    .news-card.featured h3 {
        font-size: 1.3rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        text-align: center;
    }

    .footer-emergency {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .service-card,
    .team-member,
    .news-card,
    .contact-form {
        padding: 1.5rem;
    }
}

/* Smooth scrolling improvements */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Loading animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Snow Effect Styles */
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    color: #fff;
    user-select: none;
    pointer-events: none;
    will-change: transform;
    animation: fall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

@keyframes fall {
    0% {
        transform: translateY(-10%) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(var(--drift, 0)) rotate(360deg);
        opacity: 0;
    }
}

.history {
    padding: 50px 20px;
    position: relative;
}
.history-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
    position: relative;
    z-index: 1;
}
.history-grid::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: #8096b4a0;
}

.history-year {
    position: relative;
    width: 50%;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}
.history-year.show {
    opacity: 1;
    transform: translateY(0);
}

.history-year.left {
    align-self: flex-start;
    text-align: right;
    padding-right: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.history-year.right {
    align-self: flex-end;
    text-align: left;
    padding-left: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.history-year h3 {
    position: absolute;
    top: 0;
    background: #EA4E1A;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 18px;
    white-space: nowrap;
}
.history-year.left h3 {
    right: -48px;
    transform: translateX(50%);
}
.history-year.right h3 {
    left: -48px;
    transform: translateX(-50%);
}

.history-year p {
    color: #64748b;
    transition: all 0.3s ease;
    background: url('../img/fondito.png') no-repeat center center;
    background-size: cover;
    background-attachment: scroll;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    max-width: 500px;
}

@media (max-width: 768px) {
    .history-year p {
        background: url('../img/fondito.png');
        background-attachment: scroll;
        background-position: center top;
    }
}

.history-year.expanded p {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
    display: block;
}

body.dark-mode .history-year p {
    color: var(--dm-muted);
    transition: all 0.3s ease;
    background-image: none;
    background: #182333f2;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: inline-block;
    max-width: 500px;
}

body.dark-mode .history-year p:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #EA4E1A;
}

.history-hidden {
    display: none;
}

 /* Estilos para contenido resumido y botones leer más */
 .history-content {
    position: relative;
    display: flex;
    flex-direction: column;
    background: url('../img/fondito.png') no-repeat center center;
    background-size: cover;
    background-attachment: scroll;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    max-width: 100%;
 }

 @media (max-width: 768px) {
    .history-content {
        background: url('../img/fondito.png');
        background-attachment: scroll;
        background-position: center top;
    }
}

 .history-content p {
    background: transparent;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
    max-width: 100%;
 }

 .history-year.left .btn-read-more {
    align-self: flex-end;
    margin-top: 0.75rem;
 }

 .history-year.right .btn-read-more {
    align-self: flex-start;
    margin-top: 0.75rem;
 }

.history-summary {
    color: #64748b;
    transition: all 0.3s ease;
    background: url('../img/fondito.png') no-repeat center center;
    background-size: cover;
    background-attachment: scroll;
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid transparent;
    margin-bottom: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

 @media (max-width: 768px) {
    .history-summary  {
        background: url('../img/fondito.png');
        background-attachment: scroll;
        background-position: center top;
    }
}

.history-full {
    color: #64748b;
    transition: all 0.3s ease;
    background: url('../img/fondito.png') no-repeat center center;
    background-size: cover;
    background-attachment: scroll;
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid transparent;
    margin-bottom: 0;
    line-height: 1.6;
}

 @media (max-width: 768px) {
    .history-full {
        background: url('../img/fondito.png');
        background-attachment: scroll;
        background-position: center top;
    }
}


.history-year.expanded .history-summary {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
    display: block;
}

.btn-read-more {
    background: linear-gradient(135deg, #EA4E1A, #ff6b6b);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(234, 78, 26, 0.3);
}

.btn-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(234, 78, 26, 0.4);
    background: linear-gradient(135deg, #ff6b6b, #EA4E1A);
}

.btn-read-more:active {
    transform: translateY(0);
}

.btn-read-more.expanded {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.btn-read-more.expanded:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Responsive para botones leer más */
@media (max-width: 768px) {
    .history-summary,
    .history-full {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .history-year.left .btn-read-more {
        position: relative;
        right: auto;
        left: auto;
        margin-top: 0.4rem;
        display: inline-flex;
    }

    .history-year.right .btn-read-more {
        position: relative;
        right: auto;
        left: auto;
        margin-top: 0.4rem;
        display: inline-flex;
    }

    .btn-read-more {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        margin-top: 0.4rem;
    }
}

@media (max-width: 480px) {
    .history-summary,
    .history-full {
        padding: 0.875rem;
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .history-year.left .btn-read-more,
    .history-year.right .btn-read-more {
        position: relative;
        right: auto;
        left: auto;
        margin-top: 0.375rem;
        display: inline-flex;
    }

    .btn-read-more {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        margin-top: 0.375rem;
        border-radius: 15px;
    }
}

.btn-history {
    background: #212529;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}
.btn-history:hover {
    background: #343a40;
}


.card-delegacion {
    transition: all 0.3s ease;
}

/* =================================
   Mountain Rescue Inspired Styles
   ================================= */

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #2c3e50;
}

h1 {
    font-size: 2.5rem;
    color: #1a365d;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    color: #2c5282;
    padding-bottom: 0.5rem;
    display: inline-block;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.75rem;
    color: #2b6cb0;
    margin-bottom: 1.25rem;
}

p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #4a5568;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 2px solid transparent;
    padding: 0.625rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background-color: #e53e3e;
    border-color: #e53e3e;
}

.btn-primary:hover {
    background-color: #c53030;
    border-color: #c53030;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    color: #2b6cb0;
    background-color: transparent;
    border: 2px solid #2b6cb0;
}

.btn-outline:hover {
    background-color: #2b6cb0;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.hero:not(#inicio) {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/hero-bg.jpg') no-repeat center center/cover;
    color: white;
    padding: 8rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero:not(#inicio) h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero:not(#inicio) p {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    color: #e2e8f0;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 2rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: #2d3748;
    margin-bottom: 1rem;
    font-weight: 700;
}

.card-text {
    color: #4a5568;
    margin-bottom: 1.5rem;
}

/* Utility Classes */
.text-red-600 {
    color: #e53e3e;
}

.bg-gray-100 {
    background-color: #f7fafc;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.text-center {
    text-align: center;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero:not(#inicio) h1 {
        font-size: 2.5rem;
    }

    .hero:not(#inicio) p {
        font-size: 1.25rem;
    }
}

.card-delegacion:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #EA4E1A;
}

.sponsor-item {
    transition: all 0.3s ease;
}

.sponsor-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: #EA4E1A;
}

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.dark-img {
    filter: brightness(50%);
}



/* =========================
   Footer (partials.footer)
   ========================= */
.site-footer {
    background: #0b0f1a; /* deep dark to differentiate from main bg */
    color: #e5e7eb;
    position: relative;
}

body.dark-mode .site-footer {
    background: #182333f2 !important;
}

.site-footer .footer-title {
    color: #EA4E1A;
    font-weight: 700;
    letter-spacing: .5px;
    margin-bottom: .75rem;
}
.site-footer .footer-text { color: #cbd5e1; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #ffffff; }

.footer-links li { margin-bottom: .35rem; }
.footer-links a {
    position: relative;
    padding-left: 0;
}
.footer-links a::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: #EA4E1A;
    transition: width .25s ease;
}
.footer-links a:hover::before { width: 100%; }

.footer-contact a { color: #e5e7eb; }
.footer-contact a:hover { color: #ffffff; }

.footer-social a { font-size: 1.1rem; transition: transform .2s ease, color .2s ease; }
.footer-social a:hover { transform: translateY(-2px); color: #fff; }
.hover-white:hover { color: #fff !important; }

.footer-divider { border-color: rgba(148, 163, 184, 0.25) !important; }

.footer-legal a { color: #cbd5e1; }
.footer-legal a:hover { color: #ffffff; }

@media (max-width: 767.98px) {
    .site-footer .footer-brand { justify-content: flex-start; }
    .footer-legal { gap: .75rem; }
}










.team-style07 img {
    max-width: 100%;
    height: auto;
    vertical-align: top;
}
.team-style07 .mb-1 {
    margin-bottom: 0.25rem!important;
}
.team-style07 .h5, h5 {
    font-size: 1.25rem;
}
.team-style07 a {
    color: red !important;
    text-decoration:none;
}

.team-style07 {
    background: #fff;
    text-align: center;
    padding: 30px;
    box-shadow: 0px 10px 30px 0px rgb(26 29 72 / 7%);
    border-radius: 15px;
    transition: all .3s ease-in-out;
}
.team-style07 {
    background: #fff;
    text-align: center;
    padding: 30px;
    box-shadow: 0px 10px 30px 0px rgba(26, 29, 72, 0.07);
    border-radius: 15px;
    transition: all .3s ease-in-out
}

.team-style07:hover {
    background: #ef6c00;
}

.team-style07:hover h3 a,
.team-style07:hover p {
    color: #fff !important;
}

.team-style07 .team-thumb {
    position: relative
}

.team-style07 .team-thumb .team-social {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0
}

.team-style07:hover .team-thumb .team-social .styled-icons li a{
    color: #fff !important;
}

.team-style07:hover .team-thumb .team-social .styled-icons li:nth-child(1) {
    left: 40px;
    position: absolute;
    bottom: 0;
    z-index: 10;
    opacity: 1;
    transition: all .4s ease-in-out 0s;
}

.team-style07 .team-thumb .team-social .styled-icons li:nth-child(1) {
    position: absolute;
    opacity: 0;
    left: -10px;
    bottom: -20px;
    z-index: 10;
    transition: all .3s ease-in-out
}

.team-style07 .team-thumb .team-social .styled-icons li:nth-child(2) {
    position: absolute;
    opacity: 0;
    left: 0;
    right: 0;
    bottom: -40px;
    transition: all .3s ease-in-out
}

.team-style07 .team-thumb .team-social .styled-icons li:nth-child(3) {
    opacity: 0;
    position: absolute;
    right: 0;
    bottom: -20px;
    transition: all .3s ease-in-out
}

.team-style07:hover .team-thumb .team-social .styled-icons li:nth-child(3) {
    position: absolute;
    right: 40px;
    bottom: 0;
    opacity: 1;
    transition: all .4s ease-in-out 0s
}

.team-style07:hover .team-thumb .team-social .styled-icons li:nth-child(2) {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -20px;
    opacity: 1;
    transition: all .5s ease-in-out 0s
}

.team-style07 .team-thumb .team-social .styled-icons li a {
    background: #1C9CD8;
    color: #fff;
    height: 40px;
    width: 40px;
    line-height: 40px;
    border: none;
    font-size: 16px;
    transition: all .3s ease-in-out
}
.mb-1-9, .my-1-9 {
    margin-bottom: 1.9rem;
}

.styled-icons a {
    border: 2px solid transparent;
    color: #333;
    display: inline-block;
    font-size: 16px;
    height: 36px;
    line-height: 2;
    margin-right: 4px;
    position: relative;
    text-align: center;
    text-decoration: none;
    width: 36px;
    transition: all .2s ease;
    border-radius: 50%
}

.styled-icons li {
    display: inline-block;
    margin-bottom: 5px;
    margin-top: 0;
    padding-left: 0 !important
}










