/* ========================================
   Gallery, Contact & Footer CSS
   ======================================== */

/* ========== GALLERY SECTION ========== */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item:nth-child(1),
.gallery-item:nth-child(6) {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    min-height: 250px;
    object-fit: cover;
    transition: var(--transition-slow);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 22, 40, 0.9) 100%);
    opacity: 0;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
}

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

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.gallery-overlay span {
    color: var(--gold-500);
    font-size: 0.85rem;
}

.gallery-zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 60px;
    height: 60px;
    background: var(--gold-500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-900);
    font-size: 1.5rem;
    transition: var(--transition-normal);
}

.gallery-item:hover .gallery-zoom {
    transform: translate(-50%, -50%) scale(1);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.98);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--navy-900);
    cursor: pointer;
    transition: var(--transition-normal);
}

.lightbox-close:hover {
    background: var(--gold-500);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-normal);
}

.lightbox-nav:hover {
    background: var(--gold-500);
    color: var(--navy-900);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

/* ========== CONTACT SECTION ========== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.contact-info {
    padding-right: 40px;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.contact-info>p {
    color: var(--gray-600);
    margin-bottom: 40px;
    line-height: 1.8;
}

.contact-details {
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gold-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--navy-900);
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--navy-800);
}

.contact-item p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

.contact-social {
    display: flex;
    gap: 15px;
}

.contact-social a {
    width: 50px;
    height: 50px;
    background: var(--navy-800);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    transition: var(--transition-normal);
}

.contact-social a:hover {
    background: var(--gold-500);
    color: var(--navy-900);
    transform: translateY(-3px);
}

.contact-form-wrapper {
    background: var(--white);
    padding: 50px;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
}

.contact-form h3 {
    margin-bottom: 30px;
}

.contact-map {
    margin-top: 60px;
    border-radius: 16px;
    overflow: hidden;
    height: 400px;
    box-shadow: var(--shadow-lg);
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--navy-900);
    color: var(--white);
    padding-top: 100px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    max-width: 350px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.footer-logo-icon {
    width: 60px;
    height: 60px;
    background: var(--gold-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy-900);
}

.footer-logo-text {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
}

.footer-brand p {
    color: var(--gray-400);
    line-height: 1.8;
    margin-bottom: 25px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition-normal);
}

.footer-social a:hover {
    background: var(--gold-500);
    color: var(--navy-900);
}

.footer-column h4 {
    font-size: 1.1rem;
    color: var(--white);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gold-500);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--gray-400);
    font-size: 0.95rem;
    transition: var(--transition-normal);
}

.footer-links a:hover {
    color: var(--gold-500);
    padding-left: 5px;
}

.footer-newsletter p {
    color: var(--gray-400);
    margin-bottom: 20px;
    line-height: 1.7;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: var(--white);
    font-size: 0.95rem;
}

.newsletter-form input::placeholder {
    color: var(--gray-500);
}

.newsletter-form button {
    padding: 15px 25px;
    background: var(--gold-500);
    color: var(--navy-900);
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition-normal);
}

.newsletter-form button:hover {
    background: var(--gold-400);
}

.footer-bottom {
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 30px;
}

.footer-legal a {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.footer-legal a:hover {
    color: var(--gold-500);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

    .gallery-masonry {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 992px) {
    :root {
        --section-padding: 80px;
    }

    .navbar {
        padding: 12px 0;
    }

    .navbar.scrolled {
        padding: 10px 0;
    }

    .navbar-logo {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .navbar-brand-title {
        font-size: 1rem;
    }

    .navbar-brand-subtitle {
        font-size: 0.6rem;
        letter-spacing: 1px;
    }

    .navbar-menu {
        display: none;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-cta {
        display: none;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .about-content {
        padding-left: 0;
    }

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

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

    .contact-info {
        padding-right: 0;
    }
}

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

    .navbar {
        padding: 10px 0;
    }

    .navbar.scrolled {
        padding: 8px 0;
    }

    .navbar-inner {
        padding: 0 8px;
    }

    .navbar-logo {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .navbar-brand {
        gap: 10px;
    }

    .navbar-brand-title {
        font-size: 0.95rem;
    }

    .navbar-brand-subtitle {
        font-size: 0.55rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

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

    .stat-item::after {
        display: none;
    }

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

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

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

    .gallery-masonry {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item:nth-child(1),
    .gallery-item:nth-child(6) {
        grid-column: span 1;
        grid-row: span 1;
    }

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

    .donation-amounts {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .timeline-line {
        left: 20px;
    }

    .timeline-item,
    .timeline-item:nth-child(odd) {
        flex-direction: column;
    }

    .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        width: 100%;
        text-align: left;
        padding-left: 50px;
        padding-right: 0;
    }

    .timeline-dot {
        left: 20px;
    }
}

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

    .navbar-brand-text {
        display: none;
    }

    .navbar-logo {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .hero-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

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

    .hero-content {
        padding: 0 16px;
    }

    .btn-lg {
        padding: 16px 32px;
        font-size: 0.9rem;
    }

    .section-header {
        margin-bottom: 50px;
    }

    .donation-form {
        padding: 25px;
    }

    .contact-form-wrapper {
        padding: 25px;
    }

    .gallery-masonry {
        grid-template-columns: 1fr;
    }
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--navy-900);
    z-index: 1001;
    padding: 100px 40px 40px;
    transition: var(--transition-normal);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    display: block;
    padding: 15px 0;
    font-size: 1.2rem;
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

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