/* assets/css/style.css */
/* =========================================================================
   VARIABLES & DESIGN SYSTEM
   ========================================================================= */
:root {
    /* Light / Standard Theme */
    --primary-color: #2563eb;
    --primary-hover: #1e40af;
    --secondary-color: #06b6d4;
    --bg-dark: #f8fafc;
    --bg-light: #eef4ff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fbff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dark: #0f172a;

    /* Typography - Modern SaaS Look */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Utilities & Effects */
    --border-radius: 14px;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 10px 22px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 22px 38px rgba(15, 23, 42, 0.14);
    --shadow-glow: 0 0 0 rgba(0, 0, 0, 0);
}

/* =========================================================================
   RESET & BASE STYLES
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 10% 8%, rgba(37, 99, 235, 0.06), transparent 30%),
        radial-gradient(circle at 90% 92%, rgba(6, 182, 212, 0.06), transparent 26%);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -1.5px;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -1px;
}

h3 {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-primary {
    color: var(--primary-color);
}

.text-center {
    text-align: center;
}

/* =========================================================================
   UTILITIES
   ========================================================================= */
.section-padding {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    display: inline-block;
    position: relative;
    padding-bottom: 14px;
    color: var(--text-main);
    background: none;
    font-weight: 700;
    letter-spacing: -1px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 84px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.section-title p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 1rem auto 0;
}

/* Flexbox Helpers */
.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.align-center {
    align-items: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 {
    gap: 1rem;
}

.gap-2 {
    gap: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: 1px solid transparent;
    font-family: var(--font-body);
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.24);
    border: 1px solid rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 26px rgba(30, 64, 175, 0.3);
    background: linear-gradient(135deg, var(--primary-hover), #2563eb);
    color: #ffffff;
}

.btn-outline {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-main);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline {
    background: #ffffff;
    border: 1px solid #c7d7ef;
    color: #1e3a8a;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

.btn-outline:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

/* =========================================================================
   HEADER & NAVIGATION
   ========================================================================= */
.header {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(12px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #e2e8f0;
    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.10),
        0 0 0 1px rgba(37, 99, 235, 0.05);
    transition: all 0.4s ease;
    overflow: visible;
}

.header::after {
    content: '';
    position: absolute;
    left: -20%;
    right: -20%;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.6), rgba(56, 189, 248, 0.6), transparent);
    opacity: 0.25;
    pointer-events: none;
}

.header.scrolled {
    padding: 6px 0;
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 120px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    text-transform: uppercase;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}

.logo span {
    color: var(--text-main);
}

.nav-menu ul {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
    position: relative;
    padding-bottom: 4px;
}

.nav-menu a.active,
.nav-menu a:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-menu a:not(.btn)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), #38bdf8);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-menu a:not(.btn):hover::after,
.nav-menu a.active:not(.btn)::after {
    transform: scaleX(1);
}

.nav-menu .btn-primary {
    border-radius: 999px;
    padding: 0.72rem 1.4rem;
    font-size: 0.9rem;
    position: relative;
    border: 1px solid rgba(37, 99, 235, 0.28);
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.18);
    transform: translateZ(0);
}

.nav-menu .btn-primary::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.55), rgba(56, 189, 248, 0.35), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-menu .btn-primary:hover::before {
    opacity: 1;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
    z-index: 1002;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
    background:
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.08), transparent 32%),
        #f1f5f9;
    padding-top: 5rem;
    border-top: 1px solid #dbe3ee;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.12;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-col h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    position: relative;
    padding-bottom: 10px;
    display: inline-block;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
    position: relative;
}

