/* ============================================
   NIPSTec Main Stylesheet
   Production Ready | Mobile First
   ============================================ */

:root {
    --primary: #152996;
    --primary-dark: #0d1a5c;
    --primary-light: #eef1fb;
    --secondary: #047857;
    --accent: #f5c518;
    --text: #1b1f3b;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 45px rgba(13,26,92,0.14);
    --radius: 6px;
    --radius-lg: 12px;
    --container: 1200px;
    --header-height: 84px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.skip-link {
    position: absolute; top: -40px; left: 0;
    background: var(--primary); color: #fff; padding: 8px 16px;
    z-index: 10000; transition: top 0.3s;
}
.skip-link:focus { top: 0; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 20px; border-radius: var(--radius);
    font-weight: 500; font-size: 0.95rem; cursor: pointer;
    border: 1.5px solid transparent; transition: all 0.2s;
    text-decoration: none; line-height: 1.4;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-secondary { background: var(--bg-alt); color: var(--text); border-color: var(--border); }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }

.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(13,26,92,0.03), 0 8px 24px rgba(13,26,92,0.05);
    height: var(--header-height);
}
.header-container {
    display: flex; align-items: center;
    height: 100%;
    gap: 14px;
    flex-wrap: nowrap;
}
.logo {
    display: flex; align-items: center;
    padding: 4px 0;
    flex-shrink: 0;
}
.logo-img {
    height: 62px; width: auto; max-width: 190px;
    display: block; object-fit: contain;
}
.logo-text {
    font-size: 1.6rem; font-weight: 800; color: var(--text);
    letter-spacing: -0.5px; line-height: 1;
}
.logo-accent { color: var(--primary); }
.logo-tagline {
    font-size: 0.65rem; color: var(--text-light); letter-spacing: 1px;
    text-transform: uppercase; font-weight: 600;
}

.main-nav { display: none; }
.nav-list { display: flex; list-style: none; gap: 4px; align-items: center; }
.nav-list > li { position: relative; }
.nav-list a {
    display: flex; align-items: center;
    color: var(--text); font-weight: 600; font-size: 0.95rem;
    padding: 10px 12px; border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}
.nav-list a:hover { color: var(--primary); background: rgba(21,41,150,0.06); }

/* Explore button (standalone, next to logo) */
.explore-wrap { position: relative; flex-shrink: 0; display: none; }
.explore-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; color: var(--primary);
    font-size: 0.95rem; font-weight: 700;
    border: 1.5px solid var(--primary);
    border-radius: 8px; padding: 10px 16px;
    cursor: pointer; white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.explore-btn .nipstec-chevron,
.explore-btn svg { transition: transform 0.2s ease; }
.explore-wrap:hover .explore-btn,
.explore-btn[aria-expanded="true"] {
    background: var(--primary-light); border-color: var(--primary-dark); color: var(--primary-dark);
}
.explore-wrap:hover .explore-btn svg,
.explore-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Inline site search (desktop, next to Explore button) */
.site-search { position: relative; flex: 1 1 160px; min-width: 0; max-width: 380px; display: none; }
.site-search-form {
    display: flex; align-items: stretch;
    border: 1px solid var(--border); border-radius: 8px;
    overflow: hidden; background: #fff;
}
.site-search-form input[type="text"] {
    flex: 1; min-width: 0; border: none; outline: none;
    padding: 10px 14px; font-size: 0.92rem; font-family: inherit; color: var(--text);
}
.search-submit-btn {
    display: flex; align-items: center; justify-content: center;
    width: 44px; flex-shrink: 0; border: none; cursor: pointer;
    background: var(--primary); color: #fff;
    transition: background 0.2s ease;
}
.search-submit-btn:hover { background: var(--primary-dark); }

.search-suggestions {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    box-shadow: var(--shadow-lg);
    max-height: 340px; overflow-y: auto;
    z-index: 1001; display: none;
}
.search-suggestions.is-open { display: block; }
.search-suggestions a {
    display: flex; flex-direction: column; gap: 1px;
    padding: 10px 14px; color: var(--text);
    border-bottom: 1px solid var(--border);
}
.search-suggestions a:last-child { border-bottom: none; }
.search-suggestions a:hover,
.search-suggestions a.is-active { background: var(--primary-light); color: var(--primary); }
.search-suggestions .sugg-name { font-weight: 600; font-size: 0.9rem; }
.search-suggestions .sugg-cat { font-size: 0.75rem; color: var(--text-light); }
.search-suggestions .sugg-empty,
.search-suggestions .sugg-viewall {
    padding: 10px 14px; font-size: 0.85rem; color: var(--text-light);
}
.search-suggestions .sugg-viewall { font-weight: 700; color: var(--primary); cursor: pointer; }
.search-suggestions .sugg-viewall:hover { background: var(--primary-light); }


