/*
Theme Name: ChatLab Hub Pro
Theme URI: https://chatlabhub.com
Author: The Chat Laboratory Ltd.
Author URI: https://chatlabhub.com
Description: A modern, engaging LMS theme for ChatLab Hub - Your Space to keep Learning, wherever You are.
Version: 2.9
License: GPL v2 or later
Text Domain: chatlabhub
*/

/* ====== BRAND COLORS ====== 
   Primary: #004AAD (Deep Blue)
   Secondary: #FF1616 (Vibrant Red)
===============================*/

/* ----- GLOBAL RESET & TYPOGRAPHY ----- */
* {
    box-sizing: border-box;
    margin: 0;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #F8FAFC;
    color: #1E293B;
    line-height: 1.7;
}
h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.2;
}
a {
    color: #004AAD;
    text-decoration: none;
    transition: all 0.3s ease;
}
a:hover {
    color: #FF1616;
}

/* ----- WIDER CONTAINER (Customizable via Customizer) ----- */
.container {
    max-width: var(--container-width, 1400px);
    margin: 0 auto;
    padding: 0 25px;
}

/* Full-width page option */
.page-full-width .container {
    max-width: 100% !important;
    padding: 0 40px;
}

/* ----- CUSTOM LOGO SIZE (Controlled via Customizer) ----- */
.custom-logo {
    height: auto;
    max-height: var(--logo-height, 80px);
    width: auto;
    max-width: var(--logo-width, 350px);
}
.site-title a {
    font-size: var(--logo-font-size, 2rem);
    font-weight: 900;
    color: #004AAD;
    letter-spacing: -1px;
}
.site-title a .brand-highlight {
    color: #FF1616;
}
.site-description {
    font-size: 0.95rem;
    color: #64748B;
    margin-top: -3px;
    font-weight: 500;
}
.site-description .highlight {
    color: #004AAD;
    font-weight: 700;
}

/* ----- HEADER - Logo left, Nav right, Single line ----- */
.site-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 3px solid var(--primary-color, #004AAD);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 30px rgba(0, 74, 173, 0.08);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap; /* Force single line */
    gap: 20px;
}

/* Logo container - left */
.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* Navigation - right */
.main-navigation {
    flex-shrink: 0;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 8px;
    padding: 0;
    margin: 0;
    flex-wrap: nowrap; /* Keep nav items on one line */
}

.main-navigation a {
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    color: #1E293B;
    transition: 0.3s;
    font-size: 0.95rem;
    white-space: nowrap; /* Prevent text wrapping */
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    background: var(--primary-color, #004AAD);
    color: #fff !important;
}

/* Hide description on mobile if it causes wrapping */
@media (max-width: 992px) {
    .site-description {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap; /* Allow wrapping on mobile */
        flex-direction: column;
        gap: 10px;
    }
    .header-logo {
        flex-direction: column;
        text-align: center;
    }
    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    .site-description {
        display: block;
        font-size: 0.8rem;
    }
}

/* ----- HERO SECTION (Dynamic) ----- */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color, #004AAD) 0%, #002b66 100%);
    color: #fff;
    padding: 80px 0;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}
