/* Modern CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- Global Styles & Variables --- */
:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    /* ENHANCEMENT: Added RGB values for easy use in RGBA */
    --primary-color-rgb: 106, 17, 203;
    --secondary-color-rgb: 37, 117, 252;
    --accent-color: #ffde59;
    --text-color: #343a40;
    --light-text-color: #f8f9fa;
    --bg-color: #f9f9f9;
    --card-bg-color: #ffffff;
    --border-radius: 16px;
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

/* FIX: Prevent "pull-to-refresh" on mobile devices, which can cause accidental page reloads, especially within the booking iframe. */
html, body {
    overscroll-behavior-y: contain;
}

body.nav-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

h2.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--text-color);
    position: relative;
}

h2.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    margin: 15px auto 0;
}

section {
    padding: 80px 0;
    overflow: hidden; /* ENHANCEMENT: Prevents scroll animations from showing before they enter */
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--secondary-color); /* Solid blue color */
    color: var(--light-text-color);
    box-shadow: 0 4px 15px rgba(var(--secondary-color-rgb), 0.3); /* Adjusted shadow color */
    padding: 14px 32px;
    font-size: 0.95rem;
    border-radius: 8px; /* Sleekier, less rounded corners */
}

.btn-primary:hover {
    transform: translateY(-2px); /* Slightly less pronounced hover effect */
    box-shadow: 0 6px 20px rgba(var(--secondary-color-rgb), 0.4); /* Adjusted shadow color */
    filter: brightness(1.05); /* Slightly brighten on hover */
}

/* Button Loading State Styles */
.btn-loading {
    color: transparent !important;
    position: relative;
    cursor: wait;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: btn-spin 0.8s linear infinite;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

.btn-accent {
    background: var(--accent-color);
    color: var(--text-color); 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 14px 32px;
    font-size: 1.05rem;
}

.btn-accent:hover {
    filter: brightness(1.1);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(255, 222, 89, 0.4);
}

.btn-secondary {
    background-color: var(--card-bg-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 14px 32px;
    font-size: 0.95rem;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(var(--primary-color-rgb), 0.3);
}

/* ENHANCEMENT: Scroll Animation Styles */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Header & Navigation --- */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For Safari */
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

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

nav .logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    z-index: 1002;
}

nav .nav-links {
    list-style: none;
    display: flex;
    gap: 35px;
}

nav .nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

/* ENHANCEMENT: Modern nav link hover effect */
nav .nav-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

nav .nav-links a:hover {
    color: var(--text-color);
}

nav .nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.hamburger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 1002;
}

.hamburger .bar {
    display: block;
    width: 28px;
    height: 3px;
    margin: 6px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-color);
    border-radius: 2px;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color), var(--secondary-color));
    color: var(--light-text-color);
    padding: 160px 0 0; /* No bottom padding for desktop */
    background-size: 300% 300%;
    animation: moveGradient 15s ease infinite;
    position: relative;
}

/* ENHANCEMENT: Subtle background shapes for depth */
.hero::before, .hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    z-index: 0;
}
.hero::before {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -150px;
}
.hero::after {
    width: 400px;
    height: 400px;
    bottom: -200px;
    right: -100px;
}
.hero .container {
    position: relative;
    z-index: 1;
}

/* NEW: Hero container with Flexbox */
.hero .hero-container {
    display: flex;
    align-items: flex-end; /* KEY: Aligns items to the bottom for desktop */
    justify-content: space-between;
    gap: 40px;
}

/* NEW: Hero content (left side) */
.hero-content {
    flex: 1;
    max-width: 600px;
    text-align: left;
    padding-bottom: 120px; /* Space from the absolute bottom for desktop */
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 30px;
}

/* NEW: Styles for the benefits list */
.hero-benefits {
    list-style: none;
    padding-left: 0;
    margin-bottom: 40px;
}

.hero-benefits li {
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-benefits li i {
    color: var(--accent-color);
    font-size: 1.5rem;
}

/* NEW: Hero image (right side) */
.hero-image {
    flex: 0 0 40%;
    max-width: 450px;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    display: block; /* Removes bottom space */
}

@keyframes moveGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- How It Works Section (Compact Version) --- */
.how-it-works-section {
    background-color: var(--card-bg-color);
}

.how-it-works-compact-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 30px;
}

.compact-step {
    display: flex;
    align-items: center;
    text-align: left;
    max-width: 320px;
    gap: 20px;
}

.compact-step-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-text-color);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(var(--primary-color-rgb), 0.3);
}

.compact-step h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.compact-step p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

/* --- Tip Section Style --- */
.how-it-works-tip {
    max-width: 700px;
    margin: 40px auto 0;
    padding: 25px 0 0 0;
    background: none;
    border-top: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
}

