/* Base styles - Light Theme */
body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f8fafc;
    /* Tailwind 'slate-50' */
    color: #1e293b;
    /* Tailwind 'slate-800' */
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Montserrat', sans-serif;
}

/* Custom gradient for buttons and highlights */
.primary-gradient {
    background-image: linear-gradient(to right, #6EE7B7, #3B82F6);
}

.primary-gradient-hover {
    background-image: linear-gradient(to right, #3B82F6, #6EE7B7);
}

/* Standard card for light theme */
.theme-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    /* slate-200 */
    border-radius: 1rem;
    /* 16px */
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
}

/* Custom form focus */
.form-input {
    background-color: #f1f5f9;
    /* slate-100 */
    border: 1px solid #cbd5e1;
    /* slate-300 */
    border-radius: 0.5rem;
    /* 8px */
    color: #1e293b;
    /* slate-800 */
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #3B82F6;
    background-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.form-input:disabled {
    background-color: #e2e8f0;
    /* slate-200 */
    cursor: not-allowed;
}

/* Button disabled state */
.btn-disabled {
    background: #cbd5e1;
    /* slate-300 */
    color: #64748b;
    /* slate-500 */
    cursor: not-allowed;
}

.btn-disabled:hover {
    background: #cbd5e1;
}

/* Dashboard Tab Styles */
.tab-button {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    /* slate-600 */
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.tab-button:hover {
    background-color: #f1f5f9;
    /* slate-100 */
    color: #1e293b;
    /* slate-800 */
}

.tab-button.active {
    color: #3B82F6;
    /* blue-500 */
    border-bottom-color: #3B82F6;
}

.tab-button .material-symbols-outlined {
    font-size: 20px;
    margin-right: 0.5rem;
    font-variation-settings: 'FILL' 0;
}

.tab-button.active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

.tab-content {
    display: none;
}

/* Custom Toggle for Gym/Home */
.toggle-switch-bg {
    background-color: #e2e8f0;
    /* slate-200 */
    border-radius: 9999px;
    padding: 0.25rem;
    display: flex;
    width: 14rem;
    /* Fixed width to hold both buttons */
    flex-shrink: 0;
}

.toggle-switch-button {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    /* slate-600 */
    border-radius: 9999px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-switch-button .material-symbols-outlined {
    font-size: 1.125rem;
    /* text-lg */
    margin-right: 0.25rem;
    /* mr-1 */
}

.toggle-switch-button.active {
    background-color: #ffffff;
    color: #3B82F6;
    /* blue-500 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Week Selector Styles */
.week-selector {
    display: flex;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.week-selector::-webkit-scrollbar {
    display: none;
}

.week-button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    margin-right: 0.5rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.week-button.active {
    background-color: #3B82F6;
    color: #ffffff;
    border-color: #3B82F6;
}

.week-button:hover:not(.active) {
    background-color: #e2e8f0;
    color: #1e293b;
}

/* Photo Upload Box Container */
.photo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.photo-upload-box {
    position: relative;
    width: 100%;
    /* Use a slightly taller aspect ratio or min-height to give more room */
    aspect-ratio: 1 / 1.1; 
    min-height: 120px; /* Ensure minimum height on very small screens */
    background-color: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
}

.photo-upload-box:hover {
    border-color: #3B82F6;
    background-color: #f1f5f9;
}

/* Hide the default file input text */
.photo-input {
    display: none;
}

.photo-upload-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 5; /* Ensure image is above placeholders */
}

/* Ensure hidden images don't block clicks/layout */
.photo-upload-box img.hidden {
    display: none;
}

.photo-upload-box .upload-icon {
    font-size: 40px; /* Default size */
    transition: all 0.2s ease;
    color: #94a3b8; /* slate-400 */
}

/* Adjust icon size for smaller screens if needed */
@media (max-width: 640px) {
    .photo-upload-box .upload-icon {
        font-size: 32px;
    }
}

/* Remove Button */
.photo-remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    border: none;
    color: #ef4444;
}

.photo-remove-btn:hover {
    background: #fff;
    transform: scale(1.1);
}

.photo-remove-btn .material-symbols-outlined {
    font-size: 1.25rem;
}

/* Disabled state for photo upload */
.photo-upload-box.disabled {
    background-color: #e2e8f0; /* slate-200 */
    border-color: #cbd5e1; /* slate-300 */
    cursor: not-allowed;
    pointer-events: none;
}

.photo-upload-box.disabled .upload-icon {
    color: #94a3b8; /* slate-400 */
}

.photo-upload-box.disabled .upload-text {
    font-size: 0.75rem;
}

/* NEW: Testimonial Toggle Switch Styles */
.toggle-checkbox:checked+.toggle-bg {
    background-image: linear-gradient(to right, #6EE7B7, #3B82F6);
    /* primary-gradient */
    border-color: #3B82F6;
}

.toggle-checkbox:checked+.toggle-bg:after {
    transform: translateX(100%);
    border-color: white;
}

.toggle-bg {
    position: relative;
    display: inline-block;
    width: 2.75rem;
    /* 44px */
    height: 1.5rem;
    /* 24px */
    background-color: #e5e7eb;
    /* gray-200 */
    border: 1px solid #e5e7eb;
    /* gray-200 */
    border-radius: 9999px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.toggle-bg:after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.25rem;
    /* 20px */
    height: 1.25rem;
    /* 20px */
    background-color: white;
    border-radius: 9999px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

/* NEW: Dashboard Progress Bar */
.progress-bar-bg {
    width: 100%;
    background-color: #e2e8f0;
    /* slate-200 */
    border-radius: 9999px;
    height: 0.75rem;
    /* 12px */
    overflow: hidden;
}

.progress-bar-fill {
    background-image: linear-gradient(to right, #6EE7B7, #3B82F6);
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease;
}

/* NEW: Dashboard Status Link */
.status-link {
    font-weight: 600;
    color: #3B82F6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-link:hover {
    color: #2563eb;
    /* blue-600 */
    text-decoration: underline;
}

/* NEW: Prevent page jump on component load */
#header-placeholder {
    min-height: 5rem;
    /* Corresponds to h-20 in the header */
}

#footer-placeholder {
    min-height: 160px;
    /* Approximate height for mobile */
}

@media (min-width: 768px) {

    /* md breakpoint */
    #footer-placeholder {
        min-height: 104px;
        /* Approximate height for desktop */
    }
}

@media (max-width: 767px) {
    #login-container {
        padding-bottom: 20vh;
        /* Add padding to the bottom to push content up */
    }
}

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    /* slate-100 */
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    /* slate-300 */
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
    /* slate-400 */
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 15px;
    right: 15px;
    width: 63px;
    height: 63px;
    z-index: 1000;
    transition: transform 0.2s ease-in-out;
    transform: scale(1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float img {
    width: 100%;
    height: 100%;
}

/* Testimonials Section */
#testimonials {
    position: relative;
    overflow: hidden; /* Ensure images don't spill out */
}

/* Floating Background Container */
.testimonials-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through */
    z-index: 0;
    overflow: hidden;
}

/* Ensure content sits above floating images */
#testimonials .container {
    position: relative;
    z-index: 10; 
}

/* Individual Floating Photo Style */
.floating-photo {
    position: absolute;
    object-fit: cover;
    border-radius: 20px; /* Rounder corners as requested */
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    /* No initial opacity 0 if we want them solid immediately, 
       but animation usually handles entry.
       We set start opacity to 0.4 or whatever "no fade" implies for visibility */
    opacity: 0.4; 
    transform: translateZ(0); /* Hardware accel */
    will-change: transform;
    filter: grayscale(0.2); /* Slight grayscale for background feel */
}

/* Floating Animation Keyframes - No Fade, just movement */
@keyframes floatAnimation {
    0% {
        transform: translateY(20px);
        opacity: 0.4; /* Constant opacity */
    }
    100% {
        transform: translateY(-80px);
        opacity: 0.4; /* Constant opacity */
    }
}

.testimonial-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    /* Increased padding */
    margin: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: auto;
    /* Let content define height */
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    position: relative;
    /* For Instagram icon positioning */
}

