/* ── Font loading ── */
@font-face {
    font-family: "Khmer OS Siemreap";
    src: url("/assets/fonts/web/KHMEROS_SIEMREAP.TTF") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #2c5f8b;
    --secondary-color: #4b8bbe;
    --accent-color: #ffa41b;
    --dark-color: #1a3a5f;
    --text-color: #4a4a4a;
    --font-body: "Inter", "Khmer OS Siemreap", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-heading: "Poppins", "Khmer OS Siemreap", "Inter", system-ui, sans-serif;
}

/* ── Base ── */
body { font-family: var(--font-body); color: var(--text-color); line-height: 1.7; }
h1, h2, h3, h4, h5, h6, .navbar-brand, .hero-content h1, .card-title {
    font-family: var(--font-heading); font-weight: 600; color: var(--dark-color);
}

/* ── Navbar ── */
.navbar { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.06); padding: .8rem 1rem; }
.navbar-brand { font-size: 1.6rem; font-weight: 700; color: var(--primary-color) !important; display: flex; align-items: center; }
.navbar-brand img { height: 75px; margin-right: 12px; }
.navbar-toggler { border: none; } .navbar-toggler:focus { box-shadow: none; }
.navbar-nav .nav-link, .nav-link-action {
    color: var(--text-color); font-weight: 500; margin: 0 .5rem; padding: .5rem 0;
    position: relative; background: transparent; border: 0;
}
.navbar-nav .nav-link::after, .nav-link-action::after {
    content: ""; position: absolute; bottom: 0; left: 0; width: 0; height: 3px;
    background: var(--accent-color); transition: width .3s;
}
.navbar-nav .nav-link:hover::after, .navbar-nav .nav-link.active::after,
.nav-link-action:hover::after { width: 100%; }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active, .nav-link-action:hover { color: var(--primary-color); }
.nav-button-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.navbar .btn-action { margin-left: 1rem; font-weight: 500; padding: .5rem 1.2rem; border-radius: 6px; }
.btn-login { background: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); }
.btn-login:hover { background: var(--primary-color); color: #fff; }

/* ── Hero ── */
.hero-section {
    background: linear-gradient(rgba(26,58,95,.85), rgba(35,55,78,.9)), url("/assets/images/banner.jpg") no-repeat top center / cover;
    color: #fff; padding: 8rem 0 6rem; text-align: center; position: relative; overflow: hidden;
}
.hero-content h1 { font-size: 3.2rem; font-weight: 700; margin-bottom: 1.5rem; line-height: 1.5; overflow-wrap: anywhere; color: #fff; }
.hero-content p { font-size: 1.3rem; margin-bottom: 2.5rem; max-width: 700px; margin-inline: auto; opacity: .9; overflow-wrap: anywhere; }
.hero-content .btn { padding: .8rem 2.2rem; font-size: 1.1rem; border-radius: 6px; font-weight: 500; }
.hero-content .btn-primary { background: var(--accent-color); border-color: var(--accent-color); }
.hero-content .btn-primary:hover { background: #e8950b; border-color: #e8950b; }
.floating-elements { display: none; }

/* ── Layout ── */
.content-section { padding: 4rem 0; }
.layout-shell { max-width: 1200px; margin: 0 auto; }
.section-header { margin-bottom: 2rem; }
.button-group-inline { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.section-lead { text-align: center; margin-bottom: 2rem; }
.section-lead .lead { max-width: 760px; margin: 0 auto; }
.section-lead-text { text-align: center; color: var(--text-color); margin-top: -1.5rem; margin-bottom: 2.5rem; opacity: .75; }
.text-preline { white-space: pre-line; }

/* ── Section title ── */
.section-title { text-align: center; margin-bottom: 3rem; font-size: 2.3rem; font-weight: 700; color: var(--dark-color); }
.section-title::after { content: ""; display: block; width: 80px; height: 4px; background: var(--accent-color); margin: 15px auto 0; border-radius: 2px; }

/* ── Cards (ui-card) ── */
.ui-card { position: relative; display: flex; flex-direction: column; min-width: 0; word-wrap: break-word; background: #fff; background-clip: border-box; border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,0,0,.06); box-shadow: 0 2px 12px rgba(0,0,0,.06); margin-bottom: 2rem; }
.ui-card > .card-body { flex: 1 1 auto; padding: 1rem 1.5rem; }
.ui-card .card-header { background: var(--primary-color); color: #fff; border-bottom: none; padding: 1.2rem 1.5rem; font-size: 1.25rem; font-weight: 600; display: flex; align-items: center; }
.ui-card .card-header i { margin-right: .75rem; color: var(--accent-color); }

/* ── Blog images (portrait fix: always show top) ── */
.blog-card-image-wrap { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #e8eef4; }
.blog-card-image-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.blog-card-image-featured { aspect-ratio: 16 / 9; }
.blog-card-meta { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .8rem; color: #6c757d; margin-bottom: .25rem; }
.blog-card-meta i { color: var(--secondary-color); }

/* ── Blog card carousel (per-card image slideshow) ── */
.blog-card-image-wrap .carousel-control-prev,
.blog-card-image-wrap .carousel-control-next { width: 2rem; opacity: .8; }
.blog-card-image-wrap .carousel-control-prev-icon,
.blog-card-image-wrap .carousel-control-next-icon { background-color: rgba(0,0,0,.45); border-radius: 50%; padding: .7rem; background-size: 55%; }

.blog-carousel-wrap { border-radius: 12px; overflow: hidden; background: #e8eef4; margin-bottom: 1.5rem; }
.blog-carousel-wrap .carousel-item img { width: 100%; max-height: 500px; object-fit: cover; object-position: top center; }
.blog-carousel-wrap .carousel-control-prev,
.blog-carousel-wrap .carousel-control-next { width: 3rem; opacity: .85; }
.blog-carousel-wrap .carousel-control-prev-icon,
.blog-carousel-wrap .carousel-control-next-icon { background-color: rgba(0,0,0,.5); border-radius: 50%; padding: 1rem; background-size: 55%; }
.blog-carousel-wrap .carousel-indicators button { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.35); opacity: .7; box-shadow: 0 0 3px rgba(0,0,0,.4); }
.blog-carousel-wrap .carousel-indicators button.active { background: var(--accent-color); border-color: var(--accent-color); opacity: 1; }
.blog-single-image-wrap { border-radius: 12px; overflow: hidden; background: #e8eef4; margin-bottom: 1.5rem; }
.blog-single-image-wrap img { width: 100%; max-height: 500px; object-fit: cover; object-position: top center; display: block; }
.blog-image-count { position: absolute; top: .75rem; right: .75rem; z-index: 5; background: rgba(0,0,0,.55); color: #fff; font-size: .75rem; padding: .25rem .6rem; border-radius: 20px; }
.blog-video-section { background: rgba(74,139,190,.04); border: 1px solid rgba(0,0,0,.06); border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; }
.blog-video-section .ratio { border-radius: 8px; overflow: hidden; }
.blog-meta { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: .75rem; color: #6c757d; font-size: .9rem; }
.blog-meta i { color: var(--secondary-color); }
.blog-edit-thumb { height: 80px; width: 100%; object-fit: cover; object-position: top center; border-radius: 6px; }

/* ── Features section ── */
.features-section { background: #fff; padding: 4rem 0; }
.feature-item { text-align: center; padding: 2rem; }
.feature-item-icon {
    width: 80px; height: 80px; background: rgba(74,139,190,.1); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem;
    color: var(--primary-color); font-size: 2rem;
}

/* ── Educator cards ── */
.educator-section { padding: 4.5rem 0; }
.educator-card { background: #fff; border-radius: 12px; overflow: hidden; text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.educator-photo-wrap { width: 100%; aspect-ratio: 3 / 4; overflow: hidden; background: #e8eef4; }
.educator-photo-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.educator-info { padding: 1.25rem 1rem 1.5rem; border-top: 3px solid var(--accent-color); }
.educator-name { font-size: 1.05rem; font-weight: 700; color: var(--dark-color); margin-bottom: .25rem; }
.educator-role {
    display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: var(--primary-color); background: rgba(44,95,139,.08);
    padding: .2rem .65rem; border-radius: 20px;
}

/* ── Testimonials (currently commented out, kept for future) ── */
.testimonials-section { background: rgba(74,139,190,.05); padding: 4rem 0; }
.testimonial-item { background: #fff; border-radius: 12px; padding: 2rem; box-shadow: 0 2px 12px rgba(0,0,0,.06); margin: 1rem; }
.testimonial-copy { margin-bottom: 1.25rem; }
.testimonial-profile { display: flex; align-items: center; gap: .75rem; }
.testimonial-profile img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.testimonial-meta h5 { margin: 0; font-size: 1rem; }
.testimonial-meta p { margin: 0; color: #6c757d; font-size: .875rem; }

/* ── Contact page ── */
.contact-info-panel { background: var(--dark-color); border-radius: 12px; padding: 2rem; color: #f8f9fa; }
.contact-info-group { margin-bottom: 1.75rem; }
.contact-info-label {
    display: block; font-size: .7rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--accent-color); margin-bottom: .6rem;
    padding-bottom: .4rem; border-bottom: 1px solid rgba(255,164,27,.25);
}
.contact-info-row { display: flex; align-items: flex-start; gap: .65rem; color: rgba(255,255,255,.75); font-size: .9rem; line-height: 1.7; margin-bottom: .35rem; }
.contact-info-row i { color: var(--accent-color); width: 1rem; text-align: center; flex-shrink: 0; margin-top: .2rem; }
.contact-info-row a { color: rgba(255,255,255,.75); text-decoration: none; }
.contact-info-row a:hover { color: var(--accent-color); }
.contact-map-frame { border: 0; display: block; width: 100%; height: 420px; }
.map-container { overflow: hidden; border-radius: 12px; }

/* ── Auth ── */
.auth-wrapper { max-width: 480px; margin: 0 auto; }
.auth-logo { max-width: 180px; margin: 0 auto 1rem; display: block; }

/* ── Social icons ── */
.social-icons { display: flex; flex-wrap: wrap; gap: .75rem; }
.social-icons a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.social-icons a:hover { background: var(--accent-color); }

/* ── Footer ── */
footer { background: var(--dark-color); color: #f8f9fa; }
.footer-main { padding: 3.5rem 0 2rem; }
.footer-heading { color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1.25rem; padding-bottom: .6rem; border-bottom: 2px solid rgba(255,164,27,.4); display: inline-block; }
.footer-tagline { color: rgba(255,255,255,.55); font-size: .9rem; line-height: 1.75; }
footer address p, footer address { color: rgba(255,255,255,.6); font-size: .9rem; line-height: 1.8; font-style: normal; margin-bottom: 0; }
footer address i { color: var(--accent-color); width: 1rem; text-align: center; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: rgba(255,255,255,.6); font-size: .9rem; text-decoration: none; display: inline-flex; align-items: center; gap: .25rem; }
.footer-links a i { color: var(--accent-color); }
.footer-links a:hover { color: #fff; }
footer a { color: rgba(255,255,255,.6); text-decoration: none; }
footer a:hover { color: var(--accent-color); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 1.25rem 0; text-align: center; }
.footer-bottom p { color: rgba(255,255,255,.4); font-size: .85rem; margin: 0; }
.brand-footer-logo { width: 110px; margin-bottom: 1.25rem; object-fit: contain; opacity: .85; }

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.1rem; }
    .navbar .btn-action { margin-left: 0; margin-top: .5rem; display: block; width: fit-content; }
    .navbar-collapse { padding-top: 1rem; }
    .section-title { font-size: 2rem; }
}
@media (max-width: 767.98px) {
    .hero-section { padding: 6rem 0 4rem; }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content p { font-size: 1rem; }
    .content-section { padding: 3rem 0; }
    .section-title { font-size: 1.8rem; }
    .contact-map-frame { height: 320px; }
}
@media (max-width: 575.98px) {
    .navbar-brand { font-size: 1.3rem; }
    .navbar-brand img { height: 50px; }
    .hero-content h1 { font-size: 1.8rem; }
    .hero-content .btn { width: 100%; }
    .contact-map-frame { height: 260px; }
    .blog-card-image-wrap { aspect-ratio: 3 / 2; }
    .blog-card-image-featured { aspect-ratio: 16 / 9; }
    .button-group-inline .btn { flex: 1 1 220px; max-width: 320px; text-align: center; }
    .auth-wrapper { max-width: 100%; }
}