.how-it-works-tip .tip-icon {
    font-size: 2rem;
    color: var(--secondary-color);
}

.how-it-works-tip p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.6;
}

/* --- Tutors Section --- */
.tutors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    align-items: stretch;
}

.tutor-card {
    background: var(--card-bg-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04), 0 10px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
    border-top: 5px solid;
    border-image-slice: 1;
    border-image-source: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.tutor-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 7px 10px rgba(0, 0, 0, 0.05), 0 15px 30px rgba(var(--primary-color-rgb), 0.15);
}

.tutor-image-wrapper {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    padding: 5px;
    box-shadow: 0 5px 15px rgba(var(--primary-color-rgb), 0.2);
}

.tutor-card img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--card-bg-color);
}

.tutor-card h3 {
    font-size: 1.6rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.tutor-grades {
    display: inline-block;
    background-color: #eef2ff;
    color: var(--secondary-color);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-top: 2px;
    margin-bottom: 10px;
}

.tutor-card .subjects {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tutor-card p {
    font-size: 0.95rem;
    color: #555;
    flex-grow: 1; /* Pushes button to the bottom */
    margin-bottom: 25px; /* Space before button */
}

.btn-tutor {
    padding: 10px 25px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    align-self: center;
}

.btn-tutor:hover {
    background: var(--primary-color);
    color: var(--light-text-color);
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
    border-color: var(--primary-color);
}

.join-card {
    border: 2px dashed var(--secondary-color);
    background: #f0f6ff;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    cursor: pointer;
    /* Reset properties from .tutor-card */
    border-image: none;
    border-top: 2px dashed var(--secondary-color);
}
.join-card .join-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}
.join-card h3 {
    color: var(--secondary-color);
}
.join-card p {
    font-size: 1rem;
    flex-grow: 0; /* Override to prevent unwanted space */
    margin-bottom: 0;
}

/* --- Testimonials Section --- */
.testimonials-section {
    background-color: #eef2ff;
}

.testimonial-slider-wrapper {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.testimonial-slider {
    overflow: hidden;
    background: var(--card-bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-card {
    flex: 0 0 100%;
    padding: 40px;
    text-align: center;
}

.testimonial-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid var(--accent-color);
}

.testimonial-card .quote {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 20px;
    color: #555;
    position: relative;
    padding: 0 20px;
}

.testimonial-card .quote::before, .testimonial-card .quote::after {
    font-family: 'Times New Roman', Times, serif;
    font-size: 3rem;
    color: var(--secondary-color);
    opacity: 0.3;
    position: absolute;
}

.testimonial-card .quote::before {
    content: '“';
    top: -10px;
    left: -10px;
}

.testimonial-card .quote::after {
    content: '”';
    bottom: -30px;
    right: -10px;
}

.testimonial-card .author {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 10;
}

.slider-btn {
    background: var(--card-bg-color);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background: var(--primary-color);
    color: var(--light-text-color);
}

.slider-dots {
    text-align: center;
    margin-top: 25px;
}
.slider-dot {
    border: none;
    padding: 0;
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 5px;
    background-color: rgba(var(--primary-color-rgb), 0.3);
    margin: 0 5px;
    cursor: pointer;
    transition: width 0.4s ease, background-color 0.4s ease;
}
.slider-dot:not(.active):hover {
    background-color: rgba(var(--primary-color-rgb), 0.6);
}
.slider-dot.active {
    width: 30px; 
    background-color: var(--primary-color);
}

/* --- FAQ Section --- */
.faq-section {
    background-color: var(--bg-color);
}
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.faq-item {
    background: var(--card-bg-color);
    border-radius: var(--border-radius);
    border: 1px solid #e9ecef;
    overflow: hidden; /* Important for the max-height transition */
    transition: box-shadow 0.3s ease;
}
.faq-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}
.faq-question i {
    font-size: 1rem;
    color: var(--primary-color);
    transition: transform 0.25s ease-out;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
}
.faq-answer p {
    padding: 0 25px 20px;
    color: #555;
    line-height: 1.7;
}
/* Active State for Accordion */
.faq-item.active .faq-question i {
    transform: rotate(45deg);
}
.faq-item.active .faq-answer {
    max-height: 200px; /* Adjust if answers are longer */
}

/* --- Footer --- */
footer {
    background: var(--text-color);
    color: var(--light-text-color);
    padding: 60px 0 40px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.footer-socials a {
    color: var(--light-text-color);
    text-decoration: none;
    font-size: 1.5rem;
    margin: 0 12px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-socials a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* Fix for auto-styled phone number link on mobile */
footer p a {
    color: inherit; /* Inherit color from parent <p> tag */
    text-decoration: none; /* Remove underline for consistency */
}

/* --- Career Page Specific Styles --- */
.cta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.math-tutor-notice {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--light-text-color);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.math-tutor-notice i {
    color: #fffb8f; /* A light yellow to match the accent */
}
.join-us-content .math-tutor-notice {
    background-color: #eef2ff;
    color: var(--text-color);
    border: 1px solid #dbe1f1;
}
.join-us-content .math-tutor-notice i {
    color: var(--secondary-color);
}
.benefits-list {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    gap: 25px; /* Space between items */
    max-width: 800px; /* Constrain width for readability */
    margin: 0 auto; /* Center the list */
}

.benefit-item {
    background: var(--card-bg-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    align-items: flex-start; /* Align icon and text at the top */
    gap: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.benefit-icon {
    flex-shrink: 0; /* Prevent icon from shrinking */
    font-size: 2.5rem;
    color: var(--primary-color);
    line-height: 1; /* Align icon vertically */
}

.benefit-item h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text-color);
}

.benefit-item p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

.benefit-item .btn {
    margin-top: 15px; /* Space between text and button */
    align-self: flex-start; /* Align button with text */
}

.requirements-section {
    background-color: #eef2ff;
}
.requirements-content {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--card-bg-color);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}
.requirements-content h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}
.math-tutor-highlight {
    background-color: transparent; /* Make it blend with the parent card */
    border-radius: 0; /* Remove border-radius to blend seamlessly */
    box-shadow: none; /* Remove shadow to blend seamlessly */
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.math-tutor-highlight p {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-color);
    font-weight: 600;
}
.math-tutor-highlight i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}
.requirements-content ul {
    list-style-type: none;
    padding-left: 0;
}
.requirements-content ul li {
    padding-left: 35px;
    position: relative;
    margin-bottom: 15px;
    font-size: 1.05rem;
}
.requirements-content ul li::before {
    content: '\f058'; /* Font Awesome check-circle icon */
    font-family: 'Font Awesome 7 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

/* === NEW: Work Process Section on Mokytojams page === */
.work-process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.process-card {
    background: var(--card-bg-color);
    border-radius: var(--border-radius);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--secondary-color);
    display: flex;
    flex-direction: column;
}
.process-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}
.process-icon {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}
.process-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-color);
}
.process-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
    flex-grow: 1; /* Pushes button to the bottom */
    margin-bottom: 25px;
}
.process-card .btn {
    margin-top: auto; /* Aligns button to the bottom */
}
/* === END OF NEW STYLES === */

