/* ============================================
   PPL WORKOUT SCHEDULE - STYLESHEET
   Clean, DRY, Modular CSS Architecture
   ============================================ */

/* ===== CSS VARIABLES (DESIGN TOKENS) ===== */
:root {
    /* Color Palette */
    --color-primary: #1F4788;
    --color-secondary: #2E5C8A;
    --color-tertiary: #3D6FA3;
    --color-accent: #FF6B35;
    --color-accent-hover: #E55A2A;
    --color-success: #28A745;

    /* Backgrounds */
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --bg-dark: #1A1A2E;
    --bg-warmup: linear-gradient(135deg, #FFF3E0, #FFE0B2);

    /* Text Colors */
    --text-dark: #212529;
    --text-muted: #6C757D;
    --text-light: rgba(255, 255, 255, 0.9);
    --text-white: #FFFFFF;

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', Arial, sans-serif;
    --font-weight-normal: 400;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* Spacing */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;
    --spacing-2xl: 40px;
    --spacing-3xl: 60px;
    --spacing-4xl: 80px;

    /* Border Radius */
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 15px;
    --radius-pill: 50px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 8px 25px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Z-index */
    --z-navbar: 1000;
    --z-dropdown: 1050;
    --z-modal: 1060;
}

/* ===== GLOBAL RESET & BASE STYLES ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }
.mb-5 { margin-bottom: var(--spacing-2xl); }

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

/* ===== GRADIENT UTILITIES ===== */
.gradient-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

.gradient-full {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-tertiary) 100%);
}

/* Print-only hero (hidden on screen, shown in print) */
.print-hero {
    display: none;
}

/* ===== NAVIGATION BAR ===== */
.navbar {
    box-shadow: var(--shadow-md);
    z-index: var(--z-navbar);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-extrabold);
    font-size: 1.5rem;
    color: var(--text-white) !important;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.navbar-nav .nav-link {
    color: var(--text-light) !important;
    font-weight: var(--font-weight-semibold);
    padding: 0.5rem 1rem;
    transition: color var(--transition-normal);
}

.navbar-nav .nav-link:hover {
    color: var(--color-accent) !important;
}

/* ===== BUTTONS ===== */
.btn-custom {
    font-weight: var(--font-weight-semibold);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-pill);
    border: none;
    transition: all var(--transition-normal);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.btn-primary-custom {
    background-color: var(--color-accent);
    color: var(--text-white);
}

.btn-primary-custom:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.btn-secondary-custom {
    background-color: var(--bg-white);
    color: var(--color-primary);
}

.btn-secondary-custom:hover {
    background-color: #F0F0F0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-2xl);
    font-size: 1.2rem;
}

