/* Components CSS */
/* Will contain specific component styles like cards, navbar, footer */

.navbar {
    padding: 0.5rem 0;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--text-color);
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.logo img {
    height: 60px !important;
}

/* Dropdown Menu Styles */
.nav-item {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    margin-top: 0.5rem;
}

.nav-item.dropdown-active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: var(--light-gray);
    color: var(--primary-color);
    padding-left: 2rem;
}

.dropdown-toggle i {
    font-size: 0.7rem;
    margin-left: 0.3rem;
    transition: transform 0.3s ease;
}

.nav-item.dropdown-active .dropdown-toggle i {
    transform: rotate(180deg);
}


.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    /* Full viewport height for full-size images */
    overflow: hidden;
    background-color: #FFFFFF;
    /* White background for photos */
    margin-top: -60px;
    /* Compensate for body padding-top */
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Fills entire viewport without grey patches */
    object-position: center;
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Dark overlay for text readability */
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 var(--spacing-sm);
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-sm);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Slider Navigation */
.slider-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.slider-dot.active {
    background: var(--primary-color);
}

/* Hero Header (for non-slider pages) */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 6rem 0 4rem;
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero .text-primary {
    color: #3183CF;
    /* Blue shade from logo instead of orange */
}

.hero p {
    color: var(--white);
    font-size: 1.1rem;
    opacity: 0.95;
}



/* Section Title Update */
.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.mission-preview {
    background-color: var(--light-gray);
}

/* Card Styles */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
    text-align: center;
}

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

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto var(--spacing-sm);
}

.card h3 {
    color: var(--text-color);
    margin-bottom: var(--spacing-xs);
}

.card p {
    color: #666;
    font-size: 0.95rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--radius-md);
    overflow-y: auto;
    position: relative;
    padding: 2rem;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.modal-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-gallery img:hover {
    transform: scale(1.05);
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0;
    width: 100%;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--white);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

.gallery-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Footer Styles */
.footer {
    background: #1a1a1a;
    /* Deeper dark background */
    color: var(--white);
    padding: var(--spacing-xl) 0 0;
    margin-top: auto;
    font-family: var(--font-body);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

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

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

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
    display: block;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-section p i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

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

.social-links a {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

.footer-bottom {
    background-color: #111111;
    padding: 1.5rem 0;
    margin-top: var(--spacing-lg);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin: 0;
}

@media (max-width: 768px) {
    .hero-slider {
        height: 100vh;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

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

    .social-links {
        justify-content: center;
    }
}

/* Fix for active button text color */
.nav-links .btn-primary.active {
    color: var(--white) !important;
}

/* Blinking Animation */
@keyframes blink {
    0% {
        transform: scale(1);
        background-color: var(--primary-color);
        box-shadow: 0 0 0 0 rgba(255, 159, 28, 0.7);
        opacity: 1;
    }

    50% {
        transform: scale(1.08);
        background-color: #3183CF;
        box-shadow: 0 0 0 15px rgba(49, 131, 207, 0);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        background-color: var(--primary-color);
        box-shadow: 0 0 0 0 rgba(255, 159, 28, 0);
        opacity: 1;
    }
}

.btn-blink {
    animation: blink 2s infinite;
}

/* SDG List Styles */
.sdg-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    padding: 0;
    margin: 1.5rem 0;
    list-style: none;
}

.sdg-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sdg-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0.75rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #f0f0f0;
    height: 100%;
    min-height: 140px;
    cursor: pointer;
}

.sdg-link:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(255, 159, 28, 0.2);
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #ffffff 0%, #fff5eb 100%);
}

.sdg-icon {
    width: 55px;
    height: 55px;
    object-fit: contain;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.sdg-link:hover .sdg-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 4px 8px rgba(255, 159, 28, 0.3));
}

.sdg-link span {
    font-size: 0.8rem;
    line-height: 1.3;
    font-weight: 500;
}

.sdg-link strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Responsive design for SDG list */
@media (max-width: 1024px) {
    .sdg-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .sdg-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .sdg-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 0.5rem;
    }

    .sdg-link {
        padding: 0.75rem 0.5rem;
        min-height: 120px;
    }

    .sdg-link span {
        font-size: 0.75rem;
    }

    .sdg-link strong {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .sdg-list {
        grid-template-columns: 1fr;
    }

    .sdg-link {
        flex-direction: row;
        text-align: left;
        min-height: auto;
        padding: 1rem;
        gap: 1rem;
    }

    .sdg-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 0;
    }
}