/* Custom Styles for ZenFlow Yoga - Using CSS where it makes more sense */

/* Custom fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Carousel - CSS makes more sense for repeated structure */
.carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

.carousel-dots {
    position: absolute;
    bottom: 5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 0.5rem;
}

.carousel-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    background: white;
    opacity: 0.75;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: scale(1);
}

.carousel-dot:hover {
    opacity: 1;
    transform: scale(1.1);
}

.carousel-dot.active {
    opacity: 1;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .carousel-prev,
    .carousel-next {
        padding: 0.5rem;
    }
    
    .carousel-prev {
        left: 1rem;
    }
    
    .carousel-next {
        right: 1rem;
    }
    
    .carousel-dots {
        bottom: 4rem;
    }
}

/* Smooth scrolling handled by Tailwind's scroll-smooth class on html tag */

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-section);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--forest-olive);
}

/* Hero Section Buttons - CSS makes more sense for reusable components */
.btn-hero-primary {
    background: white;
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.btn-hero-primary:hover {
    background: var(--bg-section);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.btn-hero-secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-hero-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.btn-cta {
    background: white;
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.btn-cta:hover {
    background: var(--bg-section);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Feature Cards - CSS makes more sense for repeated hover effects */
.feature-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: 0.5rem;
    transition: box-shadow 0.3s ease;
}

.feature-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Card Hover Effects - Reusable class for class cards */
.class-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.class-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Button Hover Effects - Enhanced btn-primary */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(123, 138, 90, 0.3);
}

/* Form Focus States - CSS makes more sense for all inputs */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(123, 138, 90, 0.1);
}

/* Message Styles - Reusable classes */
.message {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    font-weight: 500;
}

.message.success {
    background-color: var(--bg-section);
    color: var(--text-main);
    border: 1px solid var(--soft-leaf);
}

.message.error {
    background-color: var(--bg-section);
    color: var(--text-main);
    border: 1px solid var(--forest-olive);
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* TTC Courses Carousel - Horizontal sliding carousel */
.ttc-carousel-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.ttc-carousel-wrapper {
    display: flex;
    width: auto;
}

.ttc-carousel-prev,
.ttc-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ttc-carousel-prev:hover,
.ttc-carousel-next:hover {
    background: var(--forest-olive);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.ttc-carousel-prev {
    left: -1.5rem;
}

.ttc-carousel-next {
    right: -1.5rem;
}

.ttc-carousel-prev:disabled,
.ttc-carousel-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ttc-carousel-prev:disabled:hover,
.ttc-carousel-next:disabled:hover {
    transform: translateY(-50%);
    background: var(--primary-color);
}

@media (max-width: 1024px) {
    .ttc-carousel-prev {
        left: -0.5rem;
    }
    
    .ttc-carousel-next {
        right: -0.5rem;
    }
}

@media (max-width: 768px) {
    .ttc-carousel-prev,
    .ttc-carousel-next {
        width: 40px;
        height: 40px;
        padding: 0.75rem;
    }
    
    .ttc-carousel-prev {
        left: 0;
    }
    
    .ttc-carousel-next {
        right: 0;
    }
}

/* Course Card Images - Fixed dimensions for consistent aspect ratio */
.ttc-card img,
.course-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.ttc-card .h-48 {
    width: 100%;
    height: 12rem; /* 192px - fixed height */
    min-height: 12rem;
    max-height: 12rem;
    overflow: hidden;
    position: relative;
}

/* Material Design Components Integration */
.mdc-dialog__surface {
    max-width: 500px;
    width: 100%;
}

.mdc-text-field {
    width: 100%;
    margin-bottom: 1rem;
}

.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,
.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing {
    border-color: var(--bg-section);
}

.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,
.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing {
    border-width: 1px;
}

.mdc-text-field--focused .mdc-notched-outline .mdc-notched-outline__leading,
.mdc-text-field--focused .mdc-notched-outline .mdc-notched-outline__trailing {
    border-color: var(--primary);
}

.mdc-floating-label {
    color: var(--secondary);
}

.mdc-floating-label--float-above {
    color: var(--primary);
}

.mdc-text-field__input {
    color: var(--main);
}

.mdc-button {
    --mdc-theme-primary: var(--primary);
}

.mdc-button--raised {
    background-color: var(--primary);
    color: white;
}

.mdc-button--raised:hover {
    background-color: var(--primary);
    opacity: 0.9;
}

.mdc-dialog__title {
    color: var(--main);
    font-weight: 600;
}

.mdc-dialog__content {
    color: var(--secondary);
}

/* FAQ Section Styles */
.faq-item {
    border: 1px solid var(--bg-section);
    transition: all 0.3s ease;
}

.faq-item.active {
    border: none;
}

.faq-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.faq-item.active:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.faq-question {
    cursor: pointer;
    outline: none;
}

.faq-question:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.faq-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

/* Application Form Styling */
#application-form {
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
}

#application-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
    cursor: pointer;
}

#application-form select:hover {
    border-color: var(--primary);
}

#application-form input[type="radio"] {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#application-form input[type="text"],
#application-form input[type="email"],
#application-form input[type="tel"] {
    transition: all 0.2s ease;
}

#application-form input:focus,
#application-form select:focus,
#application-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
}

#application-form label[for] {
    color: var(--main);
    font-weight: 600;
}

#application-form .bg-section {
    background-color: var(--bg-section);
}

#application-form textarea {
    min-height: 120px;
}

/* Form field hover effects */
#application-form input:hover:not(:focus),
#application-form select:hover:not(:focus),
#application-form textarea:hover:not(:focus) {
    border-color: var(--primary);
    opacity: 0.8;
}