/* --- MODERN UI REVAMP V2 --- */

/* 1. Base Styles & Variables */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --primary-dark: #0a2e1a;
    --primary: #1a5c2e;
    --primary-light: #2d8a4a;
    --accent: #4ad295;
    --text: #212529;
    --text-light: #6c757d;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --dark-charcoal: #1c1c1e; 
    --dark-charcoal-light: #2a2a2e;
    --black: #000000;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    --font-primary: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.7;
    color: var(--text);
    background-color: var(--light-gray);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
}

h1, h2, h3, h4 {
    line-height: 1.3;
    margin-bottom: 15px;
    font-weight: 700;
}

p {
    margin-bottom: 15px;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

.section-title {
    font-size: 40px;
    text-align: center;
    margin-bottom: 20px;
}

.section-title span {
    color: var(--primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 60px;
    font-size: 18px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 2. Header - Transparent & Dynamic */
.header {
    background: transparent;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px;
}

.logo-img {
    height: 50px;
}

.navbar ul {
    display: flex;
    list-style: none;
}

.navbar ul li {
    margin: 0 20px;
}

.navbar ul li a {
    color: var(--text);
    font-weight: 600;
    position: relative;
    padding: 5px 0;
}

.header.scrolled .navbar ul li a {
    color: var(--text);
}

.header:not(.scrolled) .navbar ul li a {
    color: var(--white);
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.navbar ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

.navbar ul li a:hover::after,
.navbar ul li a.active::after {
    width: 100%;
}

.donate-btn {
    margin-left: 20px;
}

/* 3. Buttons - Modern & Attractive */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
    gap: 10px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-light), var(--accent));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(45, 138, 74, 0.4);
}

.hero .btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-dark);
}

.hero .btn-secondary:hover {
    background: var(--white);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.btn-donate {
    background: linear-gradient(45deg, #ffc107, #ff9800);
    color: var(--black);
    padding: 12px 25px;
    font-weight: 700;
}

/* 4. Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(10, 46, 26, 0.95), rgba(26, 92, 46, 0.85)), url('assets/hero-bg.jpg') no-repeat center center/cover;
    color: var(--white);
    padding: 200px 0 120px;
    margin-top: 0;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h2 {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content h2 span {
    color: var(--accent);
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-image img {
    max-width: 100%;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* 5. Cards & Sections - Refined Styling */
.tools, .blog, .features {
    background-color: var(--white);
}

.tool-card, .blog-card, .feature-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.tool-card:hover, .blog-card:hover, .feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Tool Cards */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.tool-card {
    padding: 30px;
    text-align: center;
}

.tool-image {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden;
}

.tool-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tool-card h3 {
    font-size: 22px;
    color: var(--primary-dark);
}

/* Demo Video Section */
.video-container {
    max-width: 960px;
    margin: 0 auto;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background-color: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.video-thumbnail:hover img {
    opacity: 0.5;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.play-button i {
    color: var(--white);
    font-size: 30px;
    margin-left: 5px;
}

.video-thumbnail:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Blog Section */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    display: flex;
    flex-direction: column;
}

.blog-image {
    height: 220px;
}

.blog-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.blog-card h3 {
    font-size: 20px;
    color: var(--primary-dark);
}

.blog-card p {
    flex-grow: 1;
}

.blog-read-more {
    font-weight: 600;
    margin-top: auto;
}

.blog-more {
    text-align: center;
    margin-top: 60px;
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 30px;
    text-align: center;
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--white);
    font-size: 30px;
}

/* 
======================================================
6. Footer - ELEGANT & PROFESSIONAL REDESIGN
======================================================
*/
.footer {
    background: linear-gradient(135deg, var(--dark-charcoal) 0%, var(--dark-charcoal-light) 100%);
    color: rgba(255, 255, 255, 0.7);
    padding: 100px 0 0;
    border-top: 4px solid var(--accent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr; /* Layout: About | Links | Contact | Newsletter */
    gap: 50px;
    margin-bottom: 60px;
}

.footer h4 {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 25px;
    font-size: 18px;
    position: relative;
}

.footer-about h3 {
    font-size: 28px;
    color: var(--white);
    margin-bottom: 20px;
}

.footer-about h3 span {
    color: var(--accent);
}

.footer-about p {
    font-weight: 400;
    max-width: 350px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
}

.social-links a:hover {
    color: var(--white);
    background-color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.footer-links ul {
    list-style: none;
}

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

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links ul li a:hover {
    color: var(--white);
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-contact p i {
    color: var(--accent);
}

.footer-newsletter {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 12px;
}

.footer-newsletter p {
    margin-bottom: 20px;
}

.footer-newsletter form {
    display: flex;
}

.footer-newsletter input {
    flex: 1;
    padding: 14px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0,0,0,0.2);
    border-radius: 8px 0 0 8px;
    outline: none;
    color: var(--white);
    font-family: var(--font-primary);
}

.footer-newsletter input:focus {
    border-color: var(--accent);
}

.footer-newsletter button {
    background: var(--accent);
    color: var(--dark-charcoal);
    border: none;
    padding: 0 20px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
}

.footer-newsletter button:hover {
    background-color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 0;
    text-align: center;
    font-size: 14px;
}

/* 7. Responsive Design */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--primary);
    z-index: 1001;
}

.header:not(.scrolled) .menu-toggle {
    color: var(--white);
}

@media (max-width: 992px) {
    .menu-toggle { display: block; }
    .navbar { display: none; position: absolute; top: 100%; left: 0; width: 100%; background-color: var(--white); box-shadow: var(--shadow); padding: 20px 0; }
    .navbar.active { display: block; }
    .navbar ul { flex-direction: column; align-items: center; gap: 15px; }
    .navbar ul li a, .header.scrolled .navbar ul li a, .header:not(.scrolled) .navbar ul li a { color: var(--text); text-shadow: none; }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr; /* 2x2 grid on tablets */
    }
    .footer-about, .footer-newsletter {
        grid-column: 1 / -1; /* Make about and newsletter full-width */
    }
}

@media (max-width: 768px) {
    section { padding: 80px 0; }
    .section-title { font-size: 32px; }
    .hero { padding: 150px 0 80px; text-align: center; }
    .hero .container { flex-direction: column; }
    .hero-content h2 { font-size: 40px; }
    .hero-buttons { justify-content: center; }
    .hero-image { margin-top: 40px; }
    .tools-grid, .blog-grid, .features-grid { grid-template-columns: 1fr; }
    
    .footer-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 40px;
        /* --- FIX: Center footer content on mobile --- */
        text-align: center;
    }

    .footer-about p {
        margin-left: auto;
        margin-right: auto;
    }

    .social-links {
        justify-content: center; /* Center the social icons flex container */
    }

    .footer-links ul {
        padding-left: 0; /* Remove default padding */
        display: inline-block; /* Allows the block to be centered */
        text-align: left; /* Keep the link text itself left-aligned for readability */
    }

    .footer-contact p {
        justify-content: center;
    }
    /* --- END FIX --- */
}

@media (max-width: 480px) {
    .hero-content h2 { font-size: 32px; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-buttons .btn { width: 100%; max-width: 300px; }
}