/* === NEW: Highlight style for the AI Problem Generator Card === */
.process-card--highlight {
    background-color: #fffbeb; 
    border-top-color: var(--accent-color);
}
.process-card--highlight .process-icon {
    color: #f7b247; /* A rich gold color */
}
.process-card--highlight:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(247, 178, 71, 0.25); /* A warm, glowing shadow */
}
.process-card--highlight .btn-primary {
    background: linear-gradient(90deg, #f7b247, var(--accent-color));
    color: var(--text-color);
    box-shadow: 0 4px 15px rgba(247, 178, 71, 0.3);
}
.process-card--highlight .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(247, 178, 71, 0.4);
    transform: translateY(-3px);
}
/* === END OF HIGHLIGHT STYLES === */

.join-us-section {
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
}
.join-us-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}
.join-us-content h2 {
    font-size: 2.8rem;
}
.join-us-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}
#cal-inline-widget {
    min-height: 650px;
}
.back-button-container { 
    text-align: center; 
    margin-top: 40px; 
}
.back-button {
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.back-button:hover {
    background: var(--text-color);
    color: var(--light-text-color);
    border-color: var(--text-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.back-button i { margin-right: 8px; }

/* --- Booking Page Specific Styles --- */
.booking-section { 
    padding-top: 140px; 
    padding-bottom: 80px; 
    min-height: 80vh; 
}
.booking-section .section-title { 
    margin-bottom: 20px; 
}
.progress-bar-container {
    width: 100%;
    max-width: 500px; /* Increased width for 5 steps */
    background-color: #e9ecef;
    border-radius: 25px;
    margin: 0 auto 20px;
    height: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}
.progress-bar {
    height: 100%;
    width: 20%; /* UPDATED for 5 steps */
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 25px;
    transition: width 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.booking-step-indicator { 
    text-align: center; 
    margin-bottom: 30px; 
    font-size: 1.4rem; 
    font-weight: 700; 
    color: var(--text-color); 
}
.booking-selection-details {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    margin-top: 8px;
}
.booking-container { 
    max-width: 1100px; 
    margin: 0 auto; 
    position: relative; 
    min-height: 400px;
}
.booking-view {
    opacity: 0;
    visibility: hidden;
    display: none;
    transition: opacity 0.4s ease-in-out;
    position: relative;
}
.booking-view.active {
    opacity: 1;
    visibility: visible;
    display: block;
}
.loader-container {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--secondary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 250px);
    gap: 25px;
    justify-content: center;
}
.subject-btn {
    background: var(--card-bg-color);
    color: var(--text-color);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.subject-btn:hover {
    transform: translateY(-8px); 
    box-shadow: 0 10px 25px rgba(106, 17, 203, 0.15); 
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.subject-btn i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}
.tutor-count-badge {
    position: absolute;
    top: 12px;
    right: 15px;
    background-color: var(--accent-color);
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    line-height: 1.2;
    transition: all 0.3s ease;
}
.subject-btn:hover .tutor-count-badge {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    transform: scale(1.05);
}
.subject-btn--unavailable {
    opacity: 0.7;
    cursor: not-allowed;
}
.subject-btn--unavailable i {
    color: #aaa;
}
.subject-btn--unavailable:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    color: var(--text-color);
    border-color: #f0f0f0;
}
.subject-btn--unavailable:hover i { color: #aaa; }
.subject-btn--unavailable .tutor-count-badge { display: none; }

/* === NEW: Grade Selection Styles === */
#grade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    /* Adjusted max-width to prevent a 5th column from fitting, effectively capping it at 4 columns. */
    max-width: 670px;
    margin: 0 auto;
    justify-content: center;
}

.grade-btn {
    background: var(--card-bg-color);
    color: var(--text-color);
    border-radius: var(--border-radius);
    padding: 20px 10px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    width: 100%;
}

.grade-btn:hover:not(:disabled) {
    transform: translateY(-6px); 
    box-shadow: 0 8px 20px rgba(106, 17, 203, 0.12); 
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.grade-btn--unavailable,
.grade-btn:disabled {
    opacity: 0.6;
    background-color: #f8f9fa;
    cursor: not-allowed;
    color: #6c757d;
    border-color: #e9ecef;
}

#tutor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    align-items: stretch;
    justify-content: center;
}
.tutor-card.booking-page-card {
    max-width: 380px;
    margin: 0 auto;
    cursor: pointer;
    padding: 0;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.tutor-card.booking-page-card:hover h3 {
    color: var(--primary-color);
}

.tutor-card.booking-page-card .tutor-card-content {
    padding: 20px 20px 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tutor-card.booking-page-card .tutor-image-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
}

.tutor-card.booking-page-card h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.tutor-details-pill {
    display: inline-flex;
    align-items: center;
    background-color: #eef2ff;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 auto 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.tutor-details-pill span {
    color: var(--secondary-color);
    text-transform: uppercase;
}

.tutor-details-pill span:last-child:not(:first-child) {
    padding-left: 10px;
    margin-left: 10px;
    border-left: 1px solid #d0d9f0;
}

.tutor-card.booking-page-card .tutor-card-description {
    font-size: 0.95rem;
    color: #555;
    text-align: left;
    flex-grow: 1;
    margin-bottom: 15px;
}

.tutor-card.booking-page-card .tutor-action-area {
    border-top: 1px solid #eee;
    margin-top: auto;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tutor-card.booking-page-card .tutor-pricing {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
}

.tutor-card.booking-page-card .tutor-pricing .price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-color);
}

.tutor-card.booking-page-card .tutor-pricing .duration {
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
}

.tutor-card.booking-page-card .cta-button {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--light-text-color);
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.payment-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    font-size: 2rem;
    color: #ccc;
}

.tutor-card.booking-page-card:hover .cta-button {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}

.tutor-card.booking-page-card .payment-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 5px;
}

.tutor-card.booking-page-card .payment-logos i {
    font-size: 1.8rem;
    color: #888;
}

/* --- NEW: Tutor Card Badge Styles --- */
.tutor-card-badge-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}

