/* General Resets and Base Styles */
:root {
    /* Define color palette using CSS variables for easy theme management */
    --primary-color: #e44d26; /* A vibrant orange/red, main accent */
    --secondary-color: #333; /* Dark gray for footer/secondary elements */
    --accent-color: #f7a072; /* Lighter orange for highlights */
    --text-light: #f4f4f4; /* Light text on dark backgrounds */
    --text-dark: #222; /* Dark text (used sparingly if background is light) */
    --bg-dark: #1a1a1a; /* Very dark background for main sections */
    --bg-light: #ffffff; /* White background (not used much in this dark theme) */
    --card-bg: #282828; /* Slightly lighter dark for cards */
    --border-color: #444; /* Border color for subtle separation */
}

/* Universal box-sizing for easier layout calculations */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif; /* Body text font */
    line-height: 1.6;
    color: var(--text-light); /* Default text color */
    background-color: var(--bg-dark); /* Default background color */
}

/* Reusable container for content width limitation and centering */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Horizontal padding for smaller screens */
}

/* Reusable padding for sections */
.section-padding {
    padding: 80px 0;
}

/* Heading styles */
h1, h2, h3 {
    font-family: 'Oswald', sans-serif; /* Headings font */
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-light);
    text-align: center;
}
/* Giving color to the end text of headings */
h1 span .h-color
h2 span .h-color
h3 span .h-color {
    color: var(--primary-color) !important;
}

h1 {
    font-size: 3.5em; /* Larger for hero section */
    line-height: 1.1;
}

h2 {
    font-size: 2.8em;
}

h3 {
    font-size: 1.8em;
}

p {
    margin-bottom: 15px;
}

/* Link styling */
a {
    text-decoration: none;
    color: var(--primary-color);
}

/* Image responsive styling */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.3s ease; /* Smooth hover effects */
    cursor: pointer;
    font-size: 1em;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-3px); /* Subtle lift effect */
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-3px);
}