.testimonial-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #334155;
    /* slate-700 */
    overflow: hidden;
    position: relative;
    max-height: 110px;
    /* Approx 4-5 lines */
    transition: max-height 0.5s ease-in-out;
}

.testimonial-text.expanded {
    max-height: 1000px;
    /* Large value to allow full expansion */
}

.read-more-btn {
    background: none;
    border: none;
    color: #3B82F6;
    /* blue-500 */
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: 1rem;
    text-align: left;
    align-self: flex-start;
}

.swiper-container {
    width: 100%;
    padding-top: 20px;
    padding-bottom: 50px;
    /* Space for pagination */
    max-width: 100%;
    overflow-x: hidden;
}

.swiper-pagination-bullet {
    background: #cbd5e1;
    /* slate-300 */
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background-color: #3B82F6;
    /* blue-500 */
}

.swiper-button-next,
.swiper-button-prev {
    color: #3B82F6;
    /* blue-500 */
    --swiper-navigation-size: 30px;
}

.instagram-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 24px;
    color: #E1306C;
    /* Instagram pink */
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.testimonial-card:hover .instagram-icon {
    opacity: 1;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex; /* Show when active */
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: modalFadeIn 0.3s ease-out;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.lightbox-close {
    position: absolute;
    top: -3rem;
    right: 0;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.lightbox-close:hover {
    color: #e2e8f0;
}

.lightbox-close .material-symbols-outlined {
    font-size: 2rem;
}

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

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