.tutor-card-badge {
    position: absolute;
    top: 35px;
    right: -35px;
    width: 200px;
    padding: 8px 0;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-color);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    transform: rotate(45deg);
    transform-origin: center;
}

.tutor-card-badge--recommended {
    background-color: var(--accent-color);
    color: var(--text-color);
}

.tutor-card-badge--new {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
}


/* === NEW: Tutor Card styles for the Main Page === */
.tutor-card.main-page-card {
    padding: 0;
    border: 1px solid #e9ecef;
    border-top: none; /* Override the original gradient border */
    border-image: none; /* Ensure no image is used */
    text-align: center; /* Override default card alignment */
    max-width: 380px; /* Match booking page for consistency */
    margin: 0 auto; /* Center in grid cell */
}

.tutor-card.main-page-card .tutor-card-content {
    padding: 20px 20px 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tutor-card.main-page-card .tutor-image-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
}

.tutor-card.main-page-card h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.tutor-card.main-page-card .tutor-card-description {
    font-size: 0.95rem;
    color: #555;
    text-align: left;
    flex-grow: 1;
    margin-bottom: 15px;
}

.tutor-card.main-page-card .tutor-action-area {
    border-top: 1px solid #eee;
    margin-top: auto;
    padding: 15px 20px;
}

.tutor-card.main-page-card .cta-button {
    display: block;
    text-decoration: none;
    text-align: center;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--light-text-color);
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tutor-card.main-page-card:hover .cta-button {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}
#notification-form-container {
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 40px;
    max-width: 600px;
    margin: 20px auto 0;
    text-align: center;
}
#notification-form-container h3 { margin-bottom: 15px; font-size: 1.8rem; }
#notification-form-container p { margin-bottom: 25px; color: #666; }
#notification-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
#notification-email {
    padding: 15px;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-family: 'Poppins', sans-serif;
}
#notification-submit {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--light-text-color);
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s;
}
#notification-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
#notification-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
#form-success-message { display: none; }
#form-success-message h3 { color: var(--primary-color); }
#no-tutors-message {
    display: none; 
    text-align: center; 
    font-size: 1.2rem; 
    padding: 40px 20px; 
    background: #f0f0f0; 
    border-radius: var(--border-radius);
}

