:root {
    /* Colors */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #0f172a;
    --accent: #0ea5e9;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --text-light: #f1f5f9;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    
    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--secondary);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section {
    padding: var(--spacing-xl) 0;
}

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

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

.text-white {
    color: white !important;
}

.text-white h2, .text-white p {
    color: white !important;
}

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: var(--spacing-lg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
    transform: scale(1.05);
}

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

.btn-light:hover {
    background-color: var(--bg-light);
    transform: scale(1.05);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1.5rem 0;
}

.header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
}

.logo-icon {
    color: var(--primary);
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-main);
}

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

/* Navbar Donate Button (Givebutter) — scaled to sit inline with nav links */
.nav-list givebutter-widget {
    display: inline-block;
    transform: scale(0.85);
    transform-origin: left center;
    margin-right: -24px;
    vertical-align: middle;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--secondary);
}

/* Hero Section */
.hero {
    padding-top: 160px;
    padding-bottom: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(14,165,233,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    min-height: 3.4em; /* Reserves space for 3 lines on desktop to prevent shifts */
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

/* Hero Donate Button (Givebutter) — scaled to match the btn-lg next to it */
.hero-actions givebutter-widget {
    display: inline-block;
    transform: scale(1.4);
    transform-origin: left center;
}

.hero-stats {
    grid-column: 1 / -1;
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    margin-top: 3.5rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.5rem 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    min-width: 200px;
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: rgba(37, 99, 235, 0.3);
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--secondary);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Visual Mockup Card */
.visual-card {
    position: relative;
    border-radius: 20px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
}

.mockup-img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.floating-badge {
    position: absolute;
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.top-right {
    top: -20px;
    right: -20px;
    animation: float-delayed 5s ease-in-out infinite;
}

.bottom-left {
    bottom: 20px;
    left: -30px;
    animation: float 7s ease-in-out infinite;
}

.text-blue {
    color: var(--primary);
}

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

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

/* About Section */
.section-header {
    max-width: 600px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.about-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--bg-light);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.icon-box {
    width: 60px;
    height: 60px;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.icon-box svg {
    width: 28px;
    height: 28px;
}

/* Services Section */
.services-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.feature-list {
    margin-top: 2rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.feature-list i {
    color: var(--primary);
}

.rounded-img {
    width: 100%;
    border-radius: 20px;
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.portfolio-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.portfolio-img-wrapper {
    height: 220px;
    overflow: hidden;
}

.portfolio-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-img-wrapper img {
    transform: scale(1.05);
}

.portfolio-info {
    padding: 1.5rem;
}

.category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

/* Apply Section */
.apply-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

.apply-text {
    max-width: 550px;
}

.apply-text h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.apply-text p {
    font-size: 1.05rem;
    opacity: 0.9;
    line-height: 1.6;
}

.apply-form-container {
    width: 100%;
    max-width: 500px;
    text-align: left;
    padding: 2rem !important; /* Slightly tighter padding */
}

.glass-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2.5rem;
    border-radius: 20px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: white;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.hidden {
    display: none !important;
}

.form-success {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    border-radius: 8px;
    color: #bbf7d0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Footer */
.footer {
    background-color: var(--secondary);
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    margin-top: 1rem;
    color: var(--text-muted);
    max-width: 300px;
}

.footer-links h4 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.875rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.social-links a {
    color: rgba(255,255,255,0.9);
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: white;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    background: transparent;
}

.social-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    transform: translateY(-2px);
}

.social-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Modal */

/* Responsive Design */
@media (max-width: 992px) {
    .hero-container, .services-wrapper {
        grid-template-columns: 1fr;
    }
    
    .hero {
        text-align: center;
        padding-top: 150px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-subtitle {
        margin: 0 auto 2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .services-visual {
        order: -1;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 2rem;
        flex-direction: column;
        box-shadow: var(--shadow-md);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.3s ease-in-out;
    }
    
    .nav.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 2.5rem;
        min-height: 4.5em; /* Reserves space for 4 lines on mobile to prevent shifts */
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* Typewriter Cursor Styling */
.cursor {
    display: inline-block;
    color: var(--primary);
    margin-left: 4px;
    font-weight: 300;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { opacity: 0; }
    50% { opacity: 1; }
}
