/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Enhanced typography with Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');
body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    position: relative;
    background: rgba(255, 255, 255, 0.9); /* Semi-transparent to show canvas */
}

/* Height utility class for logo */
.h-12 {
    height: 5rem;
}

/* Hero section with animated gradient */
.hero-bg {
    background: linear-gradient(45deg, rgba(29, 78, 216, 0.7), rgba(59, 130, 246, 0.7)), url('/images/*\ Smooth\ scrolling\ for\ the\ entire\ page\ *.jpg') no-repeat center center/cover;
    background-attachment: scroll;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.3), rgba(147, 197, 253, 0.3));
    animation: gradientShift 15s ease infinite;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    will-change: opacity, transform;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced button styles */
.donate-btn {
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}
.donate-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}
.donate-btn:hover::after {
    left: 100%;
}
.donate-btn:hover {
    transform: translateY(-4px);
    background-color: #1e40af;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: #93c5fd;
}
.donate-btn:focus {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

/* Navigation styling */
nav {
    backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.98);
}
.nav-link, .lang-btn {
    position: relative;
    font-weight: 600;
}
.nav-link::after, .lang-btn::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #1e40af;
    transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link:focus::after, .lang-btn:hover::after, .lang-btn:focus::after {
    width: 100%;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: #1e40af;
    color: white;
    padding: 10px;
    z-index: 100;
    transition: top 0.3s ease;
}
.skip-link:focus {
    top: 0;
}

/* Section styling */
section#about, section#reviews, section#team {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(241, 245, 249, 0.9)); /* Semi-transparent */
}
section#story {
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.9), rgba(226, 232, 240, 0.9)); /* Semi-transparent */
}

/* Card styles with 3D effect */
.card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    border: 1px solid transparent;
    position: relative;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(230, 240, 250, 0.95));
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(45deg, #3b82f6, #93c5fd);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

/* Mobile-specific media queries (up to 640px) */
@media (max-width: 640px) {
    /* Navigation */
    nav {
        padding: 0.75rem 1rem;
    }
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    #mobile-brand {
        display: none;
    }
    .text-2xl {
        font-size: 1.5rem;
    }
    #mobile-menu {
        position: fixed;
        top: 5.5rem;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        z-index: 40;
        padding: 1.25rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    #mobile-menu a {
        font-size: 1.125rem;
        padding: 0.75rem 0;
        width: 100%;
        text-align: center;
    }
    .hamburger {
        padding: 0.5rem;
    }

    /* Hero Section */
    .hero-bg {
        min-height: 70vh;
        background-attachment: scroll;
    }
    .hero-bg h1 {
        font-size: 2.25rem;
        line-height: 1.2;
        margin-bottom: 1.5rem;
    }
    .hero-bg p {
        font-size: 1rem;
        max-width: 90%;
        margin-bottom: 2rem;
    }
    .donate-btn {
        font-size: 0.875rem;
        padding: 0.75rem 1.5rem;
    }

    /* About Section */
    section#about {
        padding: 3rem 0;
    }
    #about-heading {
        font-size: 2.25rem;
    }
    section#about p {
        font-size: 0.875rem;
        max-width: 95%;
    }
    .grid {
        gap: 1.5rem;
    }
    .card {
        padding: 1rem;
    }
    .card h3 {
        font-size: 1.25rem;
    }
    .card p {
        font-size: 0.875rem;
    }
    .card svg {
        width: 2.5rem;
        height: 2.5rem;
    }

    /* Story Section */
    section#story {
        padding: 3rem 0;
    }
    #story-heading {
        font-size: 2.25rem;
    }
    section#story img {
        height: 16rem;
        object-fit: cover;
    }
    section#story p {
        font-size: 0.875rem;
    }
    section#story h3 {
        font-size: 1.25rem;
    }

    /* Donation Section */
    section#donate {
        padding: 3rem 0;
    }
    #donate-heading {
        font-size: 2.25rem;
    }
    section#donate p {
        font-size: 0.875rem;
        max-width: 95%;
    }
    section#donate .card {
        padding: 1.25rem;
    }
    section#donate .card h3 {
        font-size: 1.25rem;
    }
    section#donate .card p {
        font-size: 0.875rem;
    }
    section#donate .donate-btn {
        font-size: 0.875rem;
        padding: 0.75rem 1.5rem;
    }
    .w-full.bg-gray-200 {
        height: 0.5rem;
    }

    /* Reviews Section */
    section#reviews {
        padding: 3rem 0;
    }
    #reviews-heading {
        font-size: 2.25rem;
    }
    section#reviews .card {
        padding: 1.25rem;
    }
    section#reviews .card p {
        font-size: 0.875rem;
    }
    section#reviews .card .font-semibold {
        font-size: 1rem;
    }

    /* Team Section */
    section#team {
        padding: 3rem 0;
    }
    #team-heading {
        font-size: 2.25rem;
    }
    section#team p {
        font-size: 0.875rem;
        max-width: 95%;
    }
    section#team .card {
        padding: 1.25rem;
    }
    section#team .card h3 {
        font-size: 1.25rem;
    }
    section#team .card p {
        font-size: 0.875rem;
    }
    section#team img {
        width: 6rem;
        height: 6rem;
    }

    /* Footer */
    footer {
        padding: 2rem 0;
    }
    footer .grid {
        gap: 2rem;
    }
    footer img {
        height: 3.5rem;
    }
    footer p, footer a {
        font-size: 0.875rem;
    }
    footer h3 {
        font-size: 1.125rem;
    }
    .flex-col.md\:flex-row {
        flex-direction: column;
        text-align: center;
    }
}