/* === NEW: Onboarding Steps Section (Mokytojams page) === */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.benefit-card {
    background: var(--card-bg-color);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--primary-color);
    display: flex;
    flex-direction: column;
}

.benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.benefit-card .benefit-icon {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.benefit-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.benefit-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 25px;
}

/* --- Responsive Styles --- */
@media (max-width: 992px) {
    h2.section-title { font-size: 2.2rem; }
    .join-us-content h2 { font-size: 2.5rem; }
    
    .hero {
        /* MODIFICATION: Removed bottom padding to align image with gradient bottom */
        padding: 160px 0 0; 
        overflow: hidden; 
    }

    .hero .hero-container {
        flex-direction: column; 
        align-items: center; /* Center items for stacked layout */
        text-align: center;
    }
    .hero-content {
        order: 1; /* Text appears first on mobile */
        text-align: center; /* Center the text and button */
        padding-bottom: 0; /* Reset desktop-specific padding */
    }
    .hero-image {
        order: 2; /* Image appears second on mobile */
        /* MODIFICATION: Increased top margin for better spacing after removing hero padding */
        margin-top: 60px;
        margin-bottom: 0; /* Reset negative margin */
    }
    .hero-benefits {
        display: inline-block; 
        text-align: left; 
        margin: 0 auto 40px;
    }
    .hero h1 { font-size: 3rem; }
}

@media (max-width: 768px) {
    section { padding: 60px 0; }
    .hero { 
        padding: 140px 0 0;
    }
    .hero h1 { font-size: 2.5rem; }
    h2.section-title { font-size: 2rem; }
    .join-us-content h2 { font-size: 2.2rem; }
    .booking-section { padding: 120px 0 60px; }

    /* === Responsive styles for compact "How it Works" section === */
    .how-it-works-compact-container {
        flex-direction: column;
        align-items: center; /* Center items when stacked */
        gap: 25px;
    }
    .compact-step {
        width: 100%;
        max-width: 400px; /* Limit width on mobile */
        gap: 15px; /* Reduce gap on mobile */
    }
    .compact-step-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    .compact-step h3 {
        font-size: 1.1rem;
    }
    .compact-step p {
        font-size: 0.9rem;
    }
    
    /* === More compact, less "card-like" tip for mobile === */
    .how-it-works-tip {
        gap: 15px;
        margin-top: 35px;
    }
    .how-it-works-tip .tip-icon {
        font-size: 1.6rem;
    }
    .how-it-works-tip p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* MODIFICATION: Make subject grid 2 columns on mobile to reduce scrolling. */
    #subject-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .subject-btn { 
        padding: 20px 10px;
        font-size: 1rem;
    }
    .subject-btn i {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
    .tutor-count-badge {
        top: 8px;
        right: 8px;
        padding: 2px 8px;
        font-size: 0.75rem;
    }

    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    nav .nav-links {
        position: fixed;
        top: 0;
        left: 100%;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, rgba(106, 17, 203, 0.98), rgba(37, 117, 252, 0.98));
        backdrop-filter: blur(5px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1001;
    }
    
    nav .nav-links.active {
        left: 0;
    }

    nav .nav-links a {
        color: var(--light-text-color);
        font-size: 1.6rem;
        font-weight: 600;
    }
    nav .nav-links a:hover::after {
        transform: scaleX(0);
    }

    .slider-nav {
        display: none;
    }
    .testimonial-slider-wrapper { padding: 0 15px; }
    .testimonial-card { padding: 30px; }

    .work-in-progress-section {
        padding: 140px 0 80px;
    }
    .wip-content h1 {
        font-size: 2.2rem;
    }
    .wip-content p {
        font-size: 1.1rem;
    }
    .details-list {
        font-size: 1rem;
    }
}

