/* Base styles */
:root {
    --primary-gradient: linear-gradient(135deg, #007bff, #0056b3);
    --success-gradient: linear-gradient(135deg, #28a745, #1e7e34);
    --light-gradient: linear-gradient(135deg, #ffffff, #f8f9fa);
    --hover-shadow: 0 8px 20px rgba(0,123,255,0.15);
}

/* Carousel responsive styles */
.carousel-item {
    height: 600px;
    position: relative;
    overflow: hidden;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-height: 100%;
    min-width: 100%;
}

.carousel-caption {
    background: rgba(36, 36, 36, 0.8);
    padding: 20px;
    border-radius: 10px;
    color: white;
    max-width: 90%;
    margin: 0 auto;
    left: 5%;
    right: 5%;
    bottom: 20px;
}

.carousel-caption h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.carousel-caption p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* Card styles */
.therapy-card, .training-card, .focus-item {
    background: var(--light-gradient);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    border: 1px solid rgba(0,123,255,0.1);
}

.therapy-card:hover, .training-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
    background: linear-gradient(135deg, #ffffff, #e8f0fe);
    border-color: rgba(0,123,255,0.2);
}

.focus-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
    background: linear-gradient(135deg, #ffffff, #e8f0fe);
    border-color: rgba(40,167,69,0.2);
}

/* Typography */
.therapy-card h4, .training-card h5, .focus-item h4 {
    color: #2c3e50;
    font-weight: 600;
    margin-top: 1rem;
}

.training-card h5 {
    font-size: 1rem;
    line-height: 1.4;
    min-height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icons */
.therapy-icon, .training-icon, .focus-item i {
    font-size: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

/* Popup styles */
.therapy-popup, .training-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1050;
    padding: 20px;
    justify-content: center;
    align-items: center;
}

.therapy-popup.active, 
.therapy-popup[style*="display: flex"],
.training-popup.active,
.training-popup[style*="display: flex"] {
    display: flex !important;
}

.popup-content {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    max-width: 700px;
    width: 95%;
    margin: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.popup-content h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid rgba(0,123,255,0.2);
    padding-bottom: 0.5rem;
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    line-height: 1;
    transition: all 0.3s ease;
}

.close-popup:hover {
    color: #000;
    transform: rotate(90deg);
}

/* Grid layouts */
.therapy-grid, .training-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Blog posts */
.blog-post-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    margin-bottom: 1rem;
}

.blog-post-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.blog-post-image:hover img {
    transform: scale(1.05);
}

/* CTA Section */
.cta-section-v2 {
    background: linear-gradient(45deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
    border-radius: 15px;
    margin: 3rem 0;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.cta-section-v2 .btn {
    padding: 1rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0.5rem;
    min-width: 220px;
    border: none;
}

.cta-section-v2 .btn-primary {
    background: var(--primary-gradient);
}

.cta-section-v2 .btn-success {
    background: var(--success-gradient);
}

.cta-section-v2 .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Partners section */
.partners-grid {
    padding: 20px 0;
}

.partner-item {
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.partner-logo {
    max-width: 120px;
    height: 120px;
    object-fit: contain;
    transition: transform 0.3s ease;
    padding: 8px;
}

.partner-logo:hover {
    transform: scale(1.1);
}

/* Responsive styles */
@media (max-width: 768px) {
    .carousel-item {
        height: 400px;
    }

    .carousel-caption {
        padding: 15px;
        bottom: 10px;
    }

    .carousel-caption h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .carousel-caption p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .carousel-caption .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .therapy-grid, .training-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .training-card, .therapy-card {
        padding: 1rem;
    }
    
    .popup-content {
        padding: 1.5rem;
        width: 100%;
    }
    
    .cta-section-v2 {
        padding: 2rem 1rem;
    }
    
    .cta-section-v2 .d-flex {
        flex-direction: column;
    }
    
    .cta-section-v2 .btn {
        width: 100%;
        margin: 0.5rem 0;
    }

    .partner-logo {
        max-width: 100px;
        height: 100px;
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .carousel-item {
        height: 300px;
    }

    .carousel-caption h1 {
        font-size: 1.2rem;
    }

    .carousel-caption p {
        font-size: 0.9rem;
    }
}