/* Tablet-specific media queries (641px–768px) */
@media (min-width: 641px) and (max-width: 768px) {
    /* Navigation */
    nav .container {
        padding: 0 1.5rem;
    }
    .text-2xl {
        font-size: 1.75rem;
    }
    #mobile-menu {
        top: 5.5rem;
        padding: 1.5rem;
    }
    #mobile-menu a {
        font-size: 1.25rem;
    }

    /* Hero Section */
    .hero-bg {
        min-height: 75vh;
    }
    .hero-bg h1 {
        font-size: 3rem;
    }
    .hero-bg p {
        font-size: 1.125rem;
    }
    .donate-btn {
        font-size: 1rem;
        padding: 1rem 2rem;
    }

    /* About Section */
    section#about {
        padding: 4rem 0;
    }
    #about-heading {
        font-size: 3rem;
    }
    section#about p {
        font-size: 1rem;
    }
    .card h3 {
        font-size: 1.5rem;
    }
    .card p {
        font-size: 1rem;
    }

    /* Story Section */
    section#story {
        padding: 4rem 0;
    }
    #story-heading {
        font-size: 3rem;
    }
    section#story img {
        height: 20rem;
    }
    section#story p {
        font-size: 1rem;
    }

    /* Donation Section */
    section#donate {
        padding: 4rem 0;
    }
    #donate-heading {
        font-size: 3rem;
    }
    section#donate p {
        font-size: 1rem;
    }
    section#donate .card {
        padding: 1.5rem;
    }

    /* Reviews Section */
    section#reviews {
        padding: 4rem 0;
    }
    #reviews-heading {
        font-size: 3rem;
    }
    section#reviews .card p {
        font-size: 1rem;
    }

    /* Team Section */
    section#team {
        padding: 4rem 0;
    }
    #team-heading {
        font-size: 3rem;
    }
    section#team p {
        font-size: 1rem;
    }
    section#team .card {
        padding: 1.5rem;
    }
    section#team img {
        width: 8rem;
        height: 8rem;
    }

    /* Footer */
    footer {
        padding: 3rem 0;
    }
    footer img {
        height: 4rem;
    }
    footer p, footer a {
        font-size: 1rem;
    }
}