/* --- Root Variables for Theme Management --- */
:root {
    /* Light Theme Colors */
    --background-color: #f8f8f8; /* Off-white for background */
    --text-color: #333;        /* Dark gray for general text */
    --heading-color: #0056b3;  /* A good shade of blue for headings */
    --accent-color: #007bff;   /* Brighter blue for buttons/links */
    --border-color: #ddd;      /* Light gray for borders */
    --card-background: #ffffff; /* White for card backgrounds */
    --shadow-color: rgba(0, 0, 0, 0.1); /* Subtle shadow */

    /* Dark Theme Colors */
    --dark-background-color: #2c2c2c;
    --dark-text-color: #e0e0e0;
    --dark-heading-color: #6daffc; /* A lighter blue for dark mode headings */
    --dark-accent-color: #8ab4f8; /* A lighter, slightly desaturated blue for dark mode accents */
    --dark-border-color: #444;
    --dark-card-background: #3a3a3a;
    --dark-shadow-color: rgba(0, 0, 0, 0.3);

    /* Transitions */
    --transition-speed: 0.3s ease-in-out;
}

/* --- Dark Theme Specific Styles (Applied via JS adding 'dark-mode' class to body) --- */
body.dark-mode {
    background-color: var(--dark-background-color);
    color: var(--dark-text-color);
}

/* Ensure general text color change for common elements */
body.dark-mode header,
body.dark-mode .hero-section h2,
body.dark-mode h2,
body.dark-mode .plan-card,
body.dark-mode .service-item,
body.dark-mode .story-item,
body.dark-mode .footer {
    color: var(--dark-text-color); /* Default text color in dark mode */
}

/* Specific heading colors for dark mode */
body.dark-mode h1,
body.dark-mode h3 {
    color: var(--dark-heading-color);
}

body.dark-mode header {
    background-color: var(--dark-card-background);
    border-bottom: 1px solid var(--dark-border-color);
}

body.dark-mode .logo {
    color: var(--dark-heading-color);
}

/* Navbar links initial and hover state in dark mode */
body.dark-mode .navbar a {
    color: var(--dark-text-color);
    /* background-color: #2c2c2c; */
}
body.dark-mode #navbar{
    background-color: #3a3a3a;
}
body.dark-mode .navbar a:hover {
    color: var(--dark-accent-color);
}

/* General links initial and hover state in dark mode */
body.dark-mode a {
    color: var(--dark-accent-color);
}
body.dark-mode a:hover {
    color: var(--dark-heading-color); /* A slightly different blue on hover */
    text-decoration: underline;
}

/* Theme toggle button in dark mode */
body.dark-mode .theme-toggle-button {
    background-color: var(--dark-card-background);
    border: 1px solid var(--dark-border-color);
    color: var(--dark-text-color);
}
body.dark-mode .theme-toggle-button:hover {
    background-color: var(--dark-border-color);
    color: var(--dark-accent-color);
}

/* Button styles in dark mode */
body.dark-mode .btn.primary-btn,
body.dark-mode .btn.secondary-btn,
body.dark-mode .btn.razorpay-button {
    background-color: var(--dark-accent-color);
    color: var(--dark-background-color); /* Text should be dark against bright button */
    border-color: var(--dark-accent-color);
}
body.dark-mode .btn:hover {
    filter: brightness(1.15); /* Slightly brighter on hover */
}

/* Card-like elements in dark mode */
body.dark-mode .plan-card,
body.dark-mode .service-item,
body.dark-mode .story-item {
    background-color: var(--dark-card-background);
    border: 1px solid var(--dark-border-color);
    box-shadow: 0 4px 8px var(--dark-shadow-color);
}

body.dark-mode .plan-card.featured-plan {
    border: 2px solid var(--dark-accent-color);
}

/* Footer in dark mode */
body.dark-mode .footer {
    background-color: var(--dark-card-background);
    border-top: 1px solid var(--dark-border-color);
}

/* Alternate section backgrounds in dark mode */
body.dark-mode section:nth-of-type(even) {
    background-color: var(--dark-card-background);
}

/* Icons in dark mode */
body.dark-mode .service-item .icon-img {
    filter: brightness(1.2); /* Make icons slightly brighter against dark background */
}

/* --- General Body & Typography --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth; /* Smooth scrolling for navigation links */
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: var(--heading-color);
    margin-bottom: 20px;
    transition: color var(--transition-speed); /* Smooth color change for headings */
}

h2 {
    font-size: 2.5em;
    text-align: center;
    padding-bottom: 20px;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
    transition: background-color var(--transition-speed); /* Smooth color change for underline */
}

p {
    margin-bottom: 15px;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    text-decoration: underline;
    color: #0056b3; /* Slightly darker blue on hover in light mode */
}

/* --- Header & Navigation --- */
.header {
    background-color: var(--card-background);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: background-color var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* Needed for absolute positioning of mobile menu */
}