/* Header and Navigation */
header {
    background-color: var(--bg-dark);
    padding: 20px 0;
    position: sticky; /* Keeps header visible on scroll */
    top: 0;
    z-index: 1000; /* Ensures header is on top of other content */
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

header .container {
    display: flex;
    justify-content: space-between; /* Logo to left, nav to right */
    align-items: center;
}

.logo-image {
    width: auto;
    height: 40px;
    margin-right: 20px;
}


.logo {
    display: flex;
    align-items: center;
}

.logo a {
    font-family: 'Oswald', sans-serif;
    font-size: 2em;
    font-weight: 900;
    color: var(--text-light);
    text-transform: uppercase;
}

.nav-links {
    list-style: none;
    display: flex; /* Horizontal navigation links */
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 700;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hamburger menu icon for mobile */
.hamburger {
    display: none; /* Hidden by default on larger screens */
    flex-direction: column;
    cursor: pointer;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 4px 0;
    transition: 0.4s;
}

/* Hero Section */
.hero-section {
    /* Unsplash image placeholder for background */
    background: url("images/gym-pic.jpg") no-repeat center center/cover;
    height: 90vh; /* Full viewport height */
    display: flex;
    align-items: center; /* Vertically center content */
    position: relative;
    color: var(--text-light);
    text-align: center;
}

/* Dark overlay for better text readability on hero image */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative; /* Brings content above the overlay */
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.hero-content h1 {
    font-size: 4.5em;
    margin-bottom: 25px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7); /* Text shadow for depth */
}

.hero-content p {
    font-size: 1.3em;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Membership Section */
.membership-section {
    background-color: var(--bg-dark);
}

.membership-section h2 {
    margin-bottom: 50px;
}

.membership-cards {
    display: flex; /* Uses Flexbox for horizontal layout of cards */
    justify-content: center;
    gap: 30px; /* Space between cards */
    flex-wrap: wrap; /* Allows cards to wrap to next line on smaller screens */
}

.membership-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 40px 30px;
    text-align: center;
    flex: 1; /* Allows cards to grow/shrink, but respects min/max width */
    min-width: 300px;
    max-width: 350px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.membership-card:hover {
    transform: translateY(-10px); /* Lift effect on hover */
    border-color: var(--primary-color);
}

.membership-card h3 {
    color: var(--primary-color);
    font-size: 2.2em;
    margin-bottom: 25px;
}

.membership-card .price {
    font-family: 'Oswald', sans-serif;
    font-size: 3.5em;
    font-weight: 900;
    color: var(--text-light);
    margin-bottom: 30px;
}

.membership-card .price span {
    font-size: 0.4em;
    font-weight: 400;
    color: var(--accent-color);
}

.membership-card ul {
    list-style: none;
    margin-bottom: 40px;
    text-align: left;
    padding: 0 20px;
}

.membership-card ul li {
    padding: 10px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    color: var(--text-light);
}

.membership-card ul li:last-child {
    border-bottom: none;
}

.membership-card ul li i {
    margin-right: 15px;
    color: var(--primary-color); /* Checkmark icon color */
}

.membership-card ul li .fa-times-circle {
    color: #cc0000; /* Red color for unchecked features */
}

/* Featured card styling */
.membership-card.featured {
    background-color: var(--primary-color);
    border-color: var(--text-light);
    color: var(--bg-dark);
    transform: scale(1.05); /* Slightly larger to stand out */
}

.membership-card.featured h3,
.membership-card.featured .price,
.membership-card.featured .price span,
.membership-card.featured ul li {
    color: var(--text-light); /* Override text color for featured card */
}

.membership-card.featured .btn-primary {
    background-color: var(--text-light);
    color: var(--primary-color);
    border-color: var(--text-light);
}

.membership-card.featured .btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.membership-card.featured ul li i {
    color: var(--text-light);
}

.location {
    margin-top: 30px;
    font-size: 0.9em;
    color: var(--accent-color);
}

/* Classes Section */
.classes-section {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.classes-section .subtitle {
    text-align: center;
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto 50px auto;
    color: var(--accent-color);
}

.class-grid {
    display: grid; /* Uses CSS Grid for a flexible class layout */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive columns */
    gap: 30px; /* Space between grid items */
}

.class-item {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden; /* Ensures image corners are rounded */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
    transition: transform 0.3s ease;
}

.class-item:hover {
    transform: translateY(-5px); /* Subtle lift on hover */
}

.class-item img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* Ensures images fill their space nicely */
}

.class-item h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.6em;
    color: var(--primary-color);
}

.class-item p {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 10px;
}

.class-item span {
    display: block;
    color: var(--accent-color);
    font-size: 0.9em;
    margin-bottom: 20px;
}


/* Contact Section */
.contact-section {
    background-color: var(--bg-dark);
}

.contact-section .subtitle {
    text-align: center; 
    font-size: 1.1em;
    max-width: 600px;
    margin: 0 auto 50px auto;
    color: var(--accent-color);
}

.about-section .subtitle {
    text-align: center;
    font-size: 1.1em;
    max-width: 900px;
    margin: 0 auto 50px auto;
    color: var(--accent-color);
}
.about-section .subtitle1 {
    text-align: center;
    font-size: 1.4em;
    max-width: 900px;
    margin: 0 auto 50px auto;
    color: #f4f4f4;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--text-light);
    font-size: 1.1em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;

    
}
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]::placeholder,
.form-group input[type="email"]::placeholder,
.form-group input[type="tel"]::placeholder,
.form-group textarea::placeholder {
    color: #888;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(228, 77, 38, 0.3); /* Highlight on focus */
}

.contact-form button[type="submit"] {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    border-radius: 5px;
}

/* Container holding the 3 items side-by-side */
.trainer-grid {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Individual trainer card styling */
.trainer-item {
    flex: 1;
    background: transparent;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    /*box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);*/
    transition: transform 0.3s ease;
}

/* Optional hover effect to lift the card */
.trainer-item:hover {
    transform: translateY(-5px);
}

/* Keeps all external Unsplash images identical in size */
.trainer-item img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Trainer name styling */
.trainer-item h4 {
    font-size: 1.3rem;
    margin: 10px 0 5px;
    color: var(--primary-color);
}

/* Trainer description styling */
.trainer-item p {
    font-size: 0.95rem;
    color: #f3e8e8;
    margin: 0;
}

/* Responsive fix for tablets and mobile screens */
@media (max-width: 768px) {
    .trainer-grid {
        flex-direction: column;
        gap: 25px;
    }
}


.location {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    padding: 0 15px;
    font-size: 1.3rem;
}
.location iframe {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 4 / 3;
    height: auto; 
    border: none;
    border-radius: 12px;
    overflow: hidden;
}
/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allows footer content to wrap */
}

footer p {
    margin: 0;
    font-size: 0.9em;
}

