/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-padding-top: 120px;
}

:root {
    --primary-color: #385f7e;
    --secondary-color: #2d4a61;
    --accent-color: #4a7ca5;
    --text-color: #385f7e;
    --text-light: #6b8ba3;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --bg-cream: #faf9f6;
    --border-color: #E1E8ED;
    --shadow: 0 2px 10px rgba(56, 95, 126, 0.1);
    --shadow-hover: 0 4px 20px rgba(56, 95, 126, 0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-cream);
}

p {
    color: #000000;
}

/* Tipografía para títulos */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Header */
.header {
    background-color: var(--bg-cream);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 5px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.logo-img {
    height: 50px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.search-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
    transition: var(--transition);
    align-items: center;
    justify-content: center;
}

.search-toggle:hover {
    color: var(--accent-color);
}

.search-mobile {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.search-mobile.active {
    max-height: 200px;
    padding: 1rem 0;
}

.search-mobile-box {
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    width: calc(100% - 40px);
    margin: 0 20px;
    border: 1px solid var(--border-color);
    gap: 0.5rem;
}

.search-mobile-input {
    border: none;
    background: transparent;
    flex: 1;
    padding: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-color);
    outline: none;
}

.search-mobile-input::placeholder {
    color: var(--text-light);
}

.search-mobile-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
    padding: 0.25rem;
    transition: var(--transition);
}

.search-mobile-btn:hover {
    color: var(--accent-color);
}

.search-box:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-input {
    border: none;
    background: transparent;
    flex: 1;
    padding: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-color);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
    padding: 0.25rem;
    transition: var(--transition);
}

.search-btn:hover {
    color: var(--accent-color);
}

/* Resultados de búsqueda (solo sitio REDMIIA) */
.site-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
}

.site-search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(45, 74, 97, 0.45);
    cursor: pointer;
}

.site-search-dialog {
    position: relative;
    margin-top: 5vh;
    width: 100%;
    max-width: 560px;
    max-height: min(80vh, 640px);
    overflow: auto;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(56, 95, 126, 0.25);
    padding: 1.25rem 1.5rem 1.5rem;
    border: 1px solid var(--border-color);
}

.site-search-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.site-search-dialog-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.site-search-close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    background: var(--bg-light);
    color: var(--text-color);
    font-size: 1.5rem;
    line-height: 1;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.site-search-close:hover {
    background: var(--border-color);
    color: var(--secondary-color);
}

.site-search-query {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0 0 1rem;
}

.site-search-query strong {
    color: var(--text-color);
}

.site-search-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-search-item {
    border-bottom: 1px solid var(--border-color);
}

.site-search-item:last-child {
    border-bottom: none;
}

.site-search-link {
    display: block;
    padding: 0.85rem 0;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.site-search-link:hover {
    background: var(--bg-cream);
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: 8px;
}

.site-search-item-title {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--accent-color);
    margin-bottom: 0.35rem;
}

.site-search-item-snippet {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.45;
}

.site-search-empty {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.5;
}

.main-nav {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    transition: var(--transition);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-list a {
    text-decoration: none;
    color: #000000;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    padding-bottom: 0.5rem;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-list a:hover {
    color: #000000;
    opacity: 0.8;
}

.nav-list a:hover::after {
    width: 100%;
}

/* Banner */
.banner {
    position: relative;
    height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-margin-top: 80px;
}

.banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.banner-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 900px;
}

.banner-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    font-family: 'Poppins', sans-serif;
    color: #FFFFFF;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.02em;
}

.banner-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    color: #FFFFFF;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25), 0 1px 4px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.01em;
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    display: inline-block;
    padding: 0.875rem 2rem;
    background-color: transparent;
    color: var(--accent-color);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

/* Introducción bajo el banner (inicio) */
.intro-lead {
    padding: clamp(4rem, 10vw, 5.5rem) 0;
    background-color: var(--bg-cream);
}

.intro-lead-inner {
    max-width: 48rem;
    margin: 0 auto;
    padding-left: 1.75rem;
    border-left: 3px solid #c9886a;
    text-align: left;
}

.intro-lead-eyebrow {
    margin: 0 0 1rem;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #6b7d8c;
    line-height: 1.4;
}

.intro-lead-heading {
    margin: 0 0 1.75rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    line-height: 1.25;
    letter-spacing: 0.01em;
    color: var(--primary-color);
}

