@import url('https://fonts.googleapis.com/css2?family=Martel+Sans:wght@200;300;400;600;700;800;900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Global Styles */
* {
    font-family: 'Poppins', Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

/* Enhanced Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulseGlow {
    0% { 
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(255, 215, 0, 0);
        transform: scale(1.05);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
        transform: scale(1);
    }
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: white; }
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

@keyframes floatUp {
    0% { 
        bottom: -100px; 
        opacity: 0;
        transform: translateX(0px) rotate(0deg);
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.3;
    }
    100% { 
        bottom: 100vh; 
        opacity: 0;
        transform: translateX(100px) rotate(360deg);
    }
}

@keyframes glowBreath {
    0% { 
        text-shadow: 0 0 10px #ffb100, 0 0 20px #f7931e;
        transform: scale(1);
    }
    100% { 
        text-shadow: 0 0 30px #eca527, 0 0 40px #ff6b35;
        transform: scale(1.02);
    }
}

@keyframes moveBackground {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
    }
    33% {
        transform: translate(-30%, -70%) rotate(120deg) scale(1.1);
    }
    66% {
        transform: translate(-70%, -30%) rotate(240deg) scale(0.9);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg) scale(1);
    }
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100px) translateX(200px) rotate(180deg);
        opacity: 0;
    }
}

/* Animation Classes */
.animate-fadeInUp {
    animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slideInRight {
    animation: slideInRight 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-pulseGlow {
    animation: pulseGlow 3s infinite;
}

.animate-typewriter {
    overflow: hidden;
    border-right: 3px solid;
    white-space: nowrap;
    animation: typewriter 3s steps(40, end), blink-caret 1s step-end infinite;
}

/* Enhanced Hero Section */
.hero-bg {
    position: relative;
    background: linear-gradient(135deg, #ff6b35, #f7931e, #eca527, #3ac5c9, #1e3c72, #764ba2);
    background-size: 600% 600%;
    background-attachment: fixed;
    animation: gradientFlow 15s ease-in-out infinite;
    overflow: hidden;
    color: white;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1rem;
}

.hero-bg::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2), transparent 50%);
    animation: moveBackground 25s linear infinite;
    z-index: 0;
    filter: blur(80px);
}

.hero-bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    z-index: 1;
    animation: particleFloat 20s linear infinite;
}

/* Push hero section below navbar */
.hero-bg {
    padding-top: 80px; /* Adjust to your navbar height */
}


.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
}

/* Floating Particles */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
}

.bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: floatUp 12s linear infinite;
}

.bubble:nth-child(1) {
    width: 60px;
    height: 60px;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 15s;
}

.bubble:nth-child(2) {
    width: 40px;
    height: 40px;
    left: 20%;
    animation-delay: 2s;
    animation-duration: 12s;
}

.bubble:nth-child(3) {
    width: 80px;
    height: 80px;
    left: 30%;
    animation-delay: 4s;
    animation-duration: 18s;
}

.bubble:nth-child(4) {
    width: 30px;
    height: 30px;
    left: 70%;
    animation-delay: 6s;
    animation-duration: 14s;
}

.bubble:nth-child(5) {
    width: 50px;
    height: 50px;
    left: 80%;
    animation-delay: 8s;
    animation-duration: 16s;
}

/* Enhanced Gallery Images */
.gallery-img {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.gallery-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
    z-index: 1;
}

.gallery-img:hover::before {
    left: 100%;
}

