/* =========================================
   WAVES TRUST - STYLESHEET
   ========================================= */

/* --- VARIABLES & RESET --- */
:root {
    --primary-color: #5e1a7a;
    --primary-dark: #2f0e42;
    --secondary-color: #e83e8c;
    --accent-color: #ffd95a;
    --accent-soft: #ffe7a3;
    --text-dark: #1f2937;
    --text-muted: #5f6c7b;
    --text-light: #ffffff;
    --bg-light: #f5f1ff;
    --bg-soft: #fffaf3;
    --card-bg: #ffffff;
    --shadow-soft: 0 18px 40px rgba(92, 39, 117, 0.12);
    --shadow-strong: 0 25px 50px rgba(36, 16, 49, 0.18);
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html {
    scroll-behavior: smooth;
}

body { 
    font-family: var(--font-main); 
    color: var(--text-dark); 
    line-height: 1.6; 
    overflow-x: hidden; 
    background:
        radial-gradient(circle at top left, rgba(232, 62, 140, 0.12), transparent 25%),
        radial-gradient(circle at bottom right, rgba(94, 26, 122, 0.12), transparent 30%),
        #fffdfd;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(94, 26, 122, 0.018) 1px, transparent 1px), linear-gradient(90deg, rgba(94, 26, 122, 0.018) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
    z-index: -1;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

.section-padding { padding: 80px 0; }
.bg-light { background-color: var(--bg-light); }

.section-title {
    text-align: center; 
    font-size: clamp(2rem, 4vw, 2.8rem); 
    color: var(--primary-color);
    margin-bottom: 50px; 
    position: relative;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.section-title::after {
    content: ''; 
    display: block; 
    width: 90px; 
    height: 5px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    margin: 18px auto 0; 
    border-radius: 999px;
}

.btn-primary {
    display: inline-block; 
    background: linear-gradient(135deg, var(--secondary-color), #ff7ab5);
    color: var(--text-light);
    padding: 14px 30px; 
    border-radius: 999px; 
    font-weight: 700; 
    transition: all 0.3s ease;
    box-shadow: 0 12px 22px rgba(232, 62, 140, 0.25);
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-primary:hover { 
    background: linear-gradient(135deg, var(--accent-color), #ffca52);
    color: var(--primary-dark);
    transform: translateY(-3px) scale(1.01); 
    box-shadow: 0 16px 28px rgba(255, 217, 90, 0.32);
}

.btn-secondary {
    display: inline-block;
    padding: 13px 28px;
    border-radius: 999px;
    color: var(--text-light);
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.18);
    transform: translateY(-3px);
}

.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* --- HEADER --- */
#main-header {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 18px rgba(25, 16, 33, 0.08);
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    padding: 12px 0;
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

#main-header.scrolled {
    box-shadow: 0 10px 25px rgba(25, 16, 33, 0.12);
    background: rgba(255, 255, 255, 0.98);
}

.nav-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo-area { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
}

.logo-img { 
    height: 60px; 
    width: auto; 
    border-radius: 50%;
}

.brand-text h1 { 
    font-size: 1.5rem; 
    color: var(--primary-color); 
    line-height: 1.1; 
    font-weight: 800;
}

.brand-text p { 
    font-size: 0.8rem; 
    color: var(--secondary-color); 
    font-weight: 600; 
}

.desktop-nav ul { 
    display: flex; 
    gap: 25px; 
}

.desktop-nav a { 
    font-weight: 600; 
    font-size: 0.95rem; 
    transition: color 0.3s; 
    position: relative;
}

.desktop-nav a:hover { color: var(--secondary-color); }

.desktop-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--secondary-color);
    transition: width 0.3s;
}

.desktop-nav a:hover::after { width: 100%; }

.mobile-menu-btn { 
    display: none; 
    font-size: 1.8rem; 
    cursor: pointer; 
    color: var(--primary-color); 
    padding: 5px; 
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed; 
    top: 0; 
    right: -100%; 
    width: 280px; 
    height: 100vh;
    background: white; 
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1001; 
    transition: right 0.3s ease; 
    padding-top: 70px;
}

.mobile-nav-overlay.active { right: 0; }
.mobile-nav-overlay ul li { border-bottom: 1px solid #eee; }
.mobile-nav-overlay a { 
    display: block; 
    padding: 18px 25px; 
    font-weight: 600; 
    color: var(--primary-color); 
    font-size: 1.1rem; 
    transition: background 0.3s;
}
.mobile-nav-overlay a:hover { background: #f9f9f9; }

.close-menu { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    font-size: 1.8rem; 
    cursor: pointer; 
    color: var(--text-dark); 
}

/* =========================================
   HERO SECTION (ANIMATED MODEL)
   ========================================= */
.hero {
    position: relative;
    background: linear-gradient(135deg, #1b0828 0%, #2d0e40 35%, #581a68 100%);
    color: white; 
    text-align: center; 
    padding: 150px 20px 120px;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 -20px 40px rgba(0,0,0,0.1);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0));
    pointer-events: none;
}

/* Floating Glowing Orbs Background */
.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

.blob-1 {
    width: 400px; height: 400px;
    background: var(--secondary-color);
    top: -100px; left: -100px;
    animation: floatBlob1 15s infinite alternate ease-in-out;
}

.blob-2 {
    width: 350px; height: 350px;
    background: var(--primary-color);
    bottom: -50px; right: -50px;
    animation: floatBlob2 18s infinite alternate ease-in-out;
}

.blob-3 {
    width: 250px; height: 250px;
    background: var(--accent-color);
    top: 40%; left: 60%;
    opacity: 0.2;
    animation: floatBlob3 20s infinite alternate ease-in-out;
}

/* Hero Content Layer */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 { 
    font-size: 3.2rem; 
    margin-bottom: 20px; 
    font-weight: 800;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.hero p { 
    font-size: 1.25rem; 
    max-width: 700px; 
    margin: 0 auto 35px; 
    opacity: 0.95; 
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Text Reveal Animations */
.animate-up {
    opacity: 0;
    transform: translateY(40px);
    animation: slideUpFade 0.8s forwards ease-out;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Blob Movement Keyframes */
@keyframes floatBlob1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(150px, 80px) scale(1.2); }
}
@keyframes floatBlob2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-120px, -60px) scale(1.1); }
}
@keyframes floatBlob3 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-80px, 100px) scale(0.8); }
}