.has-mega-menu { position: relative; }
.mega-menu {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px);
    background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    padding: 28px; min-width: 720px; opacity: 0; visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    margin-top: 10px;
}
.has-mega-menu:hover .mega-menu { opacity: 1; visibility: visible; pointer-events: auto; }

/* Explore panel: full page-width, like a mega "mega-bar" under the header */
.explore-wrap .mega-menu {
    position: fixed; top: var(--header-height); left: 0; right: 0; width: 100%;
    transform: translateY(-8px);
    border-radius: 0; border-left: none; border-right: none; border-top: none;
    min-width: 0; padding: 0; margin-top: 0;
    box-shadow: 0 16px 40px rgba(13,26,92,0.14);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
}
.explore-wrap:hover .mega-menu,
.explore-wrap.is-open .mega-menu {
    opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}
.explore-wrap .mega-inner {
    max-width: var(--container); margin: 0 auto; padding: 28px 20px 32px;
}

.mega-location { margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.mega-location-link {
    display: flex; flex-direction: column; gap: 3px;
    padding: 14px 18px; border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, #2F63C8 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mega-location-link:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(21,41,150,0.25); }
.mega-location-link strong { color: #fff; font-size: 1.05rem; }
.mega-location-link span { color: rgba(255,255,255,0.8); font-size: 0.85rem; }
.mega-categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px 28px; }
.mega-category h4 {
    font-size: 0.75rem; text-transform: uppercase; color: var(--primary);
    margin-bottom: 10px; letter-spacing: 0.6px; font-weight: 700;
    padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.mega-cat-label { display: flex; align-items: center; gap: 6px; }
.mega-cat-label svg { flex-shrink: 0; }
.mega-category ul { list-style: none; }
.mega-category li { margin-bottom: 2px; }
.mega-category a {
    display: flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--text);
    padding: 6px 8px; border-radius: 6px; margin: 0 -8px;
    transition: color 0.15s ease, background 0.15s ease, padding-left 0.15s ease;
}
.mega-category a:hover { color: var(--primary); background: var(--primary-light); padding-left: 14px; }
.mega-badge {
    display: inline-block; font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.3px;
    background: #FEF6E6; color: #B45309;
    padding: 1px 7px; border-radius: 20px; line-height: 1.6;
}
.mega-view-all {
    margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--border);
    text-align: left;
}
.mega-view-all a {
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 700; color: var(--primary); padding: 6px 4px;
}
.mega-view-all a:hover { color: var(--primary-dark); }
.mega-view-all svg { transition: transform 0.2s ease; }
.mega-view-all a:hover svg { transform: translateX(2px); }
.mega-location-link svg { color: #fff; margin-left: 4px; }

.header-actions { display: flex; align-items: center; gap: 6px; }

.mobile-search-form {
    display: flex; align-items: center; gap: 8px;
    margin: 12px 16px; padding: 10px 14px;
    background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius);
}
.mobile-search-form svg { color: var(--text-light); flex-shrink: 0; }
.mobile-search-form input {
    flex: 1; border: none; outline: none; background: transparent;
    font-size: 0.95rem; font-family: inherit; color: var(--text);
}
.mobile-logo-img { height: 50px; width: auto; }
.mobile-cat-header { display: flex; align-items: center; gap: 6px; }
.mobile-cat-header svg { flex-shrink: 0; }
.site-search.mobile-search { display: block; max-width: none; margin: 0 16px; position: relative; flex: 0 0 auto; }
.site-search.mobile-search .mobile-search-form { margin: 12px 0; }
.site-search.mobile-search .search-suggestions { left: 0; right: 0; }

@media (max-width: 767.98px) {
    .logo-img { height: 48px; max-width: 150px; }
    :root { --header-height: 68px; }
}
.header-actions .btn-primary {
    background: var(--primary); box-shadow: 0 8px 18px rgba(21,41,150,0.22);
    font-weight: 700;
}
.header-actions .btn-primary:hover {
    background: var(--primary-dark); transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(21,41,150,0.28);
}

.mobile-menu-toggle {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 10px;
    border-radius: 8px; transition: background 0.2s ease;
}
.mobile-menu-toggle:hover { background: rgba(21,41,150,0.06); }
.mobile-menu-toggle span {
    display: block; width: 22px; height: 2px; border-radius: 2px;
    background: var(--primary); transition: all 0.3s;
}

.mobile-menu-overlay {
    position: fixed; inset: 0; background: rgba(10,20,71,0.55);
    backdrop-filter: blur(2px);
    z-index: 2000; opacity: 0; visibility: hidden; transition: all 0.3s;
}
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }
.mobile-menu {
    position: fixed; top: 0; right: 0; width: 320px; max-width: 90vw;
    height: 100vh; background: #fff; z-index: 2001;
    box-shadow: -20px 0 50px rgba(13,26,92,0.18);
    transform: translateX(100%); transition: transform 0.3s ease;
    display: flex; flex-direction: column; overflow-y: auto;
}
.mobile-menu.active { transform: translateX(0); }
.mobile-menu-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
    background: var(--bg-alt);
}
.mobile-menu-header { flex-shrink: 0; }
.mobile-menu-close {
    background: none; border: none; font-size: 1.5rem; cursor: pointer;
    color: var(--primary); line-height: 1;
}
.site-search.mobile-search { flex-shrink: 0; }
.mobile-nav { flex: 0 0 auto; padding: 0; }
.mobile-nav ul { list-style: none; margin: 0; }
.mobile-nav a {
    display: block; padding: 13px 16px; color: var(--text); font-weight: 600;
    border-bottom: 1px solid var(--border); transition: background 0.15s ease, color 0.15s ease;
}
.mobile-nav a:hover { background: var(--primary-light); color: var(--primary); }
.mobile-submenu { display: none; background: var(--bg-alt); }
.mobile-submenu.active { display: block; }
.mobile-submenu a { padding-left: 32px; font-size: 0.9rem; font-weight: 500; }
.mobile-cat-header { padding: 12px 32px 6px; font-size: 0.75rem; text-transform: uppercase; color: var(--primary); font-weight: 700; letter-spacing: 0.5px; background: var(--bg-alt); }
.mobile-menu-footer { padding: 20px; border-top: 1px solid var(--border); }

