/* Inlingua Baku Custom Styles */

/* ── Floating Action Buttons (FAB stack) ────────────────────────────────── */
/*
 * Both buttons live inside .fab-stack — a fixed column anchored bottom-right.
 * .scroltop  = scroll-to-top   (theme element, overridden here)
 * .whatsapp-float = WhatsApp   (injected by inlingua-whatsapp.js)
 */

.fab-stack {
    position: fixed;
    bottom: 28px;
    right: 24px;
    display: flex;
    flex-direction: column-reverse; /* WhatsApp at bottom, scroll-top above */
    align-items: center;
    gap: 10px;
    z-index: 9999;
}

/* Shared FAB style */
.whatsapp-float,
.fab-stack .scroltop {
    position: static !important; /* override theme's fixed positioning */
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    border: none;
    outline: none;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0,0,0,.18);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    flex-shrink: 0;
}

.whatsapp-float:hover,
.fab-stack .scroltop:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
}

/* WhatsApp — brand green */
.whatsapp-float {
    background: #25d366;
    color: #fff !important;
}
.whatsapp-float:hover { background: #1ebe5d; }

/* Scroll-to-top — site gold */
.fab-stack .scroltop {
    background: #ffc600;
    color: #1a1a2e !important;
    line-height: 1;
}
.fab-stack .scroltop:hover { background: #ffcf2b; }

/* Tooltip labels (visible on hover, desktop only) */
.whatsapp-float::before,
.fab-stack .scroltop::before {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 10px);
    background: rgba(20,20,30,.82);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}
.whatsapp-float:hover::before,
.fab-stack .scroltop:hover::before {
    opacity: 1;
}

/* Mobile: slightly smaller */
@media (max-width: 767px) {
    .fab-stack { bottom: 20px; right: 16px; gap: 8px; }
    .whatsapp-float,
    .fab-stack .scroltop { width: 44px; height: 44px; font-size: 20px; }
    /* hide tooltips on touch devices */
    .whatsapp-float::before,
    .fab-stack .scroltop::before { display: none; }
}

/* Lead Capture Form */
.lead-capture-form {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 10px;
}

.lead-capture-form .form-control {
    height: 50px;
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 10px 20px;
}

.lead-capture-form select.form-control {
    height: 50px;
}

.lead-capture-form .btn {
    height: 50px;
    padding: 0 40px;
    border-radius: 5px;
}

/* Course Cards */
.course-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Blog Cards */
.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Pagination */
.pagination-wrapper {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

/* SEO Optimizations */
.breadcrumb-row {
    background: #f8f9fa;
    padding: 20px 0;
}

/* ── Language Switcher ──────────────────────────────────────────────────── */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 20px;
    padding: 3px;
    vertical-align: middle;
}

.lang-switcher__item {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255,255,255,.70);
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
    line-height: 1.6;
    white-space: nowrap;
}

.lang-switcher__item:hover {
    color: #fff;
    background: rgba(255,255,255,.15);
    text-decoration: none;
}

.lang-switcher__item--active {
    background: #ffc600;
    color: #1a1a2e !important;
}

.lang-switcher__item--active:hover {
    background: #ffcf2b;
    color: #1a1a2e !important;
}

/* Dark header variant (inner pages — top bar background is dark) */
.header .top-bar .lang-switcher {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.18);
}

/* Footer variant */
.site-footer .lang-switcher {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.18);
}

/* Language switcher inside mobile nav (top-bar is hidden on small screens) */
.lang-switcher-mobile {
    padding: 12px 15px 8px;
    border-top: 1px solid rgba(0,0,0,.08);
    margin-top: 8px;
}
.lang-switcher-mobile .lang-switcher {
    display: inline-flex;
    background: rgba(0,0,0,.06);
    border-color: rgba(0,0,0,.12);
}
.lang-switcher-mobile .lang-switcher__item {
    color: rgba(0,0,0,.75);
}
.lang-switcher-mobile .lang-switcher__item:hover {
    color: #1a1a2e;
    background: rgba(0,0,0,.1);
}
.lang-switcher-mobile .lang-switcher__item--active {
    background: #ffc600;
    color: #1a1a2e !important;
}