.hero-section::after {
    content: var(--hero-icon, "🌍");
    position: absolute;
    right: 5%;
    bottom: 10%;
    font-size: 200px;
    opacity: 0.08;
}
.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 15px;
}
.hero-title .highlight {
    color: var(--secondary-color, #FF1616);
    background: rgba(255, 22, 22, 0.15);
    padding: 0 15px;
    border-radius: 15px;
}
.hero-sub {
    font-size: 1.3rem;
    opacity: 0.95;
    max-width: 650px;
    font-weight: 400;
}
.hero-sub .tagline {
    font-weight: 700;
    color: #FF6B6B;
}

/* ----- BUTTONS ----- */
.btn, 
.wp-block-button__link,
.stm_lms_buy_button,
button[type="submit"] {
    background: var(--primary-color, #004AAD) !important;
    color: #ffffff !important;
    padding: 14px 32px !important;
    border: none !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    box-shadow: 0 8px 25px rgba(0, 74, 173, 0.25);
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn:hover,
.wp-block-button__link:hover,
.stm_lms_buy_button:hover,
button[type="submit"]:hover {
    background: var(--secondary-color, #FF1616) !important;
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 22, 22, 0.35);
    color: #fff !important;
}

.btn-outline {
    background: transparent !important;
    color: var(--primary-color, #004AAD) !important;
    border: 2px solid var(--primary-color, #004AAD) !important;
    box-shadow: none !important;
}
.btn-outline:hover {
    background: var(--primary-color, #004AAD) !important;
    color: #fff !important;
    border-color: var(--primary-color, #004AAD) !important;
}

/* ==========================================
   ----- COURSE GRID - 3 COLUMNS -----
   ========================================== */

.stm_lms_courses__grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
}

.stm_lms_courses__grid .row {
    display: contents !important;
}
.stm_lms_courses__grid [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
    float: none !important;
}

.stm_lms_courses__grid .stm_lms_course_card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

@media (max-width: 992px) {
    .stm_lms_courses__grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px !important;
    }
}

@media (max-width: 576px) {
    .stm_lms_courses__grid {
        grid-template-columns: repeat(1, 1fr) !important;
        gap: 20px !important;
    }
}

/* ----- COURSE CARD ----- */
.stm_lms_course_card {
    background: #fff;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.04);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #E2E8F0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}
.stm_lms_course_card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0, 74, 173, 0.12);
    border-color: var(--primary-color, #004AAD);
}

.stm_lms_course_card .stm_lms_course_card__image {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
    background: #f0f4f8;
}
.stm_lms_course_card .stm_lms_course_card__image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}
.stm_lms_course_card:hover .stm_lms_course_card__image img {
    transform: scale(1.05);
}

.stm_lms_course_card .title h5 {
    color: var(--primary-color, #004AAD);
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.stm_lms_course_card .price {
    color: var(--secondary-color, #FF1616) !important;
    font-weight: 800;
    font-size: 1.4rem;
    margin-top: auto;
    padding-top: 15px;
}

.stm_lms_course_card .course-excerpt {
    color: #64748B;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 10px 0;
    flex-grow: 1;
}

.stm_lms_course_card .stm_lms_course_card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid #E2E8F0;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #64748B;
}

/* ----- BLOG POSTS - EDGE NEVER CHANGES ----- */
article {
    background: #fff;
    padding: 35px;
    margin-bottom: 40px;
    border-radius: 24px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: box-shadow 0.3s ease;
}
article:hover {
    box-shadow: 0 15px 40px rgba(0, 74, 173, 0.07);
}
.entry-title a {
    color: #0F172A;
    font-size: 1.8rem;
}
.entry-title a:hover {
    color: var(--secondary-color, #FF1616);
}
.entry-meta {
    color: #64748B;
    font-size: 0.9rem;
    margin: 10px 0;
}
.entry-meta .author-name {
    color: var(--primary-color, #004AAD);
    font-weight: 700;
}
.read-more {
    background: var(--primary-color, #004AAD);
    color: #fff;
    padding: 8px 25px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
}
.read-more:hover {
    background: var(--secondary-color, #FF1616);
    color: #fff;
}

/* ----- SIDEBAR ----- */
.widget {
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid #E2E8F0;
}
.widget-title {
    color: var(--primary-color, #004AAD);
    font-size: 1.3rem;
    border-bottom: 4px solid var(--secondary-color, #FF1616);
    padding-bottom: 10px;
    display: inline-block;
}

/* ----- FOOTER (Dynamic) ----- */
.site-footer {
    background: #0F172A;
    color: #94A3B8;
    padding: 50px 0 30px;
    margin-top: 60px;
}
.site-footer a {
    color: #fff;
}
.site-footer a:hover {
    color: var(--secondary-color, #FF1616);
}
.footer-brand {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
}
.footer-brand .brand-highlight {
    color: var(--secondary-color, #FF1616);
}
.footer-tagline {
    color: #94A3B8;
    font-style: italic;
    margin-top: 5px;
    font-size: 0.95rem;
}

/* ----- RESPONSIVE ----- */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }
    .main-navigation ul {
        justify-content: center;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-section::after {
        font-size: 100px;
        right: 2%;
    }
    .page-full-width .container {
        padding: 0 15px;
    }
    .custom-logo {
        max-height: 60px;
        max-width: 250px;
    }
    .stm_lms_course_card .stm_lms_course_card__image img {
        height: 180px;
    }
}

/* Small mobile */
@media (max-width: 400px) {
    .stm_lms_course_card .stm_lms_course_card__image img {
        height: 150px;
    }
}


/* ==========================================
   ----- THICK GRADIENT EDGES -----
   ----- THAT NEVER CHANGE -----
   ========================================== */

/* Course Cards - Thick gradient top border */
.stm_lms_course_card {
    position: relative;
    border: none !important;
    padding-top: 4px !important;
    background-clip: padding-box !important;
}

.stm_lms_course_card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, var(--primary-color, #004AAD) 0%, #2563EB 50%, #7C3AED 100%);
    border-radius: 24px 24px 0 0;
    z-index: 1;
}

/* Blog Posts - Thick gradient left border */
article {
    position: relative;
    border: none !important;
    padding-left: 35px !important;
}

article::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(135deg, var(--primary-color, #004AAD) 0%, #2563EB 50%, #7C3AED 100%);
    border-radius: 0 6px 6px 0;
}

/* Widgets - Thick gradient top border */
.widget {
    position: relative;
    border: none !important;
    padding-top: 20px !important;
}

.widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color, #004AAD) 0%, #2563EB 50%, #7C3AED 100%);
    border-radius: 20px 20px 0 0;
}

/* Hero Section - Thick gradient bottom border */
.hero-section {
    position: relative;
    border-bottom: none !important;
    border-radius: 0 0 50px 50px;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, var(--primary-color, #004AAD) 0%, #2563EB 50%, #7C3AED 100%);
    border-radius: 0 0 50px 50px;
}

/* Site Footer - Thick gradient top border */
.site-footer {
    position: relative;
    border-top: none !important;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(135deg, var(--primary-color, #004AAD) 0%, #2563EB 50%, #7C3AED 100%);
}

/* Site Header - Thick gradient bottom border */
.site-header {
    position: relative;
    border-bottom: none !important;
}

.site-header::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color, #004AAD) 0%, #2563EB 50%, #7C3AED 100%);
}

/* Read More Button - Gradient border */
.read-more {
    position: relative;
    border: none !important;
}

.read-more::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary-color, #004AAD) 0%, #2563EB 50%, #7C3AED 100%);
    z-index: -1;
}

/* Primary Buttons - Gradient border */
.btn, 
.wp-block-button__link,
.stm_lms_buy_button,
button[type="submit"] {
    position: relative;
    border: none !important;
}

.btn::after,
.wp-block-button__link::after,
.stm_lms_buy_button::after,
button[type="submit"]::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary-color, #004AAD) 0%, #2563EB 50%, #7C3AED 100%);
    z-index: -1;
}

/* Fix for button hover so it doesn't shift */
.btn:hover,
.wp-block-button__link:hover,
.stm_lms_buy_button:hover,
button[type="submit"]:hover {
    transform: none !important;
}

/* ==========================================
   ----- OVERRIDE - FORCE EDGE COLORS -----
   ========================================== */

/* FORCE the left border to NEVER change on hover */
article::before,
article:hover::before {
    background: linear-gradient(135deg, var(--primary-color, #004AAD) 0%, #2563EB 50%, #7C3AED 100%) !important;
}

/* FORCE course card top border to NEVER change on hover */
.stm_lms_course_card::before,
.stm_lms_course_card:hover::before {
    background: linear-gradient(135deg, var(--primary-color, #004AAD) 0%, #2563EB 50%, #7C3AED 100%) !important;
}

/* FORCE widget top border to NEVER change on hover */
.widget::before,
.widget:hover::before {
    background: linear-gradient(135deg, var(--primary-color, #004AAD) 0%, #2563EB 50%, #7C3AED 100%) !important;
}

/* FORCE header bottom border to NEVER change on hover */
.site-header::before,
.site-header:hover::before {
    background: linear-gradient(135deg, var(--primary-color, #004AAD) 0%, #2563EB 50%, #7C3AED 100%) !important;
}

/* FORCE hero bottom border to NEVER change on hover */
.hero-section::after,
.hero-section:hover::after {
    background: linear-gradient(135deg, var(--primary-color, #004AAD) 0%, #2563EB 50%, #7C3AED 100%) !important;
}

/* FORCE footer top border to NEVER change on hover */
.site-footer::before,
.site-footer:hover::before {
    background: linear-gradient(135deg, var(--primary-color, #004AAD) 0%, #2563EB 50%, #7C3AED 100%) !important;
}


/* ==========================================
   ----- SOCIAL ICONS - PROPER BRAND LOGOS -----
   ========================================== */

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #94A3B8;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.social-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: fill 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: transparent;
}

/* Individual brand colors on hover */
.social-icon:hover[title="Facebook"] {
    background: #1877F2;
    color: #fff;
    box-shadow: 0 8px 25px rgba(24, 119, 242, 0.4);
}

.social-icon:hover[title="Twitter"] {
    background: #000000;
    color: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.social-icon:hover[title="Instagram"] {
    background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: #fff;
    box-shadow: 0 8px 25px rgba(214, 36, 159, 0.4);
}

.social-icon:hover[title="LinkedIn"] {
    background: #0A66C2;
    color: #fff;
    box-shadow: 0 8px 25px rgba(10, 102, 194, 0.4);
}

.social-icon:hover[title="YouTube"] {
    background: #FF0000;
    color: #fff;
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.4);
}