.hero { background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); padding: 80px 0 60px; }
.hero-content { max-width: 700px; }
.hero h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: 20px; font-weight: 700; }
.hero h1 .highlight { color: var(--primary); }
.hero p { font-size: 1.15rem; color: var(--text-light); margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.hero-search form { display: flex; gap: 8px; max-width: 500px; }
.hero-search input {
    flex: 1; padding: 12px 16px; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 1rem;
}

.section { padding: 60px 0; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 1.8rem; margin-bottom: 8px; }
.section-header p { color: var(--text-light); }

.categories-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.category-card {
    background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px;
    transition: all 0.2s;
}
.category-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.category-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.course-count { font-size: 0.85rem; color: var(--text-light); }

.courses-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.course-card {
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    transition: all 0.2s; display: flex; flex-direction: column;
}
.course-card:hover { box-shadow: var(--shadow-lg); border-color: transparent; }
.course-card-body { padding: 20px; flex: 1; }
.course-card-body h3, .course-card-body h4 { font-size: 1.1rem; margin-bottom: 6px; }
.course-card-body h3 a, .course-card-body h4 a { color: var(--text); }
.course-card-body h3 a:hover, .course-card-body h4 a:hover { color: var(--primary); }
.course-category, .course-category-tag {
    display: inline-block; font-size: 0.75rem; text-transform: uppercase;
    color: var(--primary); background: var(--primary-light);
    padding: 2px 10px; border-radius: 20px; margin-bottom: 8px; font-weight: 600;
}
.course-location { font-size: 0.9rem; color: var(--text-light); margin-bottom: 8px; }
.course-desc { font-size: 0.9rem; color: var(--text-light); line-height: 1.5; }
.course-card-footer {
    padding: 14px 20px; border-top: 1px solid var(--border);
    display: flex; gap: 8px;
}

.category-section { margin-bottom: 48px; }
.category-title { font-size: 1.3rem; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-light); }

