:root {
    --background: 40 33% 98%;
    --foreground: 30 10% 15%;
    --primary: 35 25% 45%;
    --secondary: 25 15% 94%;
    --muted: 25 15% 94%;
    --muted-foreground: 30 10% 40%;
    --border: 30 15% 90%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.025em;
}

.container-custom {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container-custom {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-custom {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.section-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

@media (min-width: 1024px) {
    .section-padding {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

.link-underline {
    position: relative;
    display: inline-block;
}

.link-underline::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: hsl(var(--primary));
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.link-underline:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in-section {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
}

.animate-delay-200 {
    animation-delay: 200ms;
}

.animate-delay-400 {
    animation-delay: 400ms;
}

.animate-delay-600 {
    animation-delay: 600ms;
}

.animate-delay-800 {
    animation-delay: 800ms;
}

.like-button svg {
    transition: all 0.2s ease-in-out;
}

.flying-heart {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fly-away 1s ease-out forwards;
    pointer-events: none;
}

@keyframes fly-away {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-80px) scale(0.5);
        opacity: 0;
    }
}

@keyframes gentle-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.animate-gentle-pulse {
    animation: gentle-pulse 2.5s infinite;
    animation-delay: 3s;
}

/* Modal styles */
.modal-overlay {
    transition: opacity 0.3s ease-in-out;
}

.modal-content {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* Teacher Card Alignment Fixes */
.teacher-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.teacher-card>div:last-child {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Force strict alignment for visual perfection */
.teacher-name {
    min-height: 1.75em;
    /* Approximately 1 line plus margin */
    display: flex;
    align-items: flex-end;
    /* Align bottom to effectively handle single lines */
}

.teacher-role {
    min-height: 2.5em;
    /* Force 2 lines of height to accommodate wrapping titles */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.teacher-bio {
    flex-grow: 1;
    margin-bottom: 1.5rem;
    /* Optional: Limit lines if we want strict height match, but growing pushes footer down */
}

.teacher-card>div:last-child>a {
    margin-top: auto;
}

/* Instagram Carousel */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-266px * 7));
    }

    /* (250px width + 16px margin) * 7 slides */
}

.slider-track {
    animation: scroll 40s linear infinite;
}

.slider-container:hover .slider-track {
    animation-play-state: paused;
}

/* Reviews Carousel Styles */
.reviews-carousel {
    position: relative;
    padding: 0 10px;
    overflow: hidden;
}

.review-card {
    flex: 0 0 100%;
    padding: 20px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .review-card {
        flex: 0 0 50%;
    }
}

@media (min-width: 1024px) {
    .review-card {
        flex: 0 0 33.333%;
    }
}

.review-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    height: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.review-content:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviewer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #6b7280;
    font-size: 18px;
}

.reviewer-details h4 {
    font-weight: 600;
    font-size: 16px;
    color: #111827;
    margin-bottom: 4px;
}

.reviewer-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 12px;
}

.review-date {
    font-size: 13px;
    color: #9ca3af;
    text-align: right;
    margin-bottom: 4px;
}

.review-stars {
    display: flex;
    gap: 2px;
    margin-bottom: 16px;
}

.review-text {
    color: #4b5563;
    line-height: 1.6;
    font-size: 15px;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
    margin-top: 16px;
    padding: 4px 10px;
    background: #f8fafc;
    border-radius: 16px;
}

.review-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e5e7eb;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.review-dot.active {
    background: #ec4899;
    transform: scale(1.2);
}

/* Language Switcher Styles */
.language-switcher {
    position: relative;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-width: 140px;
    display: none;
    z-index: 100;
}

.language-dropdown.active {
    display: block;
}

.language-option {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.language-option:hover {
    background-color: #f9fafb;
}

.language-option.active {
    background-color: #f3f4f6;
    color: #ec4899;
    font-weight: 500;
}

.language-flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
}