/* ===== HERO SECTION ===== */
.hero-section {
    color: var(--text-white);
    padding: 100px 0 80px 0;
    margin-top: 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-weight: var(--font-weight-extrabold);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.hero-subtitle-greek {
    font-size: 1.2rem;
    opacity: 0.85;
}

/* ===== SECTION LAYOUT ===== */
.section {
    padding: var(--spacing-3xl) 0;
}

.section-white {
    background-color: var(--bg-white);
}

.section-light {
    background-color: var(--bg-light);
}

.section-gradient {
    background: linear-gradient(135deg, var(--bg-light), #E3F2FD);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

/* ===== DAY BADGE ===== */
.day-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-white);
    padding: var(--spacing-sm) var(--spacing-xl);
    border-radius: var(--radius-pill);
    font-size: 1.1rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 4px 15px rgba(31, 71, 136, 0.3);
}

.workout-title {
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.muscle-groups {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ===== CALLOUT BOXES ===== */
.callout {
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.callout-warmup {
    background: var(--bg-warmup);
    border-left: 5px solid var(--color-accent);
}

.callout-icon {
    font-size: 2rem;
    color: var(--color-accent);
    flex-shrink: 0;
}

.callout-content {
    flex: 1;
}

.callout-title {
    font-size: 1.2rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
}

.callout-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ===== EXERCISE TABLE ===== */
.table-wrapper {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.exercise-table {
    margin-bottom: 0;
    width: 100%;
    table-layout: fixed;
}

.exercise-table th,
.exercise-table td {
    width: 33.33%;
}

.exercise-table thead {
    color: var(--text-white);
}

.exercise-table thead th {
    border: none;
    padding: 18px 15px;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.exercise-table tbody tr {
    transition: background-color var(--transition-normal);
}

.exercise-table tbody tr:hover {
    background-color: rgba(31, 71, 136, 0.05);
}

.exercise-table tbody td {
    padding: var(--spacing-lg) var(--spacing-md);
    vertical-align: middle;
    border-bottom: 1px solid #E9ECEF;
}

.exercise-name {
    font-weight: var(--font-weight-semibold);
    color: var(--text-dark);
    font-size: 1.05rem;
    line-height: 1.4;
    display: block;
}

.exercise-name-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: var(--font-weight-normal);
    display: block;
    margin-top: var(--spacing-xs);
}

.sets-reps {
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    font-size: 1rem;
    display: block;
}

.sets-reps-sub {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: block;
    margin-top: var(--spacing-xs);
}

/* .exercise-img-cell {
    text-align: center;
    vertical-align: middle;
} */

.exercise-img {
    max-width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: inline-block;
}

/* ===== CARD COMPONENTS ===== */
.card-custom {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border-left: 5px solid var(--color-primary);
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    display: block;
}

.card-title {
    font-size: 1.3rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.card-text {
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 0;
}

.card-text-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: block;
    margin-top: var(--spacing-xs);
}

/* ===== CTA SECTION ===== */
.cta-section {
    color: var(--text-white);
    padding: var(--spacing-3xl) 0;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-lg);
}

.cta-subtitle {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--bg-dark);
    color: var(--text-white);
    padding: var(--spacing-2xl) 0 var(--spacing-lg) 0;
}

.disclaimer {
    background-color: rgba(255, 107, 53, 0.1);
    border-left: 4px solid var(--color-accent);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    border-radius: var(--radius-sm);
}

.disclaimer-icon {
    color: var(--color-accent);
    margin-right: var(--spacing-sm);
}

.footer-text {
    text-align: center;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet (Large) */
@media (max-width: 991px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    .hero-subtitle { font-size: 1.2rem; }
    .exercise-img {
        max-width: 100px;
        height: 70px;
    }
}

/* Tablet (Small) & Mobile (Large) */
@media (max-width: 767px) {
    :root {
        --spacing-3xl: 40px;
        --spacing-4xl: 60px;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }

    .hero-section {
        padding: 60px 0 40px 0;
    }

    .hero-subtitle { font-size: 1rem; }

    .exercise-table thead th {
        font-size: 0.8rem;
        padding: 12px 8px;
    }

    .exercise-table tbody td {
        padding: var(--spacing-md) 8px;
        font-size: 0.9rem;
    }

    .exercise-img {
        max-width: 80px;
        height: 60px;
    }

    .card-custom {
        padding: var(--spacing-lg);
    }

    .cta-title {
        font-size: 1.8rem;
    }

    .btn-lg {
        padding: 12px var(--spacing-xl);
        font-size: 1rem;
    }
}

/* Mobile (Small) */
@media (max-width: 576px) {
    .exercise-name {
        font-size: 0.95rem;
    }

    .exercise-name-sub {
        font-size: 0.8rem;
    }

    .sets-reps {
        font-size: 0.9rem;
    }

    .sets-reps-sub {
        font-size: 0.75rem;
    }

    .callout {
        flex-direction: column;
        text-align: center;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-custom {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    /* Page Setup */
    @page {
        size: A4 landscape;
        margin: 1cm;
    }

    /* Hide non-essential elements */
    .navbar,
    .cta-section,
    .btn-custom,
    .footer,
    .hero-section {
        display: none !important;
    }

    /* Body and container adjustments */
    body {
        font-size: 10px;
        line-height: 1.3;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    /* Print-only hero header for each workout day */
    .print-hero {
        display: block !important;
        text-align: center;
        margin-bottom: 10px;
        padding-bottom: 6px;
        border-bottom: 2px solid #2E5C8A;
    }

    .print-hero-title {
        font-size: 1.2rem;
        font-weight: 700;
        color: #1F4788;
        margin-bottom: 2px;
    }

    .print-hero-subtitle {
        font-size: 0.8rem;
        color: #555;
        margin-bottom: 0;
    }

    /* Hero Section - Hidden in print */
    .hero-section {
        margin-top: 0;
        padding: 10px 0 15px 0;
        page-break-after: avoid;
    }

    .hero-title {
        font-size: 1.6rem;
        margin-bottom: 6px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .hero-subtitle-greek {
        font-size: 0.85rem;
    }

    /* Each workout day on its own page with its own hero */
    .section {
        padding: 5px 0;
        page-break-inside: avoid;
        page-break-after: always;
    }

    .section-header {
        margin-bottom: 8px;
    }

    .day-badge {
        padding: 4px 12px;
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .workout-title {
        font-size: 1.3rem;
        margin-bottom: 4px;
    }

    .muscle-groups {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }

    /* Warm-up Callout */
    .callout {
        padding: 6px 10px;
        margin-bottom: 8px;
        font-size: 0.75rem;
    }

    .callout-icon {
        font-size: 1rem;
    }

    .callout-title {
        font-size: 0.8rem;
        margin-bottom: 1px;
    }

    .callout-subtitle {
        font-size: 0.7rem;
    }

    /* Exercise Table */
    .table-wrapper {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .exercise-table {
        font-size: 0.8rem;
    }

    .exercise-table thead th {
        padding: 4px 4px;
        font-size: 0.75rem;
        background: #2E5C8A !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .exercise-table tbody td {
        padding: 4px 4px;
        border-bottom: 1px solid #e0e0e0;
        line-height: 1.2;
    }

    .exercise-name {
        font-size: 0.8rem;
        line-height: 1.1;
    }

    .exercise-name-sub {
        font-size: 0.65rem;
        margin-top: 1px;
    }

    .sets-reps {
        font-size: 0.75rem;
    }

    .sets-reps-sub {
        font-size: 0.6rem;
        margin-top: 1px;
    }

    /* Images - Compact size for visibility */
    .exercise-img {
        max-width: 65px;
        height: 65px;
        page-break-inside: avoid;
        display: inline-block;
    }

    .exercise-img-cell {
        vertical-align: middle;
    }

    /* Guidelines on separate page */
    .guidelines-section {
        padding: 10px 0;
        page-break-before: always;
        page-break-inside: avoid;
    }

    .guidelines-section h2 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    .guidelines-section p {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    /* Guidelines in 3 columns */
    .guidelines-section .row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .card-custom {
        padding: 8px;
        margin-bottom: 0;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .card-icon {
        font-size: 1.2rem;
        margin-bottom: 4px;
    }

    .card-title {
        font-size: 0.85rem;
        margin-bottom: 4px;
        line-height: 1.2;
    }

    .card-text {
        font-size: 0.7rem;
        line-height: 1.2;
    }

    .card-text-sub {
        font-size: 0.6rem;
        margin-top: 2px;
    }

    /* Force colors to print */
    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Remove shadows and transitions */
    .table-wrapper,
    .card-custom,
    .day-badge {
        box-shadow: none !important;
    }
}