.intro-lead-body {
    margin: 0 0 1.1rem;
    font-family: 'Open Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.65;
    color: #3d4f5c;
}

.intro-lead-body:last-of-type {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .intro-lead {
        padding: 3.5rem 0;
    }

    .intro-lead-inner {
        padding-left: 1.1rem;
        border-left-width: 2px;
    }

    .intro-lead-eyebrow {
        font-size: 0.65rem;
        letter-spacing: 0.16em;
    }
}

/* Mission & Vision */
.mission-vision {
    padding: 5rem 0;
    background-color: var(--bg-cream);
}

.mission-vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.mission-card,
.vision-card {
    background-color: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.mission-card:hover,
.vision-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.icon-wrapper {
    width: 64px;
    height: 64px;
    background-color: var(--bg-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.mission-card h2,
.vision-card h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
}

.mission-card p,
.vision-card p {
    color: #000000;
    line-height: 1.8;
}

/* About Section */
.about {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    scroll-margin-top: 100px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Poppins', sans-serif;
}

.title-underline {
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 0 auto;
    border-radius: 2px;
}

.section-tagline {
    margin-top: 1.25rem;
    margin-bottom: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-color);
    font-family: 'Poppins', sans-serif;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    color: #000000;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Enlaces de acción: Conocer/Conoce más, Más información, Leer más, recursos, etc. */
.link-conoce-mas {
    color: #6f9bc4;
    text-decoration: none;
    transition: color 0.2s ease-in-out, border-bottom 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 400;
    font-size: 1.05rem;
    border-bottom: 2px solid transparent;
}

.link-conoce-mas:hover {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

.about-more-arrow {
    flex-shrink: 0;
}

.banner .link-conoce-mas {
    margin-top: 0.5rem;
    font-size: 1.05rem;
    color: #ffffff;
    border-bottom: 2px solid transparent;
}

.banner .link-conoce-mas:hover {
    color: #ffffff;
    border-bottom: 2px solid #ffffff;
}

/* Página interior (ej. sobre-REDMIIA.html) */
.page-intro {
    padding: 3rem 0 2rem;
}

.page-intro-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
    margin: 0 0 1rem;
    line-height: 1.25;
}

.page-intro .title-underline {
    margin: 0 0 2rem;
}

.page-content {
    padding: 0 0 4rem;
}

.page-content h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
}

.page-content h2:first-of-type {
    margin-top: 0;
}

.page-content p {
    color: #000000;
    line-height: 1.8;
    font-size: 1.05rem;
    margin: 0;
}

.page-content p + p {
    margin-top: 1.25rem;
}

.page-content ol.page-values-list {
    margin: 0;
    padding-left: 1.75rem;
    color: #000000;
    line-height: 1.8;
    font-size: 1.05rem;
}

.page-content ol.page-values-list li {
    margin-bottom: 1rem;
}

.page-content ol.page-values-list li:last-child {
    margin-bottom: 0;
}

/* Documento formal (propuesta, memorándums) */
.page-intro--proposal {
    text-align: left;
}

.page-intro-container--proposal {
    max-width: 58rem;
    margin-left: auto;
    margin-right: auto;
}

.page-intro-title--document {
    font-size: clamp(1.35rem, 3.5vw, 2rem);
    max-width: none;
    margin-left: 0;
    margin-right: auto;
    text-align: left;
}

.page-intro--proposal .title-underline--proposal {
    margin-left: 0;
    margin-right: auto;
    width: 5.5rem;
    height: 4px;
}

.proposal-document .proposal-document-container {
    max-width: 58rem;
}

.proposal-document > .proposal-document-container {
    background-color: var(--bg-white);
    padding: 2.5rem 2rem 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.proposal-document .proposal-h2 {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 3.15rem;
    margin-bottom: 0.85rem;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
    scroll-margin-top: 120px;
}

.proposal-document .proposal-h2:first-of-type {
    margin-top: 3.25rem;
}

.proposal-section--2 .proposal-h2 {
    margin-top: 0;
}

.proposal-section--2 {
    margin-top: 3.15rem;
}

.proposal-section--2 > p:first-of-type {
    margin-bottom: 1.75rem;
}

.proposal-section--2 .proposal-list {
    margin-top: 1.75rem;
    margin-bottom: 1.75rem;
}

.proposal-section--2 .proposal-list li {
    margin-bottom: 1.35rem;
}

.proposal-section--2 .proposal-list li:last-child {
    margin-bottom: 0;
}

.proposal-section--2 .proposal-list + p {
    margin-top: 2rem;
}

.proposal-url-link {
    font-weight: 700 !important;
    font-size: 1.08rem !important;
}

.proposal-toc {
    margin: 2rem 0 2rem;
    padding: 1.35rem 1.5rem 1.5rem;
    background-color: var(--bg-light);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
}

.proposal-toc-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 1rem;
    padding: 0;
}

.proposal-toc-list {
    margin: 0;
    padding-left: 1.35rem;
    color: #2c3a44;
    font-size: 1.02rem;
    line-height: 1.75;
}

.proposal-toc-list li {
    margin-bottom: 0.4rem;
}

.proposal-toc-list li:last-child {
    margin-bottom: 0;
}

.proposal-toc-list a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.proposal-toc-list a:hover {
    color: #3a6a8f;
    text-decoration: underline;
}

.proposal-salutation {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.25rem !important;
}

.proposal-document p {
    color: #2c3a44;
}

.proposal-link-block {
    margin: 1rem 0 1.5rem !important;
}

.proposal-list {
    margin: 1rem 0 0;
    padding-left: 1.35rem;
    color: #2c3a44;
    line-height: 1.75;
    font-size: 1.05rem;
}

.proposal-list li {
    margin-bottom: 0.75rem;
}

.proposal-list li:last-child {
    margin-bottom: 0;
}

.proposal-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2.5rem 0;
}