/* --- Form & Generator Styles --- */
/* Generic page subtitle */
.page-subtitle {
    text-align: center;
    max-width: 600px;
    margin: -30px auto 40px;
}
/* Generic Form Group styling */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}
.form-group input, 
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #fff;
    /* FIX: Ensure select text is not blue on iOS */
    color: var(--text-color);
}
.form-group input:focus, 
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.2);
}

/* Custom Select Dropdown Styling */
.select-wrapper {
    position: relative;
}
.form-group select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 40px; /* Make space for the custom arrow */
}
.select-wrapper::after {
    content: '\f078'; /* Font Awesome down-arrow */
    font-family: 'Font Awesome 6 Free'; /* Ensure Font Awesome is loaded */
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #888;
    transition: color 0.3s ease, transform 0.3s ease;
}
/* Effects for the custom arrow */
.select-wrapper:hover::after {
    color: var(--primary-color);
}
.select-wrapper:focus-within::after {
    color: var(--primary-color);
    transform: translateY(-50%) rotate(180deg); /* Flip arrow on focus */
}

/* === NEW: Booking Details Form Styles === */
.details-form-container {
    max-width: 500px;
    margin: 0 auto;
    background: var(--card-bg-color);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

#student-details-form button[type="submit"] {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* === NEW: Email Confirmation Modal Styles === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* MODIFIED */
    z-index: 2000;
    padding: 10vh 20px 20px 20px; /* MODIFIED */
    backdrop-filter: blur(5px);
}
.modal-content {
    background-color: var(--card-bg-color);
    padding: 30px 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 500px;
    width: 100%;
    text-align: center;
}
.modal-content h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
}
.modal-content p {
    color: #555;
    margin-bottom: 25px;
}
.email-display {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: left;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}
.email-display strong {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--text-color);
}
.email-display span {
    font-size: 1.05rem;
    color: var(--primary-color);
    word-break: break-all;
}
.modal-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}
.modal-actions .btn {
    font-size: 1rem;
}
.modal-actions .btn.btn-primary {
    order: 2;
}
.modal-actions .btn:not(.btn-primary) {
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    color: var(--text-color);
}
.modal-actions .btn:not(.btn-primary):hover {
    background: #e9ecef;
}

/* === NEW: Invalid Input Animation === */
/* Keyframe for the blinking red border effect */
@keyframes blink-red-border {
  from, to {
    border-color: #ced4da; /* Normal color */
    box-shadow: none;
  }
  50% {
    border-color: #e03131; /* Red highlight color */
    box-shadow: 0 0 5px rgba(224, 49, 49, 0.4);
  }
}

/* Class to apply the animation to invalid inputs */
.input-error {
  /* Runs the 0.5s animation twice */
  animation: blink-red-border 0.5s ease-in-out 2;
}


/* Invoice Generator Specifics (saskaita.html) */
.invoice-generator-section {
    padding-top: 120px;
    padding-bottom: 80px;
    min-height: 80vh;
}
.invoice-form-wrapper {
    display: flex;
    justify-content: center;
}
/* Card container for the invoice form and toggle */
.invoice-content-card {
    background: var(--card-bg-color);
    padding: 30px 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 700px;
}
/* Invoice party swap toggle and header */
.invoice-form-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}
.toggle-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
}
.toggle-switch-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    color: var(--text-color);
}
#seller-iban:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.7;
}
.toggle-switch-container span {
    font-size: 0.95rem;
}
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    flex-shrink: 0;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}
input:checked + .slider {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}
input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}
input:checked + .slider:before {
    transform: translateX(26px);
}
.slider.round {
    border-radius: 34px;
}
.slider.round:before {
    border-radius: 50%;
}
#invoice-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* MODIFICATION START: Styles for multiple service lines */
#service-lines-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.invoice-service-line {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto; /* Name, Qty, Price, RemoveBtn */
    gap: 15px;
    align-items: flex-end; /* Align items to the bottom */
}
#add-service-btn {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 0;
    padding: 10px;
    border: 2px dashed #ced4da;
    background-color: #f8f9fa;
    color: var(--text-color);
    font-size: 0.95rem;
}
#add-service-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}
.remove-service-btn {
    background: none;
    border: none;
    color: #868e96;
    font-size: 1.5rem;
    padding: 10px; /* Makes it easier to click */
    cursor: pointer;
    line-height: 1; /* Aligns icon better */
    transition: color 0.2s ease;
}
.remove-service-btn:hover {
    color: #e03131; /* Red color for delete action */
}
/* MODIFICATION END */