.section-cta-banner { background: var(--bg-alt); }
.cta-banner {
    background: var(--primary); color: #fff;
    border-radius: var(--radius-lg); padding: 40px;
    display: flex; flex-direction: column; gap: 20px;
    align-items: center; text-align: center;
}
.cta-banner h2 { font-size: 1.5rem; margin-bottom: 8px; }
.cta-banner p { opacity: 0.9; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cta-actions .btn-outline { border-color: rgba(255,255,255,0.5); color: #fff; }
.cta-actions .btn-outline:hover { background: #fff; color: var(--primary); }

.breadcrumb-wrapper { background: var(--bg-alt); padding: 16px 0; border-bottom: 1px solid var(--border); }
.breadcrumb-nav ol { display: flex; list-style: none; gap: 8px; flex-wrap: wrap; align-items: center; }
.breadcrumb-nav li { font-size: 0.9rem; color: var(--text-light); }
.breadcrumb-nav li:not(:last-child)::after { content: '/'; margin-left: 8px; color: var(--border); }
.breadcrumb-nav a { color: var(--text-light); }
.breadcrumb-nav a:hover { color: var(--primary); }

.course-hero { background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); padding: 50px 0 40px; }
.course-hero-content { max-width: 800px; }
.course-category-badge {
    display: inline-block; background: var(--primary); color: #fff;
    padding: 4px 14px; border-radius: 20px; font-size: 0.8rem;
    font-weight: 600; text-transform: uppercase; margin-bottom: 12px;
}
.course-hero h1 { font-size: 2rem; margin-bottom: 10px; }
.course-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.course-layout { display: grid; gap: 32px; margin-top: 32px; }
.course-main { min-width: 0; }
.course-content { line-height: 1.7; }
.course-content h2, .course-content h3 { margin: 24px 0 12px; }
.course-content p { margin-bottom: 12px; }
.course-content ul, .course-content ol { margin-bottom: 12px; padding-left: 24px; }
.course-content table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.course-content th, .course-content td { border: 1px solid var(--border); padding: 10px; text-align: left; }
.course-content th { background: var(--bg-alt); font-weight: 600; }
.course-empty { padding: 40px; text-align: center; color: var(--text-light); background: var(--bg-alt); border-radius: var(--radius); }

.course-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card {
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px;
}
.sidebar-card h4 { font-size: 1.1rem; margin-bottom: 16px; }
.sidebar-form .form-group { margin-bottom: 12px; }
.sidebar-form input, .sidebar-form select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 0.95rem;
}
.sidebar-brochure { background: var(--primary-light); border-color: #bfdbfe; }

.course-final-cta {
    background: var(--bg-alt); border-radius: var(--radius-lg);
    padding: 32px; text-align: center; margin-top: 40px;
}
.course-final-cta h3 { margin-bottom: 8px; }
.course-final-cta p { color: var(--text-light); margin-bottom: 20px; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.directory-filters { margin-bottom: 32px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-bar input, .filter-bar select {
    padding: 10px 14px; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 0.95rem; min-width: 180px;
}
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-light); }

.contact-layout { display: grid; gap: 40px; }
.contact-form-wrapper { max-width: 600px; }
.contact-form .form-group { margin-bottom: 16px; }
.contact-form label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 0.9rem; }
.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 0.95rem; font-family: inherit;
}
.contact-info { background: var(--bg-alt); border-radius: var(--radius-lg); padding: 28px; }
.contact-info h3 { margin-bottom: 16px; }
.contact-info p { margin-bottom: 12px; color: var(--text-light); }
.contact-info a { color: var(--primary); }
.contact-info-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.contact-info-list li { display: flex; align-items: flex-start; gap: 12px; color: var(--text-light); line-height: 1.5; }
.contact-info-list svg { flex-shrink: 0; margin-top: 2px; color: var(--primary); }
.contact-info-list a { color: var(--text); font-weight: 500; }
.contact-info-list a:hover { color: var(--primary); }
.contact-cta { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.contact-map { margin-top: 24px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.contact-map iframe { display: block; width: 100%; }

.content-page { max-width: 800px; }
.content-page h2 { margin: 28px 0 12px; font-size: 1.4rem; }
.content-page p { margin-bottom: 12px; }
.content-page ul { margin-bottom: 16px; padding-left: 24px; }

.error-page { text-align: center; padding: 80px 20px; }
.error-page h1 { font-size: 6rem; color: var(--primary); line-height: 1; }
.error-page h2 { margin: 16px 0; }
.error-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }

.site-footer { background: #111827; color: #e5e7eb; padding: 60px 0 0; font-size: 0.95rem; }
.footer-grid { display: grid; gap: 32px; margin-bottom: 40px; }
.footer-col h3, .footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 1.1rem; }
.footer-col p { margin-bottom: 10px; line-height: 1.6; color: #d1d5db; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #d1d5db; }
.footer-col a:hover { color: #fff; }
.footer-contact { margin-top: 16px; }
.footer-contact-list { list-style: none; margin: 16px 0 0; display: flex; flex-direction: column; gap: 12px; }
.footer-contact-list li {
    display: flex; align-items: flex-start; gap: 10px;
    margin-bottom: 0; line-height: 1.5; color: #d1d5db;
}
.footer-contact-list svg { flex-shrink: 0; margin-top: 2px; color: #8b9dfc; }
.footer-contact-list a { color: #d1d5db; }
.footer-contact-list a:hover { color: #fff; }
.footer-phones a:not(:last-child)::after { content: ','; margin-right: 4px; color: #9ca3af; }
.footer-social {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 0; margin-top: 20px;
    background: transparent; border-radius: 0; flex-wrap: wrap;
}
.footer-social-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%;
    color: #fff !important;
    border: 0;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,.22);
    transition: transform .22s ease, box-shadow .22s ease;
    transform-origin: center;
}
.footer-social-icon svg { width: 19px; height: 19px; display: block; }
.footer-social-icon:hover,
.footer-social-icon:focus-visible {
    transform: translateY(-2px) scale(1.18);
    box-shadow: 0 7px 18px rgba(0,0,0,.30);
    color: #fff !important;
    text-decoration: none;
}
.footer-social-icon--facebook { background: #1877F2 !important; }
.footer-social-icon--twitter { background: #000 !important; }
.footer-social-icon--instagram {
    background: radial-gradient(circle at 30% 110%, #fdf497 0 12%, #fd5949 35%, #d6249f 60%, #285AEB 100%) !important;
}
.footer-social-icon--linkedin { background: #0A66C2 !important; }
.footer-social-icon--youtube { background: #FF0000 !important; }
.footer-social-icon--pinterest { background: #E60023 !important; }
@media (prefers-reduced-motion: reduce) {
    .footer-social-icon { transition: none; }
    .footer-social-icon:hover,
    .footer-social-icon:focus-visible { transform: none; }
}
.footer-map {
    margin-bottom: 32px; border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid #374151; filter: grayscale(0.15);
}
.footer-map iframe { display: block; width: 100%; }
.footer-bottom { border-top: 1px solid #374151; padding: 20px 0; text-align: center; font-size: 0.85rem; color: #d1d5db; }

.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: inherit; }

.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 3000; opacity: 0; visibility: hidden; transition: all 0.3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.95);
    background: #fff; border-radius: var(--radius-lg); width: 90%; max-width: 500px;
    max-height: 90vh; overflow-y: auto; z-index: 3001;
    opacity: 0; visibility: hidden; transition: all 0.3s;
}
.modal.active { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.2rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.modal-body { padding: 24px; }
.modal-body .form-group { margin-bottom: 14px; }
.modal-body label { display: block; margin-bottom: 4px; font-size: 0.9rem; font-weight: 500; }
.modal-body input, .modal-body select, .modal-body textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 0.95rem; font-family: inherit;
}

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.page-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 0.9rem; color: var(--text);
}
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }

@media (min-width: 768px) {
    .main-nav { display: block; margin-left: auto; flex-shrink: 0; }
    .explore-wrap { display: block; flex-shrink: 0; }
    .site-search { display: block; }
    .mobile-menu-toggle { display: none; }
    .mobile-search, #mobileSearchWrap { display: none; }
    .nav-list a { padding: 10px 10px; font-size: 0.92rem; }
    .categories-grid { grid-template-columns: repeat(4, 1fr); }
    .courses-grid { grid-template-columns: repeat(2, 1fr); }
    .course-layout { grid-template-columns: 1fr 320px; }
    .contact-layout { grid-template-columns: 1fr 380px; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
    .cta-banner { flex-direction: row; text-align: left; justify-content: space-between; }
    .hero h1 { font-size: 3.2rem; }
}
@media (min-width: 1024px) {
    .courses-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Tablet: keep header items on one line without wrapping/scattering */
@media (min-width: 768px) and (max-width: 1099.98px) {
    .header-container { gap: 10px; }
    .nav-list { gap: 0; }
    .nav-list a { padding: 8px 8px; font-size: 0.87rem; }
    .explore-btn { padding: 9px 12px; font-size: 0.88rem; }
    .site-search { flex: 1 1 120px; max-width: 220px; }
    .site-search-form input[type="text"] { padding: 9px 10px; font-size: 0.85rem; }
    .logo-img { height: 50px; max-width: 150px; }
}