.proposal-table-title {
    font-size: 1.35rem !important;
    margin-top: 0 !important;
    margin-bottom: 1.25rem !important;
    scroll-margin-top: 120px;
}

.proposal-table-wrap {
    overflow-x: auto;
    margin: 0 0 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.proposal-table {
    width: 100%;
    min-width: 36rem;
    border-collapse: collapse;
    font-size: 0.95rem;
    line-height: 1.45;
}

.proposal-table th,
.proposal-table td {
    border: 1px solid var(--border-color);
    padding: 0.75rem 0.85rem;
    text-align: left;
    vertical-align: top;
}

.proposal-table thead th {
    background-color: var(--bg-light);
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
}

.proposal-table tbody tr {
    transition: background-color 0.2s ease;
}

.proposal-table tbody tr:nth-child(odd) td {
    background-color: #fafbfc;
}

.proposal-table tbody tr:nth-child(even) td {
    background-color: #eef2f6;
}

.proposal-table tbody tr:hover:nth-child(odd) td {
    background-color: rgba(74, 124, 165, 0.16);
}

.proposal-table tbody tr:hover:nth-child(even) td {
    background-color: rgba(74, 124, 165, 0.24);
}

.proposal-footnote {
    font-size: 0.9rem !important;
    color: var(--text-light) !important;
    margin-top: 0 !important;
    font-style: italic;
}

.proposal-closing {
    margin-top: 1.5rem !important;
    margin-bottom: 0.5rem !important;
}

.proposal-signature {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin: 0 !important;
}

@media (max-width: 640px) {
    .proposal-document > .proposal-document-container {
        padding: 1.75rem 1.15rem 2.25rem;
        border-radius: 8px;
    }

    .proposal-table {
        font-size: 0.85rem;
    }

    .proposal-table th,
    .proposal-table td {
        padding: 0.55rem 0.5rem;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 8px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.95rem;
}

.about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* Members Section */
.members {
    padding: 5rem 0;
    background-color: var(--bg-cream);
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.member-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.member-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--bg-light);
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
}

.member-role {
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.member-institution {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Events Section */
.events {
    padding: 5rem 0;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.event-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.event-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.event-card:hover .event-image img {
    transform: scale(1.05);
}

.event-date {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--bg-white);
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
}

.date-day {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.date-month {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
}

.event-content {
    padding: 1.5rem;
}

.event-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
}

.event-location {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-description {
    color: #000000;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Publications Section */
.publications {
    padding: 5rem 0;
    background-color: var(--bg-cream);
}

.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.publication-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.publication-image {
    height: 180px;
    overflow: hidden;
}

.publication-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.publication-card:hover .publication-image img {
    transform: scale(1.05);
}

.publication-content {
    padding: 1.5rem;
}

.publication-category {
    display: inline-block;
    background-color: var(--bg-light);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.publication-content h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    line-height: 1.4;
    font-family: 'Poppins', sans-serif;
}

.publication-authors {
    color: #000000;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.publication-journal {
    color: #000000;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* Resources Section */
.resources {
    padding: 5rem 0;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.resource-card {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.resource-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.resource-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
}

.resource-card p {
    color: #000000;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* News Section */
.news {
    padding: 5rem 0;
    background-color: var(--bg-cream);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.news-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.news-card.featured {
    grid-column: span 2;
}

@media (min-width: 769px) and (max-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-card.featured {
        grid-column: span 2;
    }
}

.news-image {
    height: 200px;
    overflow: hidden;
}

.news-card.featured .news-image {
    height: 300px;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 1.5rem;
}

.news-date {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    display: block;
}

.news-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    line-height: 1.4;
    font-family: 'Poppins', sans-serif;
}

.news-card.featured .news-content h3 {
    font-size: 1.5rem;
}

.news-content p {
    color: #000000;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
}

.contact-content {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    flex: 1;
    min-width: 250px;
    max-width: 350px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background-color: var(--bg-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
}

.contact-item p {
    color: #000000;
    line-height: 1.6;
}


/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0 0;
    overflow-x: hidden;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    height: 40px;
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-top: 1rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    text-align: center;
    color: #FFFFFF;
    font-size: 0.9rem;
    background-color: #3e4a54;
    margin-top: 2rem;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    box-sizing: border-box;
}

.copyright-text {
    color: #FFFFFF !important;
    font-family: 'Open Sans', sans-serif;
    margin: 0;
}

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

/* Botón scroll to top */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
}

.scroll-to-top.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }
}

/* Tableta y móvil - Menú hamburguesa */
@media (max-width: 1024px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding-top: 0;
        padding-bottom: 0;
    }

    .main-nav.active {
        max-height: min(85vh, 720px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 0 20px;
    }

    .nav-list li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-list li:last-child {
        border-bottom: none;
    }

    .nav-list a {
        display: block;
        padding: 1rem 0;
        width: 100%;
    }

    .nav-list a::after {
        display: none;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0;
    }

    .logo {
        order: 0;
        margin: 0;
    }

    .search-box {
        display: none;
    }

    .search-toggle {
        display: flex;
        order: 2;
        margin-left: auto;
    }

    .menu-toggle {
        order: 3;
        margin-left: 0.5rem;
    }

    .search-mobile {
        display: block;
    }

    .mission-vision-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 968px) {
    .banner-title {
        font-size: 2.25rem;
    }

    .banner-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2.25rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }


    .news-card.featured {
        grid-column: span 1;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0;
    }

    .logo {
        order: 0;
        margin: 0;
    }

    .search-box {
        display: none;
    }

    .search-toggle {
        display: flex;
        order: 2;
        margin-left: auto;
    }

    .menu-toggle {
        order: 3;
        margin-left: 0.5rem;
    }

    .search-mobile {
        display: block;
    }

    .mission-vision {
        padding: 3rem 0;
    }

    .about,
    .members,
    .events,
    .publications,
    .resources,
    .news,
    .contact {
        padding: 3rem 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .banner {
        height: 400px;
    }

    .banner-title {
        font-size: 1.75rem;
    }

    .banner-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0;
    }

    .logo {
        order: 0;
        margin: 0;
    }

    .search-box {
        display: none;
    }

    .search-toggle {
        display: flex;
        order: 2;
        margin-left: auto;
    }

    .menu-toggle {
        order: 3;
        margin-left: 0.5rem;
    }

    .search-mobile {
        display: block;
    }

    .mission-vision-grid,
    .members-grid,
    .events-grid,
    .publications-grid,
    .resources-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .mission-card,
    .vision-card {
        padding: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-item {
        padding: 1rem;
    }

    .event-content,
    .publication-content,
    .news-content {
        padding: 1rem;
    }


    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .banner {
        height: 350px;
    }

    .banner-title {
        font-size: 1.5rem;
    }

    .banner-subtitle {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-list li {
        width: 100%;
        text-align: left;
    }

    .mission-vision,
    .about,
    .members,
    .events,
    .publications,
    .resources,
    .news,
    .contact {
        padding: 2rem 0;
    }

    .mission-card,
    .vision-card {
        padding: 1.5rem;
    }

    .member-card {
        padding: 1.5rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .contact-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        min-width: 100%;
        max-width: 100%;
        align-items: center;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }

    .contact-icon {
        margin: 0 auto;
    }

    .search-box {
        display: none;
    }

    .search-toggle {
        display: flex;
        order: 1;
    }

    .search-mobile {
        display: block;
    }
}