/* --- IMPACT STRIP --- */
.impact-strip {
    background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(245, 241, 255, 0.95));
    margin-top: -35px;
    position: relative;
    z-index: 3;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding-bottom: 25px;
}

.impact-card {
    background: linear-gradient(180deg, #fff, #fffaf8);
    border: 1px solid rgba(94, 26, 122, 0.08);
    border-radius: 22px;
    padding: 28px 22px;
    box-shadow: var(--shadow-soft);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.impact-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
}

.impact-number {
    display: block;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.impact-card p {
    color: var(--text-muted);
    margin: 0;
    font-weight: 500;
}

/* --- ABOUT SECTION --- */
.about-grid { 
    display: grid; 
    grid-template-columns: 1.1fr 0.9fr; 
    gap: 50px; 
    align-items: center; 
}

.badge {
    background: linear-gradient(135deg, #f2d8ff, #fef3ff);
    color: var(--primary-color); 
    padding: 7px 14px;
    border-radius: 999px; 
    font-size: 0.82rem; 
    font-weight: 700;
    display: inline-block; 
    margin-bottom: 15px;
    letter-spacing: 0.02em;
}

.about-text h3 { 
    font-size: clamp(1.7rem, 3vw, 2.2rem); 
    color: var(--secondary-color); 
    margin-bottom: 15px; 
    line-height: 1.2;
}

.about-image img { 
    border-radius: 18px; 
    box-shadow: var(--shadow-strong); 
    border: 5px solid rgba(255,255,255,0.7);
}

.trustees-list {
    background: linear-gradient(180deg, #ffffff, #f9f5ff);
    padding: 24px 22px;
    border-left: 5px solid var(--primary-color);
    margin-top: 20px; 
    box-shadow: 0 12px 22px rgba(94, 26, 122, 0.08);
    border-radius: 16px;
}

.trustees-list h4 { 
    color: var(--primary-color); 
    margin-bottom: 10px; 
}

.trustees-list li { 
    margin-bottom: 8px; 
    font-size: 0.95rem; 
}

.values-section {
    background: linear-gradient(180deg, rgba(245, 241, 255, 0.8), rgba(255,255,255,0.98));
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.value-card {
    background: linear-gradient(180deg, #ffffff, #fff8fb);
    border: 1px solid rgba(94,26,122,0.08);
    border-radius: 20px;
    padding: 28px 22px;
    box-shadow: 0 10px 24px rgba(94, 26, 122, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px rgba(94, 26, 122, 0.12);
}

.value-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border-radius: 18px;
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(94,26,122,0.12), rgba(232,62,140,0.12));
}

.value-card h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.value-card p {
    font-size: 0.94rem;
    color: var(--text-muted);
}

/* --- OBJECTIVES SECTION --- */
.objectives-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 25px;
}

.obj-card {
    background: linear-gradient(180deg, #ffffff, #fdf8ff); 
    padding: 25px; 
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(74, 30, 82, 0.06); 
    border-top: 5px solid var(--secondary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.obj-card::before {
    content: "";
    position: absolute;
    inset: auto -20% -55% auto;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(232,62,140,0.12), transparent 70%);
}

.obj-card:hover { 
    transform: translateY(-7px); 
    box-shadow: 0 18px 30px rgba(74, 30, 82, 0.12);
}

.icon-box {
    width: 58px; 
    height: 58px; 
    background: linear-gradient(135deg, rgba(94, 26, 122, 0.12), rgba(232, 62, 140, 0.1));
    color: var(--primary-color);
    border-radius: 16px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 1.35rem; 
    margin-bottom: 15px;
    box-shadow: inset 0 0 0 1px rgba(94,26,122,0.06);
}

.obj-card h4 { 
    color: var(--primary-color); 
    margin-bottom: 8px; 
    font-size: 1.1rem; 
}

.obj-card p { 
    font-size: 0.9rem; 
    color: #555; 
}

/* --- GALLERY SECTION (4 IMAGES ALIGNED) --- */
.gallery-grid { 
    display: grid; 
    grid-template-columns: repeat(4, minmax(0, 1fr)); 
    gap: 22px; 
}

.gallery-item { 
    position: relative; 
    border-radius: 18px; 
    overflow: hidden; 
    height: 280px; 
    cursor: pointer; 
    box-shadow: 0 14px 28px rgba(34, 17, 43, 0.10);
    border: 1px solid rgba(94,26,122,0.07);
}

.gallery-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.5s ease; 
}

.gallery-item:hover img { transform: scale(1.1); }

.overlay {
    position: absolute; 
    bottom: 0; 
    left: 0; 
    right: 0;
    background: linear-gradient(to top, rgba(106, 27, 154, 0.9), transparent);
    color: white; 
    padding: 20px; 
    transform: translateY(100%); 
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay { transform: translateY(0); }

/* --- FOOTER --- */
footer { 
    background: linear-gradient(135deg, #1d0b2c, #2b103d 45%, #3a1b4d 100%);
    color: white; 
    padding: 60px 0 20px; 
    position: relative;
    overflow: hidden;
}

footer::before {
    content: "";
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(255, 217, 90, 0.08);
    top: -100px;
    right: -50px;
}

.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 40px; 
    margin-bottom: 40px; 
}

.footer-col h4 { 
    color: var(--accent-color); 
    margin-bottom: 20px; 
    font-size: 1.2rem; 
}

.footer-col p { 
    margin-bottom: 10px; 
    opacity: 0.8; 
    font-size: 0.95rem; 
}

.footer-col i { 
    width: 20px; 
    color: var(--secondary-color); 
    margin-right: 5px;
}

.footer-bottom { 
    text-align: center; 
    padding-top: 20px; 
    border-top: 1px solid rgba(255,255,255,0.1); 
    font-size: 0.85rem; 
    opacity: 0.6; 
}

/* --- SCROLL ANIMATIONS --- */
.fade-in,
.reveal-card { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: opacity 0.6s ease-out, transform 0.6s ease-out; 
}

.fade-in.visible,
.reveal-card.visible { 
    opacity: 1; 
    transform: translateY(0); 
}

/* =========================================
   RESPONSIVE MEDIA QUERIES
   ========================================= */

/* Tablet View (Max 1024px) */
@media (max-width: 1024px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .hero h2 { font-size: 2.6rem; }
    .impact-grid { grid-template-columns: 1fr; }
    .values-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile View (Max 768px) - FIXED HEADER LAYOUT */
@media (max-width: 768px) {
    /* Reduce Header Height */
    #main-header { padding: 5px 0; }

    /* Header Layout: Row instead of Column */
    .nav-container { 
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center;
        padding: 10px 15px;
    }
    
    /* Logo and Text Side-by-Side */
    .logo-area { 
        flex-direction: row; 
        align-items: center; 
        gap: 10px; 
        width: auto;
    }
    
    .logo-img { height: 45px; }
    
    .brand-text { 
        text-align: left; 
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .brand-text h1 { font-size: 1.1rem; line-height: 1.2; margin-bottom: 0; }
    .brand-text p { font-size: 0.7rem; line-height: 1.2; }
    
    /* Hide Desktop Nav, Show Hamburger */
    .desktop-nav { display: none; }
    .mobile-menu-btn { display: block; font-size: 1.5rem; }
    
    /* Hero Mobile Adjustments */
    .hero { padding: 100px 20px; min-height: auto; }
    .hero h2 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .hero-actions { flex-direction: column; }
    
    /* Scale down blobs for mobile */
    .blob-1 { width: 250px; height: 250px; }
    .blob-2 { width: 200px; height: 200px; }
    .blob-3 { width: 150px; height: 150px; }
    
    .about-grid { grid-template-columns: 1fr; gap: 30px; }
    .about-image { order: -1; } 
    .values-grid { grid-template-columns: 1fr; }
    
    .gallery-grid { grid-template-columns: 1fr; }
    
    .section-title { font-size: 1.8rem; margin-bottom: 30px; }
    .section-padding { padding: 50px 0; }
}

/* Small Mobile (Max 480px) */
@media (max-width: 480px) {
    .hero { padding: 80px 15px; }
    .hero h2 { font-size: 1.6rem; }
    .obj-card { padding: 20px; }
    
    .logo-img { height: 40px; }
    .brand-text h1 { font-size: 1rem; }
    .brand-text p { font-size: 0.65rem; }
    
    .blob { filter: blur(50px); }
}