#invoice-form #download-pdf {
    grid-column: 1 / -1; /* Button spans both columns */
    width: 100%;
    margin-top: 15px;
    font-size: 1.1rem;
}
@media (max-width: 768px) {
    #invoice-form {
        grid-template-columns: 1fr;
    }
    .invoice-content-card {
        padding: 25px;
    }
    .invoice-service-line {
        grid-template-columns: 1fr; /* Stack items vertically on mobile */
    }
    .remove-service-btn {
        justify-self: end; /* Align remove button to the right */
        padding: 5px;
    }
}

/* --- Gamified Problem Solver Styles (zaidimas.html) --- */
.generator-section {
    padding-top: 140px;
    padding-bottom: 80px;
    min-height: 80vh;
}
.generator-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.generator-ui {
    padding: 40px 50px;
    text-align: center;
    transition: opacity 0.3s ease-in-out;
}
.generator-ui.is-loading {
    opacity: 0.2;
    pointer-events: none;
}
.generator-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.generator-ui h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}
.generator-ui p {
    color: #555;
    margin-bottom: 30px;
}
#generate-pdf-btn {
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    font-size: 1.1rem;
}
/* Topic Suggestions */
.topic-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    justify-content: center;
}
.suggestion-chip {
    background-color: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
}
.suggestion-chip:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}
/* Loading Overlay */
.generator-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
    padding: 20px;
    backdrop-filter: blur(4px);
}
.generator-loading-overlay h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e9ecef;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}
#timer {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
}
.loading-info {
    font-size: 0.9rem;
    color: #555;
}
/* Error Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 150%);
    background: #d90429;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.toast-notification.show {
    transform: translate(-50%, 0);
}
.toast-notification i {
    font-size: 1.5rem;
}
@media (max-width: 768px) {
    .generator-ui { padding: 30px 25px; }
}

/* --- Discount Notification Styles --- */
#discount-notification {
    background-color: #e6f9f0; /* Šviesiai žalia */
    color: #0d6b42; /* Tamsiai žalias tekstas */
    border: 1px solid #a6e4c4;
    border-radius: 12px;
    padding: 15px 20px;
    margin: 0 auto 25px;
    max-width: 600px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    display: none; /* Pagal nutylėjimą paslėptas */
    align-items: center;
    justify-content: center;
    gap: 10px;
}
#discount-notification.visible {
    display: flex; /* Rodyti, kai pridedama 'visible' klasė */
}
#discount-notification i {
    font-size: 1.3rem;
}

/* --- NEW: Tutor Busyness Display Styles --- */
.tutor-busyness-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

.tutor-busyness-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1); /* Subtle ring effect */
}

.busyness-free {
    background-color: #28a745; /* Green */
}

.busyness-medium {
    background-color: #ffc107; /* Orange */
}

.busyness-busy {
    background-color: #dc3545; /* Red */
}

/* === NEW STYLES FOR GRADIENT BACKGROUNDS === */

/* Rule to override default padding for specific sections that use the .hero class */
#tutors,
#faq.hero {
    padding: 80px 0;
}

/* Rule to ensure section titles are light-colored on any .hero background */
.hero .section-title {
    color: var(--light-text-color);
}

/* --- Gamified Problem Solver Styles (NATIVE & MOBILE OPTIMIZED) --- */
.solver-section {
    padding-top: 100px; /* Reduced for mobile */
    padding-bottom: 40px;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
}

.solver-section .container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%; 
}

/* Native feel: Transparent wrapper, no borders/shadows */
.solver-wrapper {
    position: relative;
    background: transparent; 
    box-shadow: none;
    border-radius: 0;
    padding: 0; 
    text-align: center;
}

.solver-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
}

.streak-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    background-color: #fff;
    padding: 6px 15px;
    border-radius: 50px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.streak-counter .fa-fire {
    color: #ff9a00;
    font-size: 1.2rem;
}

/* Selection Screens */
.selection-header {
    margin-bottom: 25px;
    position: relative;
}
.selection-header::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    margin: 10px auto 0;
}

.selection-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.selection-header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.bubble-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.bubble {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.bubble:hover {
    background-color: #fff;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.08);
}

.bubble.active {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--light-text-color);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}

