:root {
    --primary-color: rgb(234, 0, 31);
    --secondary-color: rgb(0, 98, 177);
    --tertiary-color: rgb(0, 40, 72);
    --white: #ffffff;
    --text-color: #333;
    --bg-color: #f0f2f5;
    --header-height: 80px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-top: var(--header-height);
    /* Space for fixed header */
}

/* Header Styles */
.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
}

.logo-container a {
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--tertiary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Navigation */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--tertiary-color);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    padding: 10px 15px;
    display: block;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Dropdown */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    list-style: none;
    min-width: 200px;
    border-radius: 4px;
    padding: 10px 0;
    z-index: 1001;
}

.nav-item:hover .dropdown-menu {
    display: block;
}

.dropdown-item a {
    text-decoration: none;
    color: var(--tertiary-color);
    display: block;
    padding: 10px 20px;
    transition: background-color 0.3s;
}

.dropdown-item a:hover {
    background-color: #f8f9fa;
    color: var(--secondary-color);
}

/* buttons */
.btn-donate {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-donate:hover {
    background-color: #c2001a;
    transform: translateY(-2px);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--tertiary-color);
}

/* Content Container for Index */
.container {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 800px;
    margin: 2rem auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        background-color: var(--white);
        width: 100%;
        /* Or 300px sidebar style */
        height: calc(100vh - var(--header-height));
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        transition: right 0.3s ease-in-out;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-item {
        width: 100%;
        text-align: center;
    }

    .nav-item:hover .dropdown-menu {
        display: none;
        /* Disable hover on mobile */
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background-color: #f9f9f9;
        display: none;
        /* Controlled by JS */
        width: 100%;
    }

    .dropdown-menu.active {
        display: block;
    }

    .nav-link {
        padding: 15px;
        font-size: 1.2rem;
    }
}

/* Footer Details */
.main-footer {
    background-color: var(--tertiary-color);
    color: var(--white);
    padding: 3rem 0;
    margin-top: 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-info {
    text-align: left;
}

.footer-info h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.footer-socials {
    text-align: center;
}

.footer-socials h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-icons a {
    color: var(--white);
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
    width: 24px;
    height: 24px;
}

.social-icons a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-logo {
    text-align: right;
}

.footer-logo a {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-info,
    .footer-logo {
        text-align: center;
    }
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
    fill: white;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Index Page Sections */

/* Hero Banner */
.hero-banner {
    height: 80vh;
    /* Occupy most of the screen */
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('/NelsonCarmona/img/Portada.jpeg');
    /* Placeholder */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    text-align: center;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* CTA Banners */
.cta-banner {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--white);
}

.primary-cta {
    background-color: var(--primary-color);
}

.secondary-cta {
    background-color: var(--secondary-color);
}

.cta-banner h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.btn-custom {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-white-outline {
    border: 2px solid var(--white);
    color: var(--white);
    background: transparent;
}

.btn-white-outline:hover {
    background-color: var(--white);
}

.primary-cta .btn-white-outline:hover {
    color: var(--primary-color);
}

.secondary-cta .btn-white-outline:hover {
    color: var(--secondary-color);
}

/* Image Grid */
.image-grid-section {
    padding: 4rem 2rem;
    background-color: var(--white);
}

.container-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.grid-item {
    text-align: center;
}

.grid-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    transition: transform 0.3s;
}

.grid-item img:hover {
    transform: scale(1.02);
}

.grid-item h3 {
    color: var(--tertiary-color);
    margin-top: 1rem;
}

/* Responsive adjustments for Index */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .cta-banner {
        padding: 3rem 1rem;
    }

    .cta-banner h2 {
        font-size: 1.5rem;
    }

    .container-grid {
        grid-template-columns: 1fr;
    }
}

/* Blog Page Styles */
.blog-header {
    background-color: var(--tertiary-color);
    color: var(--white);
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
}

.news-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.news-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.news-category {
    color: var(--secondary-color);
    font-weight: bold;
    text-transform: uppercase;
}

.news-content h2 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.news-content h2 a {
    text-decoration: none;
    color: var(--tertiary-color);
    transition: color 0.2s;
}

.news-content h2 a:hover {
    color: var(--primary-color);
}

.news-excerpt {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.95rem;
    align-self: flex-start;
    transition: padding-left 0.2s;
}

.read-more:hover {
    padding-left: 5px;
}

/* Specific Grid for Home Page Latest News (Exactly 3 columns) */
.latest-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 900px) {
    .latest-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .latest-news-grid {
        grid-template-columns: 1fr;
    }
}

/* Loader Animation */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loader-wrapper.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid var(--primary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Bio / Who Am I Page Styles */
.bio-section {
    padding: 4rem 2rem;
    background-color: var(--white);
}

.bio-container.single-column {
    max-width: 800px;
    /* Reduced width for better reading experience */
    margin: 0 auto;
}

.bio-block {
    margin-bottom: 5rem;
    text-align: left;
}

.bio-block:last-child {
    margin-bottom: 0;
}

.bio-block h2 {
    font-size: 2.5rem;
    color: var(--tertiary-color);
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bio-block h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin-top: 1rem;
}

.bio-image-full {
    margin-bottom: 2rem;
    text-align: center;
}

.bio-image-full img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.bio-block p {
    font-size: 1.2rem;
    color: #444;
    margin-bottom: 1.5rem;
    line-height: 1.9;
    text-align: justify;
    /* Optional: for a cleaner block text look */
}

@media (max-width: 768px) {
    .bio-block h2 {
        font-size: 2rem;
    }

    .bio-block p {
        font-size: 1.1rem;
        text-align: left;
    }
}

/* Horizontal Timeline Styles */
.timeline-horizontal-container {
    overflow-x: auto;
    padding: 2rem 0 4rem 0;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar for cleaner look */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #eee;
}

.timeline-track {
    display: flex;
    justify-content: space-between;
    min-width: 900px;
    /* Ensure valid width on mobile */
    position: relative;
    padding: 20px 0;
}

/* The horizontal line */
.timeline-track::before {
    content: '';
    position: absolute;
    top: 50px;
    /* Aligned with dots */
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--primary-color);
    z-index: 0;
    border-radius: 2px;
}

.timeline-node {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-date {
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    background-color: var(--white);
    border: 4px solid var(--tertiary-color);
    border-radius: 50%;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.timeline-node:hover .timeline-dot {
    transform: scale(1.3);
    background-color: var(--primary-color);
    border-color: var(--white);
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-card {
    background-color: var(--white);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    transition: transform 0.3s ease;
    border-top: 3px solid var(--secondary-color);
}

.timeline-node:hover .timeline-card {
    transform: translateY(-5px);
}

.timeline-card h3 {
    font-size: 1rem;
    color: var(--tertiary-color);
    margin-bottom: 0.2rem;
}

.timeline-card p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

@media (max-width: 768px) {
    .bio-grid {
        grid-template-columns: 1fr !important;
    }
}