.footer-col ul a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-col ul a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.contact-info {
    list-style: none;
    padding: 0;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.contact-info li i {
    margin-top: 5px;
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: var(--text-main);
    transition: all var(--transition-smooth);
    border: 1px solid #d4deea;
}

.social-links a:hover {
    background: linear-gradient(135deg, var(--primary-color), #38bdf8);
    color: #fff;
    transform: translateY(-3px);
}

input.form-control,
select.form-control,
textarea.form-control {
    border-radius: 10px;
}

/* Smooth global card polish for common sections */
.service-card,
.service-card-premium,
.portfolio-card,
.course-card,
.home-course-card,
.trust-item,
.sidebar-card {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.footer-bottom {
    background-color: #e9eff6;
    padding: 1.5rem 0;
    border-top: 1px solid #d7e0ec;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom-links a {
    color: var(--text-muted);
    margin-left: 1.5rem;
}

.footer-bottom-links a:hover {
    color: var(--text-main);
}

/* MAIN CONTENT ADJUSTMENT FOR STICKY HEADER */
.main-content {
    margin-top: 120px;
    min-height: calc(100vh - 120px - 400px);
}

/* Shared content rhythm for page-level sections */
.page-header .page-title {
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.section-padding {
    scroll-margin-top: 130px;
}

/* =========================================================================
   RESPONSIVE DESIGN (Media Queries)
   ========================================================================= */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 120px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 120px);
        background-color: #ffffff;
        border-top: 1px solid #e2e8f0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: left var(--transition-smooth);
        z-index: 1100;
        pointer-events: none;
        display: flex;
        visibility: hidden;
        opacity: 0;
    }

    .nav-menu.active {
        left: 0;
        pointer-events: auto;
        visibility: visible;
        opacity: 1;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .nav-menu ul li a {
        font-size: 1.25rem;
    }

    .mobile-toggle {
        display: block;
        z-index: 1201;
    }

    body.menu-open {
        overflow: hidden;
    }


    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .mobile-col {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer-bottom-links a {
        margin: 0 0.5rem;
    }
}

/* =========================================================================
   GLOBAL RESPONSIVE ENHANCEMENTS
   Covers page-level components with shared class names.
   ========================================================================= */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

video,
iframe,
canvas,
svg {
    max-width: 100%;
}

/* Prevent long values from breaking mobile layouts */
p,
h1,
h2,
h3,
h4,
h5,
h6,
a,
span,
label,
input,
textarea,
select {
    overflow-wrap: anywhere;
}

/* Generic table responsiveness (admin + data sections) */
table {
    width: 100%;
}

.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 1200px) {
    .container {
        max-width: 1040px;
    }
}

@media (max-width: 992px) {
    .container {
        padding: 0 16px;
    }

    .section-padding {
        padding: 4rem 0;
    }

    .nav-container {
        height: 94px;
    }

    .main-content {
        margin-top: 94px;
    }

    .header .logo img {
        max-height: 48px !important;
    }

    .header .logo span {
        font-size: 1rem !important;
    }

    /* Shared layout grids used across pages */
    .services-grid,
    .portfolio-grid,
    .courses-grid,
    .home-courses-grid,
    .trust-grid,
    .project-content-wrap,
    .form-row,
    .enroll-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .project-content-wrap {
        gap: 1.5rem !important;
    }

    .filter-bar {
        gap: 1rem !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 14px;
    }

    .section-padding {
        padding: 3.2rem 0;
    }

    .nav-container {
        height: 82px;
    }

    .main-content {
        margin-top: 82px;
    }

    .page-header {
        padding: 90px 0 52px !important;
    }

    .page-header .page-title {
        font-size: clamp(1.6rem, 6vw, 2.1rem) !important;
    }

    .nav-menu {
        top: 82px !important;
        height: calc(100vh - 82px) !important;
    }

    .header .logo {
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .header .logo img {
        max-height: 34px !important;
    }

    .header .logo span {
        font-size: 0.82rem !important;
        line-height: 1.1 !important;
        text-align: left !important;
    }

    .btn {
        padding: 0.78rem 1.15rem;
        font-size: 0.88rem;
    }

    /* Force single-column layout for major content grids */
    .services-grid,
    .portfolio-grid,
    .courses-grid,
    .home-courses-grid,
    .trust-grid,
    .project-content-wrap,
    .form-row,
    .enroll-row {
        grid-template-columns: 1fr !important;
    }

    .phone-field {
        grid-template-columns: 102px minmax(0, 1fr) !important;
        align-items: stretch;
    }

    .filter-container {
        margin-top: -20px !important;
        margin-bottom: 1.5rem !important;
    }

    .filter-bar {
        padding: 0.85rem !important;
    }

    .category-pills {
        width: 100%;
    }

    .search-box {
        max-width: 100% !important;
    }

    .quote-wrapper,
    .enroll-section,
    .sidebar-card {
        padding: 1rem !important;
        border-radius: 12px !important;
    }

    .project-slider-stage {
        border-radius: 12px !important;
    }

    /* Make inline fixed heading sizes mobile-safe */
    *[style*="font-size:3rem"],
    *[style*="font-size: 3rem"],
    *[style*="font-size:2.5rem"],
    *[style*="font-size: 2.5rem"] {
        font-size: clamp(1.5rem, 7vw, 2rem) !important;
    }

    /* Inline-heavy sections hardening */
    *[style*="min-width: 300px"],
    *[style*="min-width:300px"],
    *[style*="min-width: 340px"],
    *[style*="min-width:340px"],
    *[style*="min-width: 350px"],
    *[style*="min-width:350px"] {
        min-width: 0 !important;
        width: 100% !important;
    }

    *[style*="display: flex; flex-wrap: wrap"] {
        gap: 1rem !important;
    }

    *[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    *[style*="padding: 2.5rem"],
    *[style*="padding:2.5rem"] {
        padding: 1.1rem !important;
    }

    *[style*="font-size: 3.5rem"],
    *[style*="font-size:3.5rem"] {
        font-size: clamp(1.6rem, 8vw, 2.2rem) !important;
    }

    *[style*="line-height: 1.1"] {
        line-height: 1.25 !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .page-header {
        padding: 84px 0 44px !important;
    }

    .section-padding {
        padding: 2.7rem 0;
    }

    h1 {
        font-size: 1.9rem;
    }

    h2 {
        font-size: 1.45rem;
    }

    h3 {
        font-size: 1.08rem;
    }

    .btn {
        width: 100%;
    }

    .hero-buttons,
    .home-course-btn,
    .course-enroll-btn,
    .enroll-submit {
        width: 100% !important;
    }

    .hero-buttons {
        flex-direction: column !important;
        gap: 0.7rem !important;
    }

    .search-btn {
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        border-radius: 999px !important;
        flex: 0 0 36px !important;
    }

    .phone-field {
        grid-template-columns: 98px minmax(0, 1fr) !important;
    }

    .nav-menu ul {
        gap: 1.1rem !important;
    }

    .nav-menu ul li a {
        font-size: 1.05rem !important;
    }

    .pagination {
        gap: 0.45rem !important;
        margin-top: 2rem !important;
    }

    .page-btn {
        width: 38px !important;
        height: 38px !important;
    }
}

/* =========================================================================
   LIGHT THEME COMPATIBILITY OVERRIDES
   Helps normalize legacy inline dark styles across pages.
   ========================================================================= */
*[style*="background: rgba(15, 23, 42"],
*[style*="background: rgba(15,23,42"],
*[style*="background-color: var(--bg-card)"],
*[style*="background: linear-gradient(rgba(3, 7, 18"],
*[style*="background: linear-gradient(rgba(15, 23, 42"],
*[style*="background: linear-gradient(135deg, #0"],
*[style*="background: linear-gradient(180deg, #0"],
*[style*="background: #0"] {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: var(--text-main) !important;
}

/* Keep dark AI sections dark (fixes "still white" issue) */
.advanced-services-hero {
    background: linear-gradient(180deg, #050a10 0%, #0b1320 100%) !important;
}

.advanced-services-hero .advanced-moving-grid,
.advanced-services-hero .advanced-glow-left,
.advanced-services-hero .advanced-glow-right,
.advanced-services-hero .advanced-overlay-shine {
    z-index: 0 !important;
}

.advanced-services-hero .container {
    position: relative;
    z-index: 2 !important;
}

*[style*="border-top: 1px solid rgba(255,255,255"],
*[style*="border-bottom: 1px solid rgba(255,255,255"],
*[style*="border: 1px solid rgba(255,255,255"] {
    border-color: #e2e8f0 !important;
}

/* Keep text readable inside converted containers */
*[style*="background: rgba(15, 23, 42"] h1,
*[style*="background: rgba(15, 23, 42"] h2,
*[style*="background: rgba(15, 23, 42"] h3,
*[style*="background: rgba(15, 23, 42"] h4,
*[style*="background: rgba(15, 23, 42"] p,
*[style*="background: rgba(15, 23, 42"] span,
*[style*="background: linear-gradient(135deg, #0"] h1,
*[style*="background: linear-gradient(135deg, #0"] h2,
*[style*="background: linear-gradient(135deg, #0"] h3,
*[style*="background: linear-gradient(135deg, #0"] h4,
*[style*="background: linear-gradient(135deg, #0"] p,
*[style*="background: linear-gradient(135deg, #0"] span,
*[style*="background: #0"] h1,
*[style*="background: #0"] h2,
*[style*="background: #0"] h3,
*[style*="background: #0"] h4,
*[style*="background: #0"] p,
*[style*="background: #0"] span {
    color: var(--text-main) !important;
}

*[style*="color: var(--text-muted)"],
*[style*="color:#9ca3af"],
*[style*="color: #9ca3af"] {
    color: #64748b !important;
}