:root {
    --primary-bg: #F8F9FA;
    --secondary-bg: #FFFFFF;
    --card-bg: #FFFFFF;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --accent-color: #EF4444;
    --accent-hover: #DC2626;
    --font-family: 'Poppins', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

/* --- Navigation --- */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo img {
    height: 36px;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 600;
    position: relative;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    perspective: 1000px;
}

.parallax-bg {
    position: absolute;
    top: -5%; left: -5%;
    width: 110%; height: 110%;
    background-image: 
        radial-gradient(ellipse at center, rgba(27, 38, 59, 0.6) 0%, rgba(27, 38, 59, 0.85) 70%),
        url('https://images.pexels.com/photos/3184418/pexels-photo-3184418.jpeg?auto=compress&cs=tinysrgb&w=1920');
    background-size: cover;
    background-position: center;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.parallax-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.layer-1 {
    background: radial-gradient(circle at 20% 30%, rgba(239, 68, 68, 0.1) 0%, transparent 40%);
}

.layer-2 {
    background: radial-gradient(circle at 80% 70%, rgba(239, 68, 68, 0.15) 0%, transparent 40%);
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 0 1rem;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    color: #F9FAFB;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #D1D5DB;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.cta-button {
    background-color: var(--accent-color);
    color: #FFFFFF;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.2);
}

/* --- Content Sections --- */
main {
    background-color: var(--secondary-bg);
    position: relative;
    z-index: 5;
}

.content-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 5rem 2rem;
    text-align: center;
}

.content-section h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.content-section h2::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    background-color: var(--accent-color);
    bottom: -10px;
    left: 25%;
}

.content-section > p {
    max-width: 800px;
    margin: 2rem auto 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* --- Cards --- */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: left;
}

.card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 15px -3px rgba(31, 41, 55, 0.08), 0 4px 6px -4px rgba(31, 41, 55, 0.08);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    line-height: 1;
}

#services .card {
    align-items: center;
    text-align: center;
}

.card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.card h3, .card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.card p {
    color: var(--text-secondary);
}

/* --- How We Help Section --- */
#how-we-help {
    background-color: var(--primary-bg);
}

.help-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: left;
}

.help-item {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
}

.help-item h4 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.help-item h4 i {
    color: var(--accent-color);
    font-size: 1.5rem;
}


.help-item p {
    color: var(--text-secondary);
}

/* --- Testimonial --- */
.testimonial-section {
    background-color: var(--primary-bg);
}

.testimonial-section blockquote {
    font-size: 1.25rem;
    font-style: italic;
    max-width: 700px;
    margin: 0 auto;
    border-left: 4px solid var(--accent-color);
    padding-left: 2rem;
    text-align: left;
}

.testimonial-section footer {
    margin-top: 1rem;
    font-weight: 600;
    font-style: normal;
    color: var(--text-primary);
}

/* --- About/Team Section --- */
.team-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.team-member {
    max-width: 300px;
}

.team-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 1rem;
    border: 3px solid var(--accent-color);
}

.team-member h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.team-member span {
    color: var(--accent-color);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.team-member p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- Contact Form --- */
.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 800px;
    margin: 3rem auto 0;
    text-align: left;
}

.form-group {
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-bg);
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.contact-form label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.2s ease;
}

.contact-form input:focus + label,
.contact-form input:not(:placeholder-shown) + label,
.contact-form textarea:focus + label,
.contact-form textarea:not(:placeholder-shown) + label {
    top: -0.6rem;
    left: 0.8rem;
    font-size: 0.75rem;
    background-color: var(--secondary-bg);
    padding: 0 0.25rem;
    color: var(--accent-color);
}

.contact-form select {
   color: var(--text-secondary);
}
.contact-form select:focus,
.contact-form select:valid {
    color: var(--text-primary);
}
.contact-form select option {
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.contact-form .cta-button {
    grid-column: 1 / -1;
    justify-self: center;
    width: auto;
}

.contact-info {
    margin-top: 3rem;
    font-size: 1.1rem;
}
.contact-info p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.contact-info p i {
    color: var(--accent-color);
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}


/* --- Footer --- */
.main-footer {
    background-color: var(--primary-bg);
    text-align: center;
    padding: 4rem 2rem 2rem;
}

.main-footer p {
    max-width: 500px;
    margin: 0 auto 1.5rem;
    font-size: 1.25rem;
}

.main-footer .copyright {
    margin-top: 3rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}


/* --- Mobile Menu --- */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}
.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* --- Back to Top Button --- */
#back-to-top-btn {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--accent-color);
    color: #FFFFFF;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

#back-to-top-btn svg {
    width: 24px;
    height: 24px;
}

#back-to-top-btn:hover {
    background-color: var(--accent-hover);
}


/* --- Responsiveness --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--primary-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links a {
        margin: 1.5rem 0;
        font-size: 1.5rem;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-section {
        /* Disable 3D tilt on mobile for performance and usability */
        perspective: none;
    }
    .content-section {
        padding: 4rem 1rem;
    }
    .contact-form {
        grid-template-columns: 1fr;
    }

    /* Back to top button visibility on mobile */
    #back-to-top-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #back-to-top-btn.visible {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}