.social-links a {
    color: var(--text-light);
    margin-left: 20px;
    font-size: 1.5em;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Chatbot Placeholder */
.chatbot-widget-container {
    position: fixed; /* Fixed position for floating element */
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.chatbot-toggle-button {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 50%; /* Circular button */
    width: 60px;
    height: 60px;
    font-size: 1.8em;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.chatbot-toggle-button:hover {
    transform: scale(1.1);
    background-color: var(--accent-color);
}

.chatbot-box {
    position: absolute;
    bottom: 80px; /* Positions above the toggle button */
    right: 0;
    width: 350px;
    height: 400px;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column; /* Stack header, body, footer */
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    visibility: visible; /* Tells the browser the box is active */
    pointer-events: auto;
}

.chatbot-box.hidden {
    opacity: 0;
    transform: translateY(20px); /* Hides it slightly below its final position */
    pointer-events: none;
    visibility: hidden; /* Disables interaction when hidden */
}

.chatbot-header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.chatbot-header h3 {
    margin: 0;
    font-size: 1.3em;
    text-align: left;
}

.chatbot-header .close-chatbot {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.8em;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.3s ease;
}

.chatbot-header .close-chatbot:hover {
    color: var(--bg-dark);
}

.chatbot-body {
    flex-grow: 1; /* Allows body to take up remaining space */
    padding: 20px;
    overflow-y: auto; /* Enables scrolling for chat messages */
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-size: 0.95em;
}

.chatbot-body p {
    background-color: #3a3a3a; /* Message bubble background */
    padding: 10px 15px;
    border-radius: 15px 15px 15px 0; /* Rounded corners for messages */
    display: inline-block;
    max-width: 80%;
    margin-bottom: 10px;
}

.chatbot-footer {
    display: flex;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--card-bg);
}

.chatbot-footer input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-size: 0.95em;
    margin-right: 10px;
}

.chatbot-footer input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.chatbot-footer button {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.chatbot-footer button:hover {
    background-color: var(--accent-color);
}


/* Media Queries for Responsiveness */
@media (max-width: 992px) {
    .membership-cards {
        flex-direction: column; /* Stack membership cards vertically */
        align-items: center;
    }

    .membership-card {
        margin-bottom: 30px;
    }

    .hero-content h1 {
        font-size: 3.5em;
    }

    /* Adjust class grid for slightly smaller screens */
    .class-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Show hamburger menu, hide regular nav links */
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none; /* Hide default nav */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 80px; /* Position below header */
        left: 0;
        background-color: var(--bg-dark);
        box-shadow: 0 5px 10px rgba(0,0,0,0.3);
        padding: 20px 0;
        border-top: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex; /* Show nav links when hamburger is active */
    }

    .nav-links li {
        margin: 10px 0;
        text-align: center;
    }

    .nav-links a {
        padding: 10px 0;
        display: block;
    }

    .hero-content h1 {
        font-size: 2.8em;
    }

    .hero-content p {
        font-size: 1.1em;
    }

    .section-padding {
        padding: 60px 0;
    }

    h1 {
        font-size: 3em;
    }

    h2 {
        font-size: 2.2em;
    }

    h3 {
        font-size: 1.5em;
    }

    footer .container {
        flex-direction: column; /* Stack footer items */
        gap: 20px;
    }

    .social-links {
        margin-top: 15px;
    }

    /* Make chatbot box wider on small screens */
    .chatbot-box {
        width: 80vw;
        max-width: 350px; /* Occupy most of the viewport width */
        right: 10px;
        left: auto; 
        height: 350px;
    }

}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.2em;
    }
    .hero-content p {
        font-size: 1em;
    }

    .chatbot-toggle-button {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
    }

    .chatbot-widget-container {
        bottom: 15px;
        right: 15px;
    }

    .chatbot-box {
        position: fixed;
        width: 90vw;
        height: 80vh;
        bottom: 80px;
        right: 5vw;
        left: 5vw;
        margin: auto;
        transform: none;
    }

    .chatbot-body {
        padding: 15px;
    }

    .chatbot-body .message {
        max-width: 90%;
    }


    .membership-card {
        min-width: unset; /* Remove min-width to allow full flexibility */
        width: 90%; /* Take up most of the parent width */
    }
}
    /* Add/confirm these styles in your style.css for chatbot messages */

.chatbot-body .message {
    margin-bottom: 10px;
    clear: both; /* Clear floats for proper message stacking */
    max-width: 80%;
    word-wrap: break-word; /* Ensure long words break */
    font-size: 0.95em;
    padding: 0;
    min-height: 20px;
}

.chatbot-body .message p {
    margin: 0;
    padding: 10px 15px;
    border-radius: 15px;
    line-height: 1.4;
    display: inline-block;
    max-width: 100%;
}

.chatbot-body .user-message {
    float: right;
    color: var(--primary-color);
    border-radius: 15px 15px 0 15px; 
    clear: both;
    width: fit-content;
    margin-right: 0;
    margin-left: auto;
}

.chatbot-body .bot-message {
    float: left;
    color: var(--text-light);
    border-radius: 15px 15px 15px 0;
    display: block;
    clear: both;
    width: fit-content;
    margin-left: 0;
    margin-right: auto;
}

    
