/* ===== BYTES FOR BETTER LIVES - ENHANCED STYLES ===== */

/* ===== CSS RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #34d399;
    --primary-dark: #10b981;
    --primary-light: #6ee7b7;
    --secondary-color: #2563eb;
    --accent-color: #f59e0b;
    --dark: #1f2937;
    --dark-light: #374151;
    --gray: #6b7280;
    --light-gray: #e5e7eb;
    --white: #ffffff;
    --bg-light: #f9fafb;
    --gradient-1: linear-gradient(135deg, #34d399 0%, #6ee7b7 100%);
    --gradient-2: linear-gradient(135deg, #34d399 0%, #6ee7b7 100%);
    --gradient-3: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2.5rem;
    color: var(--dark);
}

h3 {
    font-size: 1.75rem;
    color: var(--dark);
}

p {
    margin-bottom: 1rem;
    color: var(--gray);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* ===== NAVIGATION ===== */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 0.75rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.75rem 0;
    box-shadow: var(--shadow-lg);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 100px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--dark);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-2);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-color);
}

.btn-donate {
    background: #34d399;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.btn-donate:hover {
    background: #10b981;
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

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

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

/* ===== HERO SECTION ===== */
.hero {
    background: url('images/hero-bg.avif') center 30% no-repeat;
    background-size: cover;
    color: white !important;
    padding: 0;
    margin-top: 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    min-height: 700px;
    height: 80vh;
}

.hero *,
.hero h1,
.hero h2,
.hero h3,
.hero p,
.hero span,
.hero div {
    color: #ffffff !important;
}

.hero h2 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 0;
}

.hero-content {
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem 3rem;
    position: relative;
    z-index: 1;
}

.hero h1,
.hero-fancy-title {
    font-size: 3.5rem;
    margin-bottom: 0;
    background: linear-gradient(135deg, #ffffff 0%, #34d399 50%, #6ee7b7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 1.5rem 2.5rem;
    border-radius: 25px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(52, 211, 153, 0.4),
                0 4px 16px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: inline-block;
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 1.3;
    animation: fadeInUp 1s ease, glow 3s ease-in-out infinite;
    text-transform: uppercase;
    position: relative;
    background-color: rgba(0, 0, 0, 0.4);
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(52, 211, 153, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(110, 231, 183, 0.8));
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffffff !important;
    animation: fadeInUp 1s ease;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 1),
                 0 8px 24px rgba(0, 0, 0, 0.8),
                 0 12px 40px rgba(0, 0, 0, 0.6);
}

.hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    color: #ffffff !important;
    animation: fadeInUp 1.2s ease;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 1),
                 0 8px 24px rgba(0, 0, 0, 0.8),
                 0 12px 40px rgba(0, 0, 0, 0.6);
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== SECTIONS ===== */
.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-2);
    border-radius: 2px;
}

.section-description {
    font-size: 1.25rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
}

/* ===== STATS SECTION ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.stat-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    border: 1px solid var(--light-gray);
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--gray);
    font-weight: 500;
}

/* ===== CARDS ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    justify-items: center;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Home page - 4 items in one row */
.section:has(.cards-grid .card:nth-child(4):last-child) .cards-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1600px;
}

/* 2 items - centered */
.section:has(.cards-grid .card:nth-child(2):last-child) .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
}

/* 1 item - centered */
.section:has(.cards-grid .card:only-child) .cards-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
}

/* 6 items - 3 and 3 */
.section:has(.cards-grid .card:nth-child(6):last-child) .cards-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1200px;
}

/* 3 items - all in one row */
.section:has(.cards-grid .card:nth-child(3):last-child) .cards-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1200px;
}

.cards-grid .card {
    width: 100%;
    max-width: 500px;
}

.card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    border: 1px solid var(--light-gray);
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
}

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

.card-icon {
    width: 100%;
    height: 200px;
    background: var(--gradient-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-content {
    flex: 1;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.card-description {
    color: var(--gray);
    line-height: 1.7;
    flex: 1;
}

.card-content .btn {
    margin-top: auto;
}

/* ===== FEATURE BOXES ===== */
.feature-box {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--primary-color);
    transition: all 0.3s ease;
}

.feature-box:hover {
    box-shadow: var(--shadow-xl);
    transform: translateX(10px);
}

.feature-box h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ===== TEAM SECTION ===== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    justify-items: center;
}

/* Make last 2 items centered on second row */
.team-grid .team-member:nth-child(4) {
    grid-column: 1 / 2;
    margin-left: auto;
    margin-right: 1.5rem;
}

.team-grid .team-member:nth-child(5) {
    grid-column: 2 / 3;
    margin-left: 1.5rem;
    margin-right: auto;
}

.team-member {
    width: 100%;
    max-width: 350px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    text-align: center;
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.team-photo {
    width: 100%;
    height: 300px;
    background: var(--gradient-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: white;
}

.team-info {
    padding: 2rem;
}

.team-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.team-role {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.team-bio {
    color: var(--gray);
    line-height: 1.6;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: #34d399;
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: #10b981;
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 6rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.75rem;
    display: block;
}

.footer-section a:hover {
    color: var(--primary-light);
}

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

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== IMAGE CAROUSEL ===== */
.card-media {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--light);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    display: none;
    width: 100%;
    height: 100%;
}

.carousel-slide.active {
    display: block;
}

.carousel-slide img,
.carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--light);
}

.clickable-image {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.clickable-image:hover {
    opacity: 0.9;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.carousel-arrow:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.carousel-arrow.prev {
    left: 10px;
}

.carousel-arrow.next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

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

.carousel-dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    z-index: 10001;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: scale(1.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .container {
        padding: 0 1.5rem;
    }

    .logo img {
        height: 70px;
    }

    .hamburger {
        display: flex;
        cursor: pointer;
        z-index: 1001;
    }

    .card-media {
        height: 250px;
    }

    .carousel-arrow {
        width: 35px;
        height: 35px;
        font-size: 1.25rem;
    }

    .carousel-arrow.prev {
        left: 5px;
    }

    .carousel-arrow.next {
        right: 5px;
    }

    .carousel-dots {
        bottom: 10px;
        gap: 6px;
    }

    .carousel-dot {
        width: 6px;
        height: 6px;
    }

    .carousel-dot.active {
        width: 18px;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero h1,
    .hero-fancy-title {
        font-size: 2rem;
        letter-spacing: 1px;
        padding: 1rem 1.5rem;
    }

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

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .cards-grid,
    .stats-grid,
    .team-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        max-width: 100% !important;
    }

    .card {
        max-width: 100%;
    }

    .team-grid .team-member:nth-child(4),
    .team-grid .team-member:nth-child(5) {
        grid-column: auto;
        margin-left: 0;
        margin-right: 0;
    }

    .feature-box {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 0;
        min-height: 500px;
        height: 70vh;
    }

    .hero h1,
    .hero-fancy-title {
        font-size: 1.5rem;
        padding: 0.75rem 1rem;
        letter-spacing: 0.5px;
    }

    .hero-content {
        padding: 0 1rem 2rem;
    }

    .section {
        padding: 4rem 0;
    }

    .stat-card {
        padding: 2rem 1.5rem;
    }
}

/* ===== MOBILE TOUCH OPTIMIZATION ===== */
@media (hover: none) and (pointer: coarse) {
    /* Touch device optimizations */
    .btn,
    .nav-link,
    .hamburger,
    .carousel-arrow {
        min-height: 44px;
        min-width: 44px;
    }
    
    .btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .clickable-image {
        cursor: pointer;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.bg-light {
    background-color: var(--bg-light);
}
