@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600&display=swap');

:root {
    --ly-primary: #6A521E;
    --ly-primary-light: #835C16;
    --ly-primary-dark: #4A3914;
    --ly-secondary: #835C16;
    --ly-third: #A48147;
    --ly-accent: #A48147;
    --ly-light: #D9CAB7;
    --ly-bg-light: #FAF7F4;
    --ly-text: #2c2c2c;
    --ly-text-muted: #6c757d;
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    color: var(--ly-text);
    background-color: #fff;
}

h1, h2, h3, h4, h5, h6,
.fw-bold, .fw-semibold,
.navbar-brand span,
.card-body h5,
.section-title {
    font-weight: 600;
}

a {
    color: var(--ly-primary);
}

a:hover {
    color: var(--ly-primary-dark);
}

/* Header */
.brand-text {
    text-transform: uppercase !important;
    letter-spacing: 4px !important;
    font-size: 2rem !important;
    font-weight: 400 !important;
    color: #fff !important;
}

.navbar {
    padding: 0.3rem 0;
    min-height: 60px;
}

.navbar-brand span {
    color: #fff;
    font-size: 1.3rem;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #fff !important;
}

.btn-booking {
    background-color: var(--ly-light) !important;
    color: var(--ly-primary) !important;
    border-radius: 2rem;
    padding: 0.4rem 1.25rem !important;
    margin-left: 0.5rem;
    transition: background-color 0.2s ease;
}

.btn-booking:hover {
    background-color: #fff !important;
    color: var(--ly-primary) !important;
}

.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(106, 82, 30, 0.65),
        rgba(74, 57, 20, 0.80)
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero .btn {
    background-color: var(--ly-accent);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 2rem;
    transition: background-color 0.2s ease;
}

.hero .btn:hover {
    background-color: #835C16;
}

/* Scroll offset for sticky navbar */
section[id] {
    scroll-margin-top: 80px;
}

.hero-carousel {
    position: relative;
}

.hero-carousel-img {
    height: 100vh;
    object-fit: cover;
}

/*
 * Admin-authored content (About page, News articles) comes from a WYSIWYG
 * editor and can contain images with hardcoded inline widths/floats sized
 * for a desktop column — e.g. `style="width: 290px; float: right"`. We
 * don't control that markup, so override it defensively rather than
 * editing the stored HTML.
 */
.cms-content img {
    max-width: 100% !important;
    height: auto !important;
}

/*
 * Summernote (the WYSIWYG editor) lets an author float an image left/right
 * (marked with note-float-left/note-float-right) while independently
 * setting its inline width to anything, including 100% — floating a
 * full-width element breaks the layout regardless of screen size. Cap
 * floated images to a sane width so that combination can't happen, no
 * matter what width the editor wrote.
 */
.cms-content img.note-float-left,
.cms-content img.note-float-right {
    max-width: 320px !important;
}

.hero-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 100%;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-overlay-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-overlay-text p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

.hero-overlay-text .btn {
    background-color: var(--ly-accent);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 2rem;
    transition: background-color 0.2s ease;
}

.hero-overlay-text .btn:hover {
    background-color: #835C16;
}

.section-title {
    color: var(--ly-primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--ly-text-muted);
    margin-bottom: 2.5rem;
}

.card {
    border: none;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(106, 82, 30, 0.15);
}

.card-img-top {
    height: 220px;
    object-fit: cover;
}

.card-body h5 {
    color: var(--ly-primary);
    font-weight: 600;
}

.card-teacher .card-img-top {
    height: 280px;
    object-fit: cover;
}

.card-teacher:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(106, 82, 30, 0.18);
}

.card-facility .card-img-top {
    height: 240px;
}

.card-news .card-img-top {
    height: 200px;
}

.card-news .card-date {
    font-size: 0.85rem;
    color: var(--ly-text-muted);
}

footer a:hover {
    color: var(--ly-secondary) !important;
}

@media (max-width: 768px) {
    .hero {
        min-height: 50vh;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-overlay-text h1 {
        font-size: 2rem;
    }

    .hero-overlay-text p {
        font-size: 1rem;
    }

    .card-img-top {
        height: 180px;
    }

    .card-teacher .card-img-top {
        height: 220px;
    }

    /* A floated fixed-width image next to text just squeezes the text into
       a thin, cramped column on a narrow screen — stack instead. */
    .cms-content img {
        float: none !important;
        display: block;
        margin: 0 auto 1rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 1.6rem;
    }

    .navbar-brand span {
        font-size: 1.1rem;
    }
}

/* --- Timetable Redesign --- */

/* Hero Section */
.tt-hero {
    background-image: linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.95)), url('https://images.unsplash.com/photo-1544367567-0f2fcb009e0b?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    padding: 4rem 0 2rem 0;
    margin-bottom: 2rem;
}

.tt-title {
    font-size: 3rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.tt-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: #6A521E;
}

/* Date Scroller */
.tt-date-scroller {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
    scroll-behavior: smooth;
}
.tt-date-scroller::-webkit-scrollbar { display: none; }

.tt-date-card {
    min-width: 70px;
    height: 70px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #6A521E;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s;
    cursor: pointer;
}

.tt-date-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tt-date-card.active {
    background: #6A521E;
    color: #fff;
    transform: scale(1.05);
}

.tt-date-card .day-name { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; }
.tt-date-card .day-num { font-size: 1.4rem; font-weight: 700; line-height: 1; }

/* Filters */
.tt-filter-select {
    border: 1px solid #D9CAB7;
    border-radius: 8px;
    padding: 12px 15px;
    background-color: #fff;
    color: #333;
    font-weight: 500;
}
.tt-filter-select:focus {
    border-color: #6A521E;
    box-shadow: 0 0 0 0.2rem rgba(106, 82, 30, 0.15);
}

/* Class Cards */
.tt-class-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(106, 82, 30, 0.05);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid rgba(217, 202, 183, 0.3);
}

.tt-icon-circle {
    width: 60px;
    height: 60px;
    background-color: #D9CAB7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6A521E;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tt-class-info { flex-grow: 1; }
.tt-class-title { font-size: 1.25rem; font-weight: 700; color: #1a1a1a; margin-bottom: 0.2rem; }
.tt-class-duration { font-size: 0.9rem; color: #666; margin-bottom: 0.5rem; }
.tt-class-meta { font-size: 0.95rem; color: #444; }
.tt-class-meta strong { color: #1a1a1a; }

.tt-action-area {
    text-align: right;
    min-width: 150px;
}

.tt-spaces-left {
    display: block;
    font-size: 0.9rem;
    color: #6A521E;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.tt-btn-book {
    background-color: #6A521E;
    color: #fff;
    border-radius: 30px;
    padding: 10px 24px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
    border: none;
}

.tt-btn-book:hover {
    background-color: #835C16;
    color: #fff;
}

.tt-day-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 2rem 0 1rem 0;
}
