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

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

:root {
    --font-headings: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --color-primary: #E53935;
    --color-primary-dark: #C62828;
    --color-secondary: #1976D2;
    --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);
}

.timer-page-content .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }
.timer-page-content h1, .timer-page-content h2, .timer-page-content h3 { font-family: var(--font-headings); font-weight: 700; line-height: 1.3; margin: 0; color: var(--color-text-dark); }
.timer-page-content h1 span, .timer-page-content h2 span { color: var(--color-primary); }
.timer-page-content p { font-family: var(--font-body); margin: 0; font-size: 1.1rem; line-height: 1.7; color: var(--color-text-light); }
.timer-page-content .section-title { font-size: 2.8rem; text-align: center; margin-bottom: 1.25rem; }
.timer-page-content .section-subtitle { text-align: center; margin-bottom: 3.5rem; max-width: 700px; margin-left: auto; margin-right: auto; }
.timer-page-content .button { display: inline-block; padding: 12px 28px; 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; }
.timer-page-content .primary-button { background-color: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.timer-page-content .primary-button:hover { background-color: var(--color-primary-dark); border-color: var(--color-primary-dark); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.timer-page-content .secondary-button { background-color: #fff; color: var(--color-text-dark); border-color: var(--color-border); }
.timer-page-content .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); }

.timer-page-content .full-width-background {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* ==========================================================================
   2. Global Timer Component Styles
   ========================================================================== */
.workout-timer {
    background-color: var(--color-bg-light);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    width: 100%;
    box-sizing: border-box;
}
.timer-title {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-headings);
    color: var(--color-text-light);
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.timer-display-container {
    background-color: #f0f2f5;
    border-radius: 12px;
    margin-bottom: 25px;
    width: 100%;
    position: relative;
    overflow: hidden;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.timer-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: var(--color-primary);
    transition: width 0.5s linear, background-color 0.3s ease;
    z-index: 1;
}
.workout-timer.rest-mode .timer-progress-bar {
    background-color: var(--color-secondary);
}

/* --- UPDATED: Timer Display for white text --- */
/* This is the key change to match the homepage timer's look. */
.timer-display {
    font-size: 4.5rem;
    font-weight: 700;
    font-family: var(--font-headings);
    color: #fff; /* CHANGED from dark text to white */
    line-height: 1;
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.25); /* ENHANCED shadow for readability */
}

.timer-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 20px;
    margin-bottom: 25px;
}
.icon-button {
    background-color: #fff;
    color: var(--color-text-dark);
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
    outline: none;
}
.icon-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.timer-status {
    padding: 8px 15px;
    border-radius: 20px;
    min-width: 250px;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 500;
}
.timer-status p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}
.timer-status #timer-mode {
    font-weight: 700;
}
.workout-timer.workout-mode .timer-status {
    background-color: #FEECEB; /* Light Red */
    color: var(--color-primary-dark);
}

/* --- UPDATED: Rest mode status text for better readability --- */
.workout-timer.rest-mode .timer-status {
    background-color: #E3F2FD; /* Light Blue */
    color: #1565C0; /* CHANGED to a darker blue for better contrast */
}

/* ==========================================================================
   3. Section-Specific Styles
   ========================================================================== */
/* --- Hero & Timer Tool Section --- */
.timer-hero-tool-section { 
    background-color: var(--color-bg-alt);
    padding: var(--section-padding); 
    text-align: center; 
}
.timer-presets { 
    margin-bottom: 2.5rem; 
    display: flex; 
    justify-content: center; 
    gap: 1rem; 
    flex-wrap: wrap; 
}
.preset-button { 
    background-color: #fff; 
    color: var(--color-text-dark); 
    border: 1px solid var(--color-border); 
    padding: 10px 20px; 
}

.preset-button:not(.active-preset):hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* --- UPDATED: Active preset button to use primary brand color --- */
.preset-button.active-preset {
    background-color: var(--color-primary); /* CHANGED from dark-text to primary red */
    color: #fff;
    border-color: var(--color-primary);
}

.main-timer-instance { 
    max-width: 420px; 
    margin: 0 auto; 
}

.timer-examples-section { background-color: var(--color-bg-light); padding: var(--section-padding); }
.examples-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.example-card { background-color: #fff; border: 1px solid var(--color-border); border-radius: 12px; padding: 2rem; box-shadow: var(--shadow-md); display: flex; flex-direction: column; transition: all 0.3s ease; }
.example-title { font-size: 1.5rem; margin-bottom: 1rem; }
.example-details { font-size: 1rem; color: var(--color-text-light); flex-grow: 1; margin-bottom: 1.5rem; }
.example-card .button { margin-top: auto; }
.example-card-highlight { border-color: #fdd8d7; box-shadow: var(--shadow-md), 0 0 15px rgba(229, 57, 53, 0.25); }
.example-card-highlight:hover { border-color: var(--color-primary-dark); transform: translateY(-5px); box-shadow: var(--shadow-lg), 0 0 25px rgba(229, 57, 53, 0.45); }

.timer-knowledge-section { background-color: var(--color-bg-alt); padding: var(--section-padding); }
.knowledge-faq .faq-accordion { max-width: 800px; margin: 0 auto; }
.faq-item { margin-bottom: 1rem; border-radius: 12px; border: 1px solid var(--color-border); background-color: var(--color-bg-light); overflow: hidden; }
.faq-question { font-size: 1.1rem; font-weight: 600; padding: 1.25rem 1.5rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-question i { transition: transform 0.3s ease; }
.faq-item.active .faq-question i { transform: rotate(180deg); }
.faq-answer { display: none; padding: 0 1.5rem 1.5rem 1.5rem; }
.faq-answer p { font-size: 1rem; }
.timer-faq-cta { text-align: center; margin-top: 3rem; }

.timer-sharing-section { background-color: var(--color-bg-light); padding: var(--section-padding); text-align: center; }
.sharing-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.share-button { color: #fff !important; border-color: transparent; }
.share-button i { margin-right: 0.5rem; }
.share-button.facebook { background-color: #1877F2; }
.share-button.twitter { background-color: #1DA1F2; }
.share-button.pinterest { background-color: #E60023; }
.share-button.copy-link { background-color: var(--color-text-light); }
#copy-link-message { margin-top: 1rem; color: var(--color-primary); font-weight: bold; display: none; }

/* ==========================================================================
   4. Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
    .timer-page-content .section-title { font-size: 2.2rem; }
    .timer-hero-tool-section, .timer-examples-section, .timer-knowledge-section, .timer-sharing-section { padding: 4rem 0; }
}