.gallery-img:hover {
    transform: scale(1.08) rotateY(5deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* Enhanced Button Animations */
.button-animated {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.button-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f7931e, #eca527);
    transition: left 0.3s ease;
    z-index: -1;
}

.button-animated:hover::before {
    left: 0;
}

.button-animated:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(255, 177, 0, 0.4);
    animation: pulseGlow 2s infinite;
}

/* Enhanced Heading Animation */
.heading-animated {
    animation: glowBreath 3s infinite alternate;
    color: #f7931e;
    background: linear-gradient(135deg, #ff6b35, #f7931e, #eca527);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.donation{
  display: flex;
  justify-content: center;
}

.donation button {
  background: linear-gradient(135deg, #f7931e, #ffb347);
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 16px 32px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(249, 147, 30, 0.4);
  transition: all 0.3s ease;
  letter-spacing: 1px;
}

.donation button:hover {
  transform: scale(1.15) translateY(-4px);
  background: linear-gradient(135deg, #ff9f1c, #ffb84d);
  box-shadow: 0 12px 24px rgba(249, 147, 30, 0.6);
}

.donation button:active {
  transform: scale(0.95);
  box-shadow: 0 4px 12px rgba(249, 147, 30, 0.5);
}

/* Typography Enhancements */
h2.text-5xl, 
h2.md\:text-7xl, 
h2.font-bold, 
h2.mb-4, 
h2.animate-typewriter {
    line-height: 1.1;
    padding-top: 0.35em;
    padding-bottom: 0.15em;
    margin-top: 0;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.text-5xl.md\:text-7xl.font-bold.mb-4.animate-typewriter {
    line-height: 1.1;
    padding-top: 0.35em;
    padding-bottom: 0.15em;
    margin-top: 0;
    margin-bottom: 1rem;
}

.hero-bg {
    padding-top: 90px; /* enough space below fixed navbar */
}

/* Typewriter effect fix */
.animate-typewriter {
    overflow: hidden;
    border-right: 3px solid;
    white-space: nowrap;
    display: inline-block;
    animation: typewriter 3s steps(40, end), blink-caret 1s step-end infinite;
}

header nav {
  display: flex;
  flex-wrap: nowrap; /* prevent wrapping */
  overflow-x: auto; /* allow horizontal scroll if too many links */
  white-space: nowrap;
  gap: 1rem;
  -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
}

header nav::-webkit-scrollbar {
  display: none; /* hide scrollbar for clean look */
}

header nav a {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  display: inline-block;
  text-decoration: none;
  color: inherit;
}


/* Extra Large Screens (1440px and up) */
@media (min-width: 1440px) {
    .hero-content {
        max-width: 1200px;
    }
    
    h2, .text-5xl, .md\:text-7xl {
        font-size: 5rem;
    }
    
    .bubble {
        transform: scale(1.2);
    }
}

/* Large Screens (1200px - 1439px) */
@media (max-width: 1439px) and (min-width: 1200px) {
    .hero-content {
        max-width: 1000px;
    }
    
    h2, .text-5xl, .md\:text-7xl {
        font-size: 4rem;
    }
}

/* Large Tablets and Medium Screens (1024px - 1199px) */
@media (max-width: 1199px) and (min-width: 1024px) {
    .hero-bg {
        height: 80vh;
        padding: 1.5rem;
        background-attachment: scroll;
    }
    
    .hero-content {
        max-width: 800px;
    }
    
    h2, .text-5xl, .md\:text-7xl {
        font-size: 3.5rem;
        line-height: 1.2;
    }
    
    .bubble {
        transform: scale(0.9);
    }
    
    .gallery-img:hover {
        transform: scale(1.05) rotateY(3deg);
    }
}

/* Tablets (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .hero-bg {
        height: 70vh;
        padding: 1rem;
        background-attachment: scroll;
    }
    
    .hero-content {
        max-width: 90vw;
    }
    
    h2, .text-5xl, .md\:text-7xl {
        font-size: 2.8rem;
        line-height: 1.3;
    }
    
    h2.text-xl,
    h2.md\:text-2xl,
    h2.mb-8,
    .text-xl,
    .md\:text-2xl,
    .mb-8 {
        font-size: 1.5rem;
        line-height: 1.4;
        padding-top: 0.3em;
        padding-bottom: 0.2em;
        margin-bottom: 1.5rem;
        word-break: break-word;
    }
    
    .gallery-img {
        width: 85vw;
        height: auto;
        border-radius: 0.75rem;
    }
    
    .gallery-img:hover {
        transform: scale(1.03);
    }
    
    .button-animated {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .bubble {
        transform: scale(0.7);
    }
}

/* Small Tablets and Large Phones (600px - 767px) */
@media (max-width: 767px) and (min-width: 600px) {
    .hero-bg {
        height: 60vh;
        padding: 0.8rem;
        background-attachment: scroll;
    }
    
    .hero-content {
        max-width: 95vw;
    }
    
    h2, .text-5xl, .md\:text-7xl {
        font-size: 2.2rem;
        line-height: 1.3;
        margin-bottom: 0.8rem;
    }
    
    h2.text-xl,
    h2.md\:text-2xl,
    h2.mb-8,
    .text-xl,
    .md\:text-2xl,
    .mb-8 {
        font-size: 1.3rem;
        line-height: 1.4;
        padding-top: 0.25em;
        padding-bottom: 0.15em;
        margin-bottom: 1.2rem;
        word-break: break-word;
    }
    
    .gallery-img {
        width: 90vw;
        border-radius: 0.5rem;
    }
    
    .button-animated {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
        width: auto;
    }
    
    .bubble {
        transform: scale(0.6);
    }
}

/* Mobile Phones (480px - 599px) */
@media (max-width: 599px) and (min-width: 480px) {
    .hero-bg {
        height: 50vh;
        padding: 0.5rem;
        text-align: center;
        background-attachment: scroll;
    }
    
    .hero-content {
        max-width: 95vw;
        padding: 0.5rem;
    }
    
    h2, .text-5xl, .md\:text-7xl {
        font-size: 1.8rem;
        line-height: 1.4;
        margin-bottom: 0.6rem;
    }
    
    h2.text-xl,
    h2.md\:text-2xl,
    h2.mb-8,
    .text-xl,
    .md\:text-2xl,
    .mb-8 {
        font-size: 1.1rem;
        line-height: 1.5;
        padding-top: 0.2em;
        padding-bottom: 0.1em;
        margin-bottom: 1rem;
        word-break: break-word;
    }
    
    .gallery-img {
        width: 95vw;
        border-radius: 0.4rem;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    }
    
    .gallery-img:hover {
        transform: scale(1.02);
    }
    
    .button-animated {
        width: 90%;
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
        margin: 0.5rem auto;
        display: block;
    }
    
    .bubble {
        transform: scale(0.4);
    }
    
    .animate-typewriter {
        font-size: 1.6rem;
    }
}

/* Small Mobile Phones (320px - 479px) */
@media (max-width: 479px) {
    .hero-bg {
        height: auto;
        min-height: 50vh;
        padding: 0.3rem;
        text-align: center;
        background-attachment: scroll;
    }
    
    .hero-content {
        max-width: 98vw;
        padding: 0.3rem;
    }
    
    h2, .text-5xl, .md\:text-7xl {
        font-size: 1.5rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
        word-break: break-word;
    }
    
    h2.text-xl,
    h2.md\:text-2xl,
    h2.mb-8,
    .text-xl,
    .md\:text-2xl,
    .mb-8 {
        font-size: 1rem;
        line-height: 1.5;
        padding-top: 0.15em;
        padding-bottom: 0.1em;
        margin-bottom: 0.8rem;
        word-break: break-word;
    }
    
    .gallery-img {
        width: 98vw;
        border-radius: 0.25rem;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    }
    
    .gallery-img:hover {
        transform: scale(1.01);
    }
    
    .button-animated {
        width: 95%;
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
        margin: 0.3rem auto;
        display: block;
    }
    
    .bubble {
        display: none; /* Hide particles on very small screens for performance */
    }
    
    .animate-typewriter {
        font-size: 1.3rem;
        animation-duration: 2s;
    }
    
    .hero-bg::before,
    .hero-bg::after {
        opacity: 0.5; /* Reduce visual complexity on small screens */
    }
}

/* High Resolution Screens (Retina) */
@media (min-resolution: 2dppx), (-webkit-min-device-pixel-ratio: 2) {
    .logo {
        background-image: url('logo@2x.png');
    }
    
    .gallery-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape Orientation for Mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-bg {
        height: 100vh;
        padding: 0.5rem;
    }
    
    .hero-content {
        max-width: 80vw;
    }
    
    h2, .text-5xl, .md\:text-7xl {
        font-size: 1.8rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .gallery-img {
        box-shadow: 0 15px 35px rgba(255, 255, 255, 0.1);
    }
    
    .button-animated {
        box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
    }
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-bg::before,
    .hero-bg::after,
    .bubble {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .hero-bg {
        background: white !important;
        color: black !important;
        height: auto !important;
    }
    
    .bubble,
    .hero-bg::before,
    .hero-bg::after {
        display: none !important;
    }
    
    .button-animated {
        background: #333 !important;
        color: white !important;
        box-shadow: none !important;
    }
}

@media (max-width: 599px) {
    .animate-typewriter {
        white-space: normal;   /* allow multi-line */
        border-right: none;    /* caret removed */
        width: auto;
        animation: fadeInUp 1.5s ease-out; /* smoother mobile animation */
        font-size: 1.4rem; /* tweak size so it fits better */
        line-height: 1.4;
    }
}

/* On extra small screens (like 320px phones) */
@media (max-width: 479px) {
    .animate-typewriter {
        font-size: 1.2rem;
        line-height: 1.4;
    }

    .hero-bg {
        padding-top: 150px; /* push down a little more */
    }
}

@media (max-width: 600px) {
  header nav {
    gap: 0.5rem;
  }
  header nav a {
    font-size: 1.2rem;
    padding: 0.75rem 1.25rem;
  }
}