.logo {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--heading-color);
    transition: color var(--transition-speed);
}

.navbar ul {
    list-style: none;
    display: flex; /* Default to flex for desktop */
}

.navbar li {
    margin-left: 25px;
}

.navbar a {
    color: var(--text-color);
    font-weight: bold;
    font-size: 1.05em;
    padding: 5px 0;
    position: relative;
    transition: color var(--transition-speed);
}

.navbar a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width var(--transition-speed), background-color var(--transition-speed);
}

.navbar a:hover::after {
    width: 100%;
}

.theme-toggle-button {
    background: none;
    border: 1px solid var(--border-color);
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed);
}

.theme-toggle-button:hover {
    background-color: var(--border-color);
}

/* --- Hamburger Menu Styling (Desktop: Hidden) --- */
.hamburger-menu {
    display: none; /* Hide by default on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001; /* Ensure it's above other elements */
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-color); /* Bar color */
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

body.dark-mode .hamburger-menu .bar {
    background-color: var(--dark-text-color); /* Bar color in dark mode */
}

/* Animation for when menu is active (hamburger transforms to X) */
.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}


/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    transition: background-color var(--transition-speed), transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border: none; /* Remove default button border */
}

.primary-btn {
    background-color: var(--accent-color);
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.3);
}

.primary-btn:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 123, 255, 0.4);
}

.secondary-btn {
    background-color: #6c757d; /* A neutral gray */
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(108, 117, 125, 0.3);
    margin: 10px;
}

.secondary-btn:hover {
    background-color: #5a6268; /* Darker gray on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(108, 117, 125, 0.4);
}

.razorpay-button {
    background-color: #4CAF50; /* Green for payment */
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color var(--transition-speed);
    box-shadow: 0 4px 6px rgba(76, 175, 80, 0.3);
}

.razorpay-button:hover {
    background-color: #45a049; /* Darker green on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(76, 175, 80, 0.4);
}


/* --- Sections General Styling --- */
section {
    padding: 80px 0;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

section:nth-of-type(even) {
    background-color: var(--card-background); /* Lighter background for alternate sections */
}

/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/hero-bg.jpg') no-repeat center center/cover; /* Placeholder background image */
    color: white;
    text-align: center;
    padding: 100px 0;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* Needed for any overlays/animations */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--accent-color); /* Blue overlay */
    opacity: 0.2; /* Adjust opacity as needed */
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative; /* Ensure content is above overlay */
    z-index: 1;
}

.hero-content h2 {
    color: white;
    font-size: 3.5em;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: #e0e0e0;
}

/* --- About Section --- */
.about-section {
    text-align: center;
}

.about-content {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.profile-photo {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--accent-color);
    box-shadow: 0 8px 15px var(--shadow-color);
    transition: transform 0.3s ease-in-out, border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.profile-photo:hover {
    transform: scale(1.03); /* Subtle zoom on hover */
}

.about-text {
    max-width: 600px;
    text-align: left;
}

/* --- Services Section --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-item {
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow-color);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color var(--transition-speed), border-color var(--transition-speed);
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px var(--shadow-color);
}

/* Styling for the service item image/icon */
.service-item .icon-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-item .icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensures the whole image is visible */
    transition: filter var(--transition-speed);
}

.service-item h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

/* --- Success Stories Section --- */
.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.story-item {
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow-color);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color var(--transition-speed), border-color var(--transition-speed);
}

.story-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px var(--shadow-color);
}

.before-after-images {
    width: 100%;
    height: 250px; /* Fixed height for image container */
    overflow: hidden; /* Ensure image doesn't overflow */
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* For potential overlay effects */
}

.before-after-photo {
    width: 100%; /* Make image fill container width */
    height: 100%; /* Make image fill container height */
    object-fit: cover; /* Cover the area, cropping if necessary */
    display: block; /* Remove extra space below image */
    transition: transform 0.3s ease-in-out;
}

.before-after-images:hover .before-after-photo {
    transform: scale(1.05); /* Subtle zoom on image hover */
}

.story-text {
    font-style: italic;
    margin-bottom: 10px;
}

.story-name {
    font-weight: bold;
    color: var(--accent-color);
}

/* --- Membership Plans Section --- */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    justify-content: center;
}

.plan-card {
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow-color);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color var(--transition-speed), background-color var(--transition-speed);
}

.plan-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px var(--shadow-color);
}

.plan-card h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: var(--heading-color);
}

