/**
 * =========================================================================
 * STYLES FOR: Workout Plans Page (Lean & Focused Version)
 * WEBSITE: repcave.com
 * =========================================================================
 */

/* ==========================================================================
   1. Design System & General Styling (Base for the page)
   ========================================================================== */

:root {
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    --color-primary: #E53935;
    --color-primary-dark: #C62828;
    --color-text-dark: #2c3e50;
    --color-text-light: #5a6a7a;
    --color-bg-light: #FFFFFF;
    --color-bg-alt: #F9FAFB;
    --color-border: #EAECEF;
    --section-padding: 6rem 0;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* General Tags & Helpers */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-primary); font-weight: 700; line-height: 1.2; margin: 0; color: var(--color-text-dark); }
h1 span, h2 span { color: var(--color-primary); }
p { margin: 0; font-size: 1.1rem; line-height: 1.7; color: var(--color-text-light); }
.section-title { font-size: 2.8rem; text-align: center; margin-bottom: 1.25rem; }
.section-subtitle { text-align: center; margin-bottom: 3.5rem; max-width: 700px; margin-left: auto; margin-right: auto; }
.full-width-background { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }
.button { display: inline-block; padding: 14px 32px; font-size: 1rem; text-decoration: none; border-radius: 8px; transition: all 0.3s ease; font-weight: 600; cursor: pointer; text-align: center; border: 2px solid transparent; }
.primary-button { background-color: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.primary-button:hover { background-color: var(--color-primary-dark); border-color: var(--color-primary-dark); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.secondary-button { background-color: #fff; color: var(--color-text-dark); border-color: var(--color-border); }
.secondary-button:hover { background-color: var(--color-text-dark); color: #fff; border-color: var(--color-text-dark); transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ==========================================================================
   2. Section-Specific Styles (Lean Version)
   ========================================================================== */

/* --- Hero Section --- */
.plans-hero-section { background-color: var(--color-bg-alt); padding: var(--section-padding); text-align: center; }
.plans-hero-section .hero-title { font-size: 3.8rem; margin-bottom: 1.5rem; }
.plans-hero-section .hero-description { font-size: 1.25rem; max-width: 650px; margin-left: auto; margin-right: auto; margin-bottom: 2.5rem; }

/* --- Featured Workouts Section --- */
.featured-workouts-section { background-color: var(--color-bg-light); padding: var(--section-padding); }
.workouts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.workout-card { background-color: #fff; border: 1px solid var(--color-border); border-radius: 12px; box-shadow: var(--shadow-md); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; overflow: hidden; }
.workout-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); }
.workout-image { width: 100%; height: 220px; object-fit: cover; }
.workout-card h3, .workout-card p, .workout-card .button { margin-left: 30px; margin-right: 30px; }
.workout-title { font-size: 1.5rem; margin-top: 1.5rem; margin-bottom: 0.75rem; }
.workout-description { font-size: 1rem; color: var(--color-text-light); margin-bottom: 1.5rem; flex-grow: 1; }
.workout-card .button { margin-bottom: 30px; margin-top: auto; }

/* --- Plan Builder Section --- */
.plan-builder-section { background-color: var(--color-bg-alt); padding: var(--section-padding); }
.quiz-box { background-color: var(--color-bg-light); border: 1px solid var(--color-border); border-radius: 12px; padding: 2.5rem; max-width: 800px; margin: 0 auto 4rem auto; text-align: center; box-shadow: var(--shadow-lg); }
.quiz-icon { font-size: 2.5rem; color: var(--color-primary); margin-bottom: 1rem; }
.quiz-title { font-size: 1.8rem; margin-bottom: 1rem; }
.quiz-description { max-width: 600px; margin: 0 auto 1.5rem auto; }
.tips-container { max-width: 900px; margin: 0 auto; text-align: center; }
.tips-heading { font-size: 1.5rem; margin-bottom: 2.5rem; }
.tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; text-align: center; }
.tip-item .tip-icon { font-size: 2rem; color: var(--color-primary); margin-bottom: 1rem; }
.tip-item .tip-title { font-size: 1.2rem; margin-bottom: 0.5rem; }
.tip-item p { font-size: 0.95rem; line-height: 1.6; }

/* --- Final CTA & Newsletter Section --- */
.plans-final-cta-section { background-color: var(--color-text-dark); padding: var(--section-padding); text-align: center; }
.plans-final-cta-section .section-title, .plans-final-cta-section .section-subtitle { color: #fff; }
.newsletter-form-wrapper { margin-top: 2rem; }
.newsletter-form { display: flex; max-width: 500px; margin: 0 auto; gap: 10px; }
.newsletter-input { flex-grow: 1; padding: 14px 20px; border-radius: 8px; border: 1px solid var(--color-border); font-size: 1rem; }
.newsletter-submit { white-space: nowrap; }

/* ==========================================================================
   3. Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
    :root { --section-padding: 4rem 0; }
    .section-title { font-size: 2.2rem; }
    .plans-hero-section .hero-title { font-size: 2.8rem; }
    .workouts-grid { grid-template-columns: 1fr; }
}

/* General Styling - Fix Overflow */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #fff;
    overflow-x: hidden; /* Ensure no horizontal overflow */
    width: 100%; /* Explicitly set body width */
}

/* Full-Width Background Fix */
.full-width-background {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    /* Add this to handle scrollbar width on desktop */
    margin-right: calc(-50vw + 8px); /* Adjust for scrollbar width (typically 8px on desktop) */
}

/* Container Adjustment */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%; /* Ensure container doesn’t exceed viewport */
}

/* Specific Section Adjustments (Apply to Both Pages) */
.plans-hero-section.full-width-background,
.plans-starters-section.full-width-background,
.plans-equipment-section.full-width-background,
.plans-quiz-section.full-width-background,
.plans-newsletter-section.full-width-background,
.plans-cta-section.full-width-background,
.contact-hero-section.full-width-background,
.contact-newsletter-section.full-width-background,
.contact-cta-section.full-width-background {
    overflow-x: hidden; /* Prevent horizontal overflow in these sections */
    padding: 80px 0; /* Maintain existing padding */
}

@media (max-width: 768px) {
    .full-width-background {
        margin-right: -50vw; /* Reset margin on mobile to avoid unnecessary adjustment */
    }
}

/* Ensure No Unintended Widths or Margins */
.site-main {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Additional Debugging - Remove if Not Needed */
* {
    box-sizing: border-box;
    /* Uncomment to debug and identify overflow elements */
    /* outline: 1px solid red; */
}