/* ---
Root Variables & Basic Setup
--- */
:root {
    --primary-color: #00aaff;
    --secondary-color: #00c6ff;
    --text-dark: #333;
    --text-light: #ccd6f6;
    --text-secondary-light: #8892b0;
    --font-family-headings: 'Poppins', sans-serif;
    --font-family-body: 'Roboto', sans-serif;
    --transition-speed: 0.3s ease;
}

html[data-theme='dark'] {
    --bg-color: #0a192f;
    --bg-secondary-color: #112240;
    --text-color: var(--text-light);
    --text-secondary-color: var(--text-secondary-light);
    --border-color: rgba(0, 170, 255, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --shadow-color: rgba(0, 0, 0, 0.5);
}

html[data-theme='light'] {
    --bg-color: #f0f2f5;
    --bg-secondary-color: #ffffff;
    --text-color: var(--text-dark);
    --text-secondary-color: #555;
    --border-color: #ddd;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
}

main {
    position: relative;
    z-index: 1;
    background-color: transparent;
}

/* ---
Loader
--- */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---
General & Utility Classes
--- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

.section-title {
    font-family: var(--font-family-headings);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-color);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary-color);
    margin-bottom: 60px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed);
    font-family: var(--font-family-headings);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-left: 15px;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Scroll-based Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---
Header & Navigation
--- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-speed);
}

.header.scrolled {
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px var(--shadow-color);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 2rem;
}

.nav-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin: 0 15px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
    transition: color var(--transition-speed);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-right {
    display: flex;
    align-items: center;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-color);
}

/* ---
Theme Switch
--- */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-right: 20px;
}
.theme-switch {
    position: relative;
    cursor: pointer;
}
.theme-switch input {
    display: none;
}

/* Container for the icons */
.slider {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Remove original slider knob */
.slider:before {
    content: none;
}

/* Icon base styles */
.theme-switch .slider .fa-sun,
.theme-switch .slider .fa-moon {
    font-size: 22px;
    color: var(--text-secondary-color);
    transition: color var(--transition-speed);
    position: absolute; /* Stack icons */
}

.theme-switch:hover .slider i {
    color: var(--primary-color);
}

/* Show/hide icons based on theme */
html[data-theme='dark'] .theme-switch .fa-sun { display: none; }
html[data-theme='dark'] .theme-switch .fa-moon { display: inline-block; }
html[data-theme='light'] .theme-switch .fa-moon { display: none; }
html[data-theme='light'] .theme-switch .fa-sun { display: inline-block; }

/* ---
Hero Section
--- */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    background-color: transparent; /* Make it see-through to the fixed background */
}

.hero-content {
    position: relative;
    z-index: 1; /* Sits on top of the hero section's transparent background */
}

.hero-content h1 {
    font-family: var(--font-family-headings);
    font-size: 4rem;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-content .hero-tagline {
    font-family: var(--font-family-headings);
    font-size: 2.2rem;
    line-height: 1.2;
    font-style: normal;
    color: var(--text-secondary-color);
    margin: 0 0 25px 0;
    opacity: 0.9;
    font-weight: 400; /* Make it less bold than the main heading */
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary-color);
    margin-bottom: 30px;
}

.cta-buttons {
    margin-top: 20px;
}

/* --- Particle Animation Container --- */
#particles-js {
    position: fixed; /* Keep the background fixed behind all content */
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0; /* Sit behind the main content */
    background-color: var(--bg-color); /* This provides the base background color */
}

/* Animated Background for Hero */
.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0.1;
    animation: gradient-move 15s ease infinite;
}

@keyframes gradient-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---
About Section
--- */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.about-text h3 {
    font-family: var(--font-family-headings);
    color: var(--primary-color);
    margin-bottom: 10px;
}

.about-text .btn {
    margin-top: 20px;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
    border-left: 2px solid var(--primary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -40px;
    top: 5px;
    width: 18px;
    height: 18px;
    background-color: var(--primary-color);
    border-radius: 50%;
    border: 3px solid var(--bg-color);
}

.timeline-content h4 {
    font-family: var(--font-family-headings);
    margin-bottom: 5px;
}

.timeline-content ul {
    list-style-position: inside;
    padding-left: 5px;
    margin-top: 10px;
}

.timeline-content li {
    margin-bottom: 5px;
}

/* ---
Services Section
--- */
.services-section {
    background-color: var(--bg-secondary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-color);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px var(--shadow-color);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-family: var(--font-family-headings);
    margin-bottom: 15px;
}

/* ---
Stats Section
--- */
.stats-section {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
}

.stat-item h3 {
    font-family: var(--font-family-headings);
    font-size: 3rem;
    font-weight: 700;
}

/* ---
Testimonials Section
--- */
.testimonials-section { background-color: var(--bg-color); }
.testimonial-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: var(--bg-secondary-color);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.testimonial-slide {
    display: none;
    text-align: center;
}

.testimonial-slide.active {
    display: block;
}

.testimonial-slide p {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 20px;
}

.testimonial-slide h4 {
    font-family: var(--font-family-headings);
    color: var(--primary-color);
}

.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}