/* ── Course Details sidebar widget ─────────────────────────────────────── */
.course-info-widget {
    background: #fff;
    border: 1px solid #ebedf2;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.course-info-widget .widget-title.style-1 {
    background: #f8f9fb;
    margin: 0;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .3px;
    border-bottom: 2px solid #ffc600;
    line-height: 1.4;
}
.course-info-widget .widget-title.style-1:after {
    display: none; /* hide theme pseudo-border — we use border-bottom above */
}
.course-info-widget .course-meta-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.course-info-widget .course-meta-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid #f1f3f6;
    font-size: 14px;
    color: #444;
    line-height: 1.4;
}
.course-info-widget .course-meta-list li:last-child {
    border-bottom: none;
}
.course-info-widget .course-meta-list li i {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #fff8e6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #ffc600;
}
.course-info-widget .course-meta-list li strong {
    color: #222;
    font-weight: 600;
    white-space: nowrap;
}
.course-info-widget .course-cta {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.course-info-widget .price-badge {
    padding: 12px 20px 0;
    font-size: 26px;
    font-weight: 700;
    color: var(--color-primary, #ffc600);
    line-height: 1;
}

/* ── Testimonials Google link ───────────────────────────────────────────── */
.testimonial-google-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5f6368;
    text-decoration: none;
    font-weight: 500;
}
.testimonial-google-link:hover {
    color: #1a73e8;
    text-decoration: none;
}

/* ── Course cards — equal height, content-proof ────────────────────────── */
/*
 * Strategy:
 *  1. Each column is a flex container so the card stretches full height.
 *  2. The card itself is a flex column: image (fixed) + info (grows).
 *  3. Title is clamped to 2 lines, description to 3 lines — no matter how
 *     long the content is, every card in a row stays the same height.
 */

/* Courses page grid */
#courses-grid > [class*="col-"] {
    display: flex;
    margin-bottom: 30px;
}

#courses-grid .courses-bx {
    flex: 1;
}

/* ── The card itself ── */
.courses-bx {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.courses-bx:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.13);
}

/* ── Image area — fixed height, never distorts ── */
.courses-bx .courses-media,
.courses-bx .dlab-media {
    position: relative;
    flex-shrink: 0;
    height: 190px;
    overflow: hidden;
}

.courses-bx .courses-media img,
.courses-bx .dlab-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.courses-bx:hover .courses-media img,
.courses-bx:hover .dlab-media img {
    transform: scale(1.04);
}

/* ── Level / duration / price badge strip overlaid on the image ── */
.courses-bx .post-meta {
    position: absolute;
    inset: auto 0 0 0;
    padding: 22px 14px 10px;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 100%);
}

.courses-bx .post-meta ul {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.courses-bx .post-meta li {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

.courses-bx .post-meta li i {
    font-size: 13px;
}

.courses-bx .post-meta li.post-comment {
    margin-left: auto;
    color: #ffc600;
}

/* ── Text area — grows to fill remaining card height ── */
.courses-bx .dlab-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 18px 20px;
}

/* Title: bold, 2-line clamp — same height no matter the content */
.courses-bx .dlab-title {
    margin-bottom: 8px;
}

.courses-bx .dlab-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.45;
    font-weight: 700;
    color: #111;
    text-decoration: none;
    min-height: calc(17px * 1.45 * 2); /* reserves exactly 2 lines */
}

.courses-bx .dlab-title a:hover {
    color: #e0a800;
}

/* Description: 3-line clamp */
.courses-bx .dlab-info p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.55;
    color: #555;
    margin: 0;
    min-height: calc(14px * 1.55 * 3); /* reserves exactly 3 lines */
}

/* ── Latest news/blog cards (carousel on homepage) ─────────────────────── */
@media (min-width: 992px) {
    .blog-carousel .blog-post {
        min-height: 516px;
    }
}

/* ── Blog grid page — equal-height cards ───────────────────────────────── */
/*
 * Strategy mirrors the course cards approach:
 *  1. Each column becomes a flex container so the card stretches to full height.
 *  2. The card is a flex column: image (fixed) + info (grows).
 *  3. Title is clamped to 2 lines, excerpt to 3 lines.
 *  4. .post-footer is pushed to the bottom with margin-top: auto.
 */

/* Make every column in the blog row stretch its child to full height */
.col-lg-9 .row > [class*="col-"] {
    display: flex;
}

/* Card itself becomes a flex column */
.blog-post.blog-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

/* Image area — fixed height, never distorts */
.blog-post.blog-grid .dlab-post-media {
    flex-shrink: 0;
    height: 200px;
    overflow: hidden;
}

.blog-post.blog-grid .dlab-post-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.blog-post.blog-grid:hover .dlab-post-media img {
    transform: scale(1.04);
}

/* Info area — grows to fill remaining height */
.blog-post.blog-grid .dlab-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Title: 2-line clamp, same height regardless of content */
.blog-post.blog-grid .dlab-post-title .post-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: calc(1em * 1.4 * 2);
}

/* Excerpt: 3-line clamp */
.blog-post.blog-grid .dlab-post-text p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.55;
    margin-bottom: 0;
    min-height: calc(1em * 1.55 * 3);
}

/* Push footer to the bottom of every card */
.blog-post.blog-grid .post-footer {
    margin-top: auto;
    padding-top: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .lead-capture-form {
        padding: 20px;
    }
}
