/*
Theme Name: ST Skills
Theme URI: https://www.stskills.sg
Author: D NAUNG LATT
Author URI: https://www.stskills.sg
Description: Custom Bootstrap 5 theme for ST Skills Education.
Version: 1.0
Text Domain: stskills
*/

/* =========================================
   1. VARIABLES & SETUP
   ========================================= */
:root {
    /* Colors */
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --secondary-color: #6c757d;
    
    --text-dark: #1e293b;
    --text-body: #4a5568;
    --text-muted: #64748b;
    --text-light: #f8f9fa;
    
    --bg-body: #ffffff;
    --bg-light: #f8f9fa;
    --bg-section: #F6F8FC;
    
    --footer-bg: #212529; /* bg-dark */
    
    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-accent: 'Roboto Slab', serif;

    /* Spacing & Layout */
    --card-radius: 1rem;
    --card-shadow: 0 10px 30px rgba(0,0,0,0.05);
    --card-shadow-hover: 0 15px 30px rgba(0,0,0,0.1);
    --transition-base: all 0.3s ease;
}

/* =========================================
   2. GLOBAL RESET & TYPOGRAPHY
   ========================================= */
body {
    font-family: var(--font-body);
    color: var(--text-body);
    background-color: var(--bg-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: var(--font-heading);
    color: var(--text-dark);
}

a {
    text-decoration: none;
    transition: var(--transition-base);
}

/* Utility for accent font */
.font-accent {
    font-family: var(--font-accent);
}

/* Tracking utility */
.tracking-wide {
    letter-spacing: 2px;
}

/* =========================================
   3. COMPONENTS
   ========================================= */

/* --- Buttons --- */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: var(--transition-base);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* --- Cards (Global) --- */
.card {
    border: none;
    transition: var(--transition-base);
}

/* --- Course Card Specifics --- */
.course-single {
    background: #fff;
    border-radius: var(--card-radius);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-single:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover) !important;
}

/* FIX: Image containment for text-heavy banners */
.course-photo {
    width: 100%;
    height: auto;
    background-color: #f0f0f0;
    overflow: hidden;
}

.course-photo img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain; 
}

.course-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.course-content h5 {
    font-size: 1.1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.text-custom-contact {
    color: #ff6600 !important;
}

/* --- Forms --- */
.form-control, .form-select {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    border-color: var(--primary-color);
}

/* --- Nav Tabs (Landing Page) --- */
.custom-tabs .nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 1rem 1.5rem;
    background: transparent;
}

.custom-tabs .nav-link.active {
    color: var(--text-dark) !important;
    font-weight: 700;
    border-bottom: 3px solid var(--primary-color);
}

/* =========================================
   4. LAYOUT SECTIONS
   ========================================= */

/* --- Navbar --- */
.navbar-section {
    z-index: 1020;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

/* --- Hero Section: Home (Image Based) --- */
.home-hero-section {
    background-color: var(--bg-light);
    overflow: hidden;
}

.home-hero-section img {
    max-height: 600px;
    width: 100%;
    object-fit: cover;
}

/* --- Hero Section: Landing Page (Gradient/Text Based) --- */
.page-hero-section {
    background: linear-gradient(135deg, #1a75ff 0%, #0056b3 100%);
    padding: 80px 0 100px;
    color: white;
}

.page-hero-section h1 {
    color: white;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.6);
}

/* --- Feature Sidebar --- */
.course-features-card {
    position: sticky;
    top: 2rem;
    z-index: 10;
}

/* --- Footer --- */
.footer-section {
    background-color: var(--footer-bg);
}

/* Force white text in footer links */
.footer-section a {
    color: #ffffff !important;
    text-decoration: none;
}

.footer-section a:hover {
    color: #cccccc !important;
    text-decoration: underline !important;
}

.text-secondary-light {
    color: rgba(255, 255, 255, 0.7);
}

/* =========================================
   5. RESPONSIVE UTILITIES
   ========================================= */
@media (max-width: 991px) {
    .course-features-card {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 767px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .course-content {
        padding: 1.5rem !important;
    }
}

.contact-form-wrapper p, .unset-mb {
    margin-bottom: unset !important;
}

li.menu-item.menu-item-type-custom.menu-item-object-custom.nav-item {
    margin-left: 10px;
}


/* Navbar Link Styling */
.navbar-nav .nav-link {
    color: var(--text-dark) !important; /* Default Color */
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent; /* Prepare for underline */
}

/* Hover State */
.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Active State (The class we will toggle with JS) */
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color); /* Highlight indicator */
}

/* --- Course Card Hover Effects --- */

/* --- Course Card Hover Effects --- */

/* 1. Ensure the card transitions smoothly */
.course-single {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; 
}

/* 2. Create the positioning context for the red line */
.course-photo {
    position: relative;
}

/* 3. The Animated Red Line (Hidden initially with width: 0) */
.course-photo::after {
    content: "";
    position: absolute;
    bottom: 0;   /* Glues the line to the bottom edge of the image container */
    left: 0;     /* Starts the line from the left side */
    height: 4px; /* Thickness of the red line */
    width: 0;    /* Initially hidden */
    background-color: #e3000f; /* Straits Times Red */
    transition: width 0.4s ease-in-out;
}

/* 4. The Trigger: Expand the line to 100% when the user hovers anywhere on the card */
.course-single:hover .course-photo::after {
    width: 100%;
}

/* 5. (Optional but recommended) Subtle lift and shadow enhancement on hover */
.course-single:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}