.slider-controls button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    transition: color var(--transition-speed);
}

.slider-controls button:hover {
    color: var(--primary-color);
}

/* ---
Blog Section
--- */
.blog-section {
    background-color: var(--bg-secondary-color);
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.blog-card {
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform var(--transition-speed);
}
.blog-card:hover {
    transform: translateY(-5px);
}
.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.blog-content {
    padding: 20px;
}
.blog-date {
    font-size: 0.8rem;
    color: var(--text-secondary-color);
    margin-bottom: 10px;
    display: block;
}
.blog-content h3 {
    font-family: var(--font-family-headings);
    margin-bottom: 10px;
}
.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
.read-more i {
    margin-left: 5px;
    transition: transform var(--transition-speed);
}
.read-more:hover i {
    transform: translateX(5px);
}

/* ---
Contact Section
--- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--bg-secondary-color);
    padding: 40px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family-body);
}

.contact-info h3 {
    font-family: var(--font-family-headings);
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 15px;
}

.contact-info i {
    color: var(--primary-color);
    margin-right: 10px;
}

.map-container {
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
}

/* Form Submission Status */
#form-result {
    margin-top: 20px;
    margin-bottom: 0;
    display: none; /* Hidden by default */
    text-align: center;
    font-weight: 600;
}

#form-result.success {
    color: #28a745;
}

#form-result.error {
    color: #dc3545;
}

/* ---
Founder Section
--- */
.founder-section {
    background-color: var(--bg-secondary-color);
}

.founder-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: center;
}

.founder-image {
    text-align: center;
}

.founder-img {
    max-width: 100%;
    height: auto;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.founder-title {
    font-family: var(--font-family-headings);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.founder-name {
    font-family: var(--font-family-headings);
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.founder-role {
    font-size: 1.2rem;
    color: var(--text-secondary-color);
    margin-bottom: 20px;
    font-style: italic;
}

.founder-summary {
    margin-bottom: 30px;
}

/* ---
Footer
--- */
.footer {
    background-color: var(--bg-color);
    padding-top: 0;
    border-top: 1px solid var(--border-color);
    position: relative; /* Ensure it's in the same stacking context as main */
    z-index: 1; /* Place it above the fixed particle background */
}

.footer-cta {
    padding: 60px 20px;
    text-align: center;
    background: var(--bg-secondary-color);
}

.footer-cta h2 {
    font-family: var(--font-family-headings);
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.footer-cta p {
    font-size: 1.1rem;
    color: var(--text-secondary-color);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.footer-main {
    padding: 60px 0 40px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-column h4 {
    font-family: var(--font-family-headings);
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-column p {
    color: var(--text-secondary-color);
    margin-bottom: 20px;
}

.footer-column p i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.footer-column p a,
.contact-info p a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-speed);
}

.footer-column p a:hover,
.contact-info p a:hover {
    color: var(--primary-color);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-secondary-color);
    margin-bottom: 12px;
    display: inline-block;
    transition: color var(--transition-speed), transform var(--transition-speed);
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-social a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-secondary-color);
    color: var(--text-secondary-color);
    font-size: 1.1rem;
    margin-right: 10px;
    text-decoration: none;
    transition: background-color var(--transition-speed), color var(--transition-speed), transform var(--transition-speed);
}

.footer-social a:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

.newsletter-form {
    display: flex;
    margin-top: 10px;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    border-radius: 5px 0 0 5px;
    outline: none;
}

.newsletter-form button {
    padding: 12px 15px;
    border: 1px solid var(--primary-color);
    background: var(--primary-color);
    color: #fff;
    cursor: pointer;
    border-radius: 0 5px 5px 0;
    transition: background-color var(--transition-speed);
}

.newsletter-form button:hover {
    background-color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary-color);
}
 

/* ---
Responsive Design
--- */
@media (max-width: 992px) {
    .about-content, .contact-wrapper {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    .founder-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .founder-image {
        margin-bottom: 30px;
    }
    .founder-img {
        max-width: 250px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-secondary-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 2.5rem 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .footer-grid { text-align: center; }
    .footer-social { justify-content: center; }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .cta-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .btn-secondary {
        margin-left: 0;
        margin-top: 15px;
    }
}