#grade-selection.hidden,
#topic-selection.hidden {
    display: none;
}

#problem-screen {
    text-align: left;
    display: none;
    animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#problem-screen.active {
    display: block;
}

#problem-question {
    font-size: 1.35rem;
    margin-bottom: 25px;
    line-height: 1.6;
    background-color: #fff;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    color: var(--text-color);
    font-weight: 500;
    transition: opacity 0.3s ease;
}

#problem-choices {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    transition: opacity 0.3s ease;
}

/* Skeleton Loading State for initial load */
.is-loading-skeleton #problem-question,
.is-loading-skeleton #problem-choices {
    opacity: 0.6;
    pointer-events: none;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 0.3; }
    100% { opacity: 0.6; }
}


.choice-btn {
    width: 100%;
    text-align: left;
    background: #fff;
    border: 1px solid #e0e0e0;
    color: var(--text-color);
    font-size: 1.1rem;
    padding: 18px 25px;
    border-radius: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
    /* NEW: Flex layout for better label alignment */
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.choice-btn:hover:not(:disabled) {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.choice-btn.correct {
    background-color: #ecfdf5;
    border-color: #10b981;
    color: #065f46;
    font-weight: 600;
}

.choice-btn.incorrect {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
    font-weight: 600;
}

/* NEW: Style for the choice label (A., B., etc.) */
.choice-letter {
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
}

.choice-text {
    flex-grow: 1;
}

#feedback-container {
    margin-top: 25px;
    padding: 25px;
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    text-align: center;
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

#feedback-result {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#feedback-explanation {
    font-size: 1.05rem;
    margin-bottom: 25px;
    color: #4b5563;
    line-height: 1.7;
    text-align: left;
}

#next-problem-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
}

/* Button Loading State Styles */
.btn-loading {
    color: transparent !important;
    position: relative;
    cursor: wait;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: btn-spin 0.8s linear infinite;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    h2.section-title { font-size: 2.2rem; }
    .join-us-content h2 { font-size: 2.5rem; }
    .hero {
        padding: 160px 0 0; 
        overflow: hidden; 
    }
    .hero .hero-container {
        flex-direction: column; 
        align-items: center;
        text-align: center;
    }
    .hero-content {
        order: 1;
        text-align: center;
        padding-bottom: 0;
    }
    .hero-image {
        order: 2;
        margin-top: 60px;
        margin-bottom: 0;
    }
    .hero-benefits {
        display: inline-block; 
        text-align: left; 
        margin: 0 auto 40px;
    }
    .hero h1 { font-size: 3rem; }
}

@media (max-width: 768px) {
    section { padding: 60px 0; }
    .hero { padding: 140px 0 0; }
    .hero h1 { font-size: 2.5rem; }
    h2.section-title { font-size: 2rem; }
    .join-us-content h2 { font-size: 2.2rem; }
    .booking-section { padding: 120px 0 60px; }

    /* Solver Specifics */
    .solver-section {
        padding-top: 90px;
        padding-bottom: 20px;
    }
    .solver-section .container {
        padding: 0 15px;
    }
    .solver-wrapper {
        padding: 0;
    }
    #problem-question {
        font-size: 1.25rem;
        padding: 20px;
        margin-bottom: 20px;
        border-radius: 16px;
    }
    .choice-btn {
        padding: 16px 20px;
        font-size: 1rem;
        border-radius: 14px;
    }
    #feedback-container {
        padding: 20px;
        border-radius: 16px;
    }
    .bubble {
        flex: 1 1 auto;
        text-align: center;
    }
    
    /* Other sections */
    .how-it-works-compact-container {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }
    .compact-step {
        width: 100%;
        max-width: 400px;
        gap: 15px;
    }
    #subject-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    .subject-btn { 
        padding: 20px 10px;
        font-size: 1rem;
    }
    .subject-btn i {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
    
    .hamburger { display: block; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    nav .nav-links {
        position: fixed;
        top: 0;
        left: 100%;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, rgba(106, 17, 203, 0.98), rgba(37, 117, 252, 0.98));
        backdrop-filter: blur(5px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1001;
    }
    nav .nav-links.active { left: 0; }
    nav .nav-links a {
        color: var(--light-text-color);
        font-size: 1.6rem;
        font-weight: 600;
    }
    
    .slider-nav { display: none; }
    .testimonial-slider-wrapper { padding: 0 15px; }
    .testimonial-card { padding: 30px; }
    
    #invoice-form { grid-template-columns: 1fr; }
    .invoice-content-card { padding: 25px; }
    .invoice-service-line { grid-template-columns: 1fr; }
    .remove-service-btn { justify-self: end; padding: 5px; }
}

.loader-container {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--secondary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}