.plan-price {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.plan-price .price-value {
    font-size: 1.2em; /* Make the actual value slightly larger */
}

.plan-card ul {
    list-style: none;
    text-align: left;
    margin-bottom: 30px;
}

.plan-card ul li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.plan-card ul li::before {
    content: '✅'; /* Checkmark icon */
    position: absolute;
    left: 0;
    color: #28a745; /* Green checkmark */
}

.plan-card.featured-plan {
    border: 2px solid var(--accent-color);
    transform: scale(1.05);
    box-shadow: 0 8px 16px var(--shadow-color);
    position: relative;
    z-index: 1; /* Bring featured plan slightly forward */
}

.plan-card.featured-plan:hover {
    transform: scale(1.08) translateY(-5px);
}

.money-back-guarantee {
    font-size: 0.9em;
    color: #dc3545; /* Red for emphasis */
    margin-top: 15px;
    font-weight: bold;
}

/* --- CTA Section --- */
.cta-section {
    text-align: center;
    padding: 60px 0;
    background-color: var(--card-background);
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* --- Footer --- */
.footer {
    background-color: var(--card-background);
    color: var(--text-color);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    transition: background-color var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-content > div {
    flex: 1;
    min-width: 250px;
    padding: 10px;
}

.footer h3 {
    font-size: 1.4em;
    margin-bottom: 15px;
    color: var(--heading-color);
}

.contact-info p i,
.social-media a i {
    font-size: 1.2em; /* Adjust icon size as needed */
    color: var(--accent-color); /* Ensure icons use accent color */
    margin-right: 8px; /* Spacing between icon and text */
    transition: color var(--transition-speed);
}

body.dark-mode .contact-info p i,
body.dark-mode .social-media a i {
    color: var(--dark-accent-color); /* Ensure icons use dark accent color in dark mode */
}


.map-embed iframe {
    width: 100%;
    max-width: 500px; /* Limit map width */
    height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--shadow-color);
}

.copyright {
    margin-top: 20px;
    font-size: 0.9em;
    color: #666;
}

/* --- Fade-in Section Transition (for JavaScript) --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- Responsive Design (Media Queries) --- */

/* Tablets and smaller desktops (992px and below) */
@media (max-width: 992px) {
    .navbar li {
        margin-left: 15px;
    }

    .hero-content h2 {
        font-size: 2.8em;
    }

    .hero-content p {
        font-size: 1.1em;
    }

    .about-content {
        flex-direction: column;
        gap: 20px;
    }

    .profile-photo {
        width: 250px;
        height: 250px;
    }

    .about-text {
        text-align: center;
    }

    .services-grid,
    .story-grid,
    .plans-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
    }

    .footer-content > div {
        min-width: unset;
        width: 100%;
    }
}

/* Mobile phones (768px and below) */
@media (max-width: 768px) {
    .header .container {
        flex-direction: row; /* Keep logo, hamburger, theme toggle in a row */
        justify-content: space-between; /* Space them out */
        align-items: center;
    }

    .navbar {
        /* Mobile menu specific styles */
        position: absolute;
        top: 100%; /* Position below the header */
        left: 0;
        width: 100%;
        background-color: var(--card-background); /* Menu background */
        box-shadow: 0 5px 10px var(--shadow-color);
        border-top: 1px solid var(--border-color);
        display: none; /* Hidden by default */
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.3s ease-out, transform 0.3s ease-out, background-color var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
        flex-direction: column; /* Stack menu items vertically */
        z-index: 999; /* Below header, above content */
        padding: 20px 0;
    }

    /* Styles when menu is active */
    .navbar.active {
        display: flex; /* Show when active */
        opacity: 1;
        transform: translateY(0);
    }

    .navbar ul {
        flex-direction: column;
        width: 100%;
        align-items: center; /* Center menu items */
    }

    .navbar li {
        margin: 10px 0; /* Vertical spacing */
        width: 100%;
        text-align: center;
    }

    .navbar a {
        padding: 10px 0;
        display: block; /* Make links full width for easier tapping */
        font-size: 1.1em;
    }

    .navbar a::after {
        display: none; /* Hide underline on mobile menu items */
    }

    /* Show hamburger menu and move theme toggle */
    .hamburger-menu {
        display: flex; /* Show hamburger */
        order: -1; /* Place it at the beginning of the flex container */
    }

    .theme-toggle-button {
        margin-top: 0; /* Remove top margin */
        order: 1; /* Place it at the end */
    }

    .logo {
        position: absolute; /* Position logo to center it */
        left: 50%;
        transform: translateX(-50%);
    }

    .hero-section {
        padding: 80px 0;
        min-height: 400px;
    }

    .hero-content h2 {
        font-size: 2.2em;
    }

    .hero-content p {
        font-size: 1em;
    }

    h2 {
        font-size: 2em;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .map-embed iframe {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    h2 {
        font-size: 1.8em;
    }

    .hero-content h2 {
        font-size: 1.8em;
    }

    .hero-content p {
        font-size: 0.9em;
    }

    .profile-photo {
        width: 200px;
        height: 200px;
    }

    .services-grid,
    .story-grid,
    .plans-grid {
        grid-template-columns: 1fr; /* Stack columns on very small screens */
    }

    .plan-card,
    .service-item,
    .story-item {
        padding: 20px;
    }
}