/* 
 * Xerquida CrossFit - Main Stylesheet
 * Author: Claude
 * Version: 1.0
 */

/* ==============================
   Base Styles and Reset
   ============================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Colors */
    --bg-color: #1C2526;
    --accent-color: #FF2C2C;
    --secondary-accent: #FFA500;
    --text-color: #FFFFFF;
    --button-color: #4CAF50;
    --dark-overlay: rgba(28, 37, 38, 0.85);
    --light-overlay: rgba(255, 255, 255, 0.05);
    --section-padding: 80px 0;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Bebas Neue', sans-serif;
    line-height: 1.2;
    margin-bottom: 20px;
}

h1 {
    font-size: 4rem;
    text-transform: uppercase;
}

h2 {
    font-size: 3rem;
    text-transform: uppercase;
}

h3 {
    font-size: 2rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-accent);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: var(--section-padding);
}

/* ==============================
   Buttons and CTAs
   ============================== */
.primary-button, .secondary-button, .cta-button {
    display: inline-block;
    padding: 17px 30px 9px;
    border-radius: 4px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.primary-button {
    background-color: var(--button-color);
    color: var(--text-color);
}

.primary-button:hover {
    background-color: var(--accent-color);
    color: var(--text-color);
    transform: translateY(-2px);
}

.secondary-button {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--accent-color);
}

.secondary-button:hover {
    background-color: var(--accent-color);
    color: var(--text-color);
    transform: translateY(-2px);
}

.cta-button {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.cta-button:hover {
    background-color: #e31a1a;
    color: var(--text-color);
    transform: translateY(-2px);
}

/* ==============================
   Header and Navigation
   ============================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(28, 37, 38, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    max-width: 200px;
}

.main-nav ul {
    display: flex;
    gap: 20px;
}

.main-nav li:not(:last-child) {
    padding-top: 0.5rem;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 500;
    padding: 7px 10px 3px;
    position: relative;
}

.main-nav a:not(.cta-button)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.main-nav a:not(.cta-button):hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    position: absolute;
    transition: var(--transition);
}

.menu-toggle span:nth-child(1) {
    top: 0;
}

.menu-toggle span:nth-child(2) {
    top: 9px;
}

.menu-toggle span:nth-child(3) {
    top: 18px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 9px;
}

/* ==============================
   Hero Section
   ============================== */
.hero-section {
    min-height: 100vh;
    background-color: var(--bg-color);
    position: relative;
    display: flex;
    align-items: center;
    padding-top: 100px;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 55%;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.hero-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--bg-color) 0%, transparent 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-content h1 {
    margin-bottom: 10px;
    font-size: 5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slogan {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    color: var(--secondary-accent);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-text {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-cta {
    display: flex;
    gap: 20px;
}

/* ==============================
   About Section
   ============================== */
.about-section {
    background-color: var(--light-overlay);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    color: var(--accent-color);
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-accent);
}

.section-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-image {
    flex: 1;
    overflow: hidden;
    border-radius: 10px;
}

.about-text {
    flex: 1;
}

.about-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    text-align: center;
}

.stat {
    flex: 1;
    padding: 20px;
    background-color: rgba(255, 44, 44, 0.1);
    border-radius: 5px;
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 44, 44, 0.2);
}

.stat-number {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--accent-color);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ==============================
   Workouts Section
   ============================== */
.workouts-section {
    background-color: var(--bg-color);
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.program-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 30px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.program-card:hover::before,
.program-card.hover::before {
    height: 100%;
}

.program-card:hover,
.program-card.hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.08);
}

.program-icon {
    margin-bottom: 20px;
    color: var(--secondary-accent);
}

.program-card h3 {
    margin-bottom: 15px;
}

.program-link {
    display: inline-block;
    margin-top: 15px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    position: relative;
}

.program-link::after {
    content: '→';
    margin-left: 5px;
    transition: var(--transition);
}

.program-link:hover::after {
    margin-left: 10px;
}

/* ==============================
   Benefits Section
   ============================== */
.benefits-section {
    background-color: var(--light-overlay);
}

.benefits-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.benefits-text {
    flex: 1;
}

.benefits-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.benefit-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.benefit-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 44, 44, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}

.benefit-info h3 {
    margin-bottom: 10px;
}

/* ==============================
   Coaches Section
   ============================== */
.coaches-section {
    background-color: var(--bg-color);
}

.coaches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.coach-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
}

.coach-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.coach-image {
    height: 300px;
    overflow: hidden;
}

.coach-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.coach-card:hover .coach-image img {
    transform: scale(1.05);
}

.coach-info {
    padding: 20px;
}

.coach-title {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.coach-bio {
    margin-bottom: 15px;
}

.coach-certs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.coach-certs span {
    display: inline-block;
    padding: 5px 10px;
    background-color: rgba(255, 44, 44, 0.1);
    border-radius: 3px;
    font-size: 0.9rem;
}

/* ==============================
   Community Section
   ============================== */
.community-section {
    background-color: var(--light-overlay);
}

.community-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.community-text {
    flex: 1;
}

.community-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.testimonials-slider {
    margin-top: 30px;
    position: relative;
    overflow: hidden;
}

.testimonial {
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
}

.testimonial.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 15px;
    position: relative;
}

.testimonial-text::before {
    content: '"';
    font-size: 3rem;
    color: var(--accent-color);
    opacity: 0.3;
    position: absolute;
    top: -20px;
    left: -15px;
}

.testimonial-author {
    text-align: right;
    font-weight: bold;
}

.testimonial-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.prev-testimonial, .next-testimonial {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.prev-testimonial:hover, .next-testimonial:hover {
    background-color: var(--accent-color);
    transform: scale(1.1);
}

.testimonial-dots {
    display: flex;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--accent-color);
    transform: scale(1.2);
}

/* ==============================
   Schedule Section
   ============================== */
.schedule-section {
    background-color: var(--bg-color);
}

.schedule-container {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.schedule-tabs {
    display: flex;
    background-color: var(--dark-overlay);
}

.schedule-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    background: none;
    border: none;
    color: var(--text-color);
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.schedule-tab.active {
    background-color: rgba(255, 44, 44, 0.1);
    border-bottom-color: var(--accent-color);
}

.schedule-tab:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.05);
}

.schedule-content {
    padding: 30px;
    display: none;
}

.schedule-content.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.schedule-class {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.schedule-class:last-child {
    border-bottom: none;
}

.class-time {
    font-weight: bold;
    min-width: 150px;
}

.class-name {
    flex-grow: 1;
    text-align: center;
    color: var(--secondary-accent);
}

.class-coach {
    min-width: 120px;
    text-align: right;
    opacity: 0.8;
}

.schedule-note {
    margin-top: 30px;
    text-align: center;
}

.schedule-note p {
    margin-bottom: 20px;
}

/* ==============================
   Contact Section
   ============================== */
.contact-section {
    background-color: var(--light-overlay);
}

.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-form-container {
    flex: 1;
}

.info-card {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.08);
}

.info-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 44, 44, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}

.info-text h3 {
    margin-bottom: 5px;
}

.map-container {
    margin-top: 30px;
    border-radius: 10px;
    overflow: hidden;
    height: 300px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.contact-form {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 30px;
}

.form-group {
    margin-bottom: 29px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-family: 'Roboto Condensed', sans-serif;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.08);
}

.contact-form.submitting {
    opacity: 0.7;
    pointer-events: none;
}

/* ==============================
   Success Page
   ============================== */
.success-section {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 0 80px;
}

.success-content {
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    margin-bottom: 30px;
    color: var(--accent-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.form-summary {
    margin: 30px 0;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    text-align: left;
}

.form-summary h3 {
    margin-bottom: 15px;
    color: var(--secondary-accent);
}

.form-summary ul {
    list-style: none;
}

.form-summary li {
    margin-bottom: 10px;
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* ==============================
   Policy Pages
   ============================== */
.policy-section {
    padding: 120px 0 80px;
}

.policy-header {
    text-align: center;
    margin-bottom: 50px;
}

.policy-content {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
}

.policy-intro {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.policy-block {
    margin-bottom: 40px;
}

.policy-block h2 {
    color: var(--accent-color);
    font-size: 2rem;
    margin-bottom: 15px;
}

.policy-block h3 {
    font-size: 1.5rem;
    margin: 20px 0 10px;
}

.policy-block ul {
    margin: 15px 0;
    padding-left: 20px;
}

.policy-block li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 15px;
}

.policy-block li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.contact-list {
    margin: 15px 0;
}

.contact-list li {
    margin-bottom: 10px;
}

.policy-actions {
    text-align: center;
}

/* ==============================
   Footer
   ============================== */
.site-footer {
    background-color: var(--dark-overlay);
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo {
    flex: 1;
    min-width: 200px;
}

.footer-logo img {
    margin-bottom: 15px;
    max-width: 200px;
}

.footer-links {
    flex: 1;
    min-width: 150px;
}

.footer-links h3 {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.footer-links h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--text-color);
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links ul li a:hover,
.footer-links ul li a.active {
    opacity: 1;
    color: var(--secondary-accent);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==============================
   Back to Top Button
   ============================== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--button-color);
    color: var(--text-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background-color: #a70d69;
    transform: translateY(-5px);
}

/* ==============================
   Responsive Styles
   ============================== */
@media (max-width: 1024px) {
    h1 {
        font-size: 3.5rem;
    }
    
    h2 {
        font-size: 2.5rem;
    }
    
    .hero-content h1 {
        font-size: 4rem;
    }
    
    .about-content,
    .benefits-content,
    .community-content,
    .contact-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .benefits-image,
    .community-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        z-index: 1001;
    }
    
    .main-nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        z-index: 1000;
    }
    
    .main-nav ul.active {
        right: 0;
    }
    
    .hero-image {
        width: 100%;
        opacity: 0.5;
    }
    
    .hero-image::after {
        background: linear-gradient(to bottom, var(--bg-color) 0%, transparent 30%, transparent 70%, var(--bg-color) 100%);
    }
    
    .hero-content {
        text-align: center;
        max-width: 100%;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .coaches-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .schedule-tab {
        padding: 10px 5px;
        font-size: 0.9rem;
    }
    
    .schedule-class {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .class-time,
    .class-name,
    .class-coach {
        min-width: auto;
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-logo,
    .footer-links {
        min-width: 100%;
    }
    
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .slogan {
        font-size: 1.3rem;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    .primary-button,
    .secondary-button,
    .cta-button {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat {
        padding: 10px;
    }
    
    .schedule-tabs {
        flex-wrap: wrap;
    }
    
    .schedule-tab {
        flex-basis: 33.333%;
    }
    
    .testimonial-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .policy-content {
        padding: 20px 15px;
    }
    
    .policy-block h2 {
        font-size: 1.7rem;
    }
    
    .policy-block h3 {
        font-size: 1.3rem;
    }
}
