/* ========================================
   TSMU University - Main Stylesheet
   Theme: Modern Professional (Clean & Shadow)
   ======================================== */

/* ========== CSS Variables ========== */
:root {
    /* Brand Colors */
    --primary-blue: #0056D2;
    /* Deeper, more professional blue */
    --primary-dark: #003B8E;
    --primary-light: #4D94FF;
    --accent-blue: #007BFF;

    /* Neutral Colors */
    --white: #FFFFFF;
    --off-white: #F9FAFB;
    --light-gray: #EAECF0;
    --medium-gray: #667085;
    --dark-gray: #344054;
    --black: #101828;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0056D2 0%, #003B8E 100%);
    --gradient-hero: linear-gradient(to right, rgba(0, 59, 142, 0.9), rgba(0, 86, 210, 0.8));

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.1), 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.1), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
    --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
    --shadow-xl: 0 20px 24px -4px rgba(16, 24, 40, 0.08), 0 8px 8px -4px rgba(16, 24, 40, 0.03);

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Outfit', var(--font-sans);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 5rem;
    /* Increased for better separation */

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Global Resets & Base Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    color: var(--dark-gray);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========== Typography ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: var(--spacing-sm);
    color: var(--black);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    line-height: 1.1;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-blue);
    margin-bottom: var(--spacing-xs);
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--medium-gray);
    font-size: 1.125rem;
    /* Slightly larger for readability */
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ========== Utility Containers ========== */
.container {
    max-width: 1280px;
    /* Wider container for modern look */
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-lg);
}

.section {
    padding: var(--spacing-2xl) 0;
    position: relative;
    overflow: hidden;
}

.bg-light {
    background-color: var(--off-white);
}

.bg-white {
    background-color: var(--white);
}

/* ========== Section Titles ========== */
.section-title {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--spacing-xl);
}

.section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 0px;
    /* Removed underline spacing */
}

.section-title p {
    font-size: 1.25rem;
    color: var(--medium-gray);
    margin-top: var(--spacing-sm);
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-white {
    background: var(--white);
    color: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

.btn-white:hover {
    background: var(--off-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
}

/* ========== Navigation ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    /* White with slight transparency */
    backdrop-filter: blur(10px);
    /* Glass effect */
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    /* More opaque on scroll */
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-blue);
    font-family: var(--font-heading);
}

.navbar-brand img {
    height: 48px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
}

.nav-menu li a {
    color: var(--dark-gray);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width var(--transition-base);
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--primary-blue);
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--black);
    transition: all var(--transition-base);
    border-radius: 2px;
}

/* ========== Hero Section ========== */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    background: var(--white);
    overflow: hidden;
}

/* ========== Hero Section ========== */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    background: var(--black);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: url('../images/univ.jpg') no-repeat center center/cover;
    filter: blur(4px);
    transform: scale(1.05);
    /* Prevent blur edges from showing */
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
}

/* 
.hero-bg img {
    display: none; 
} 
*/

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 900px;
    padding: 0 var(--spacing-md);
    margin: 0 auto;
}

.hero-content h1 {
    color: var(--white);
    font-weight: 800;
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== Cards & Grid System ========== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--spacing-lg);
    width: 100%;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--light-gray);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    text-align: left;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 86, 210, 0.05);
    /* Very light blue bg */
    border-radius: var(--radius-md);
    color: var(--primary-blue);
    font-size: 1.75rem;
    margin-bottom: var(--spacing-md);
    transition: all var(--transition-base);
}

.feature-card:hover .feature-icon {
    background: var(--primary-blue);
    color: var(--white);
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--black);
}

.feature-card p {
    font-size: 1rem;
    color: var(--medium-gray);
    flex-grow: 1;
    /* Pushes content down if needed, ensures uniform height */
}

/* ========== Reusable "Glass" Card (Now Modern White Card) ========== */
.glass-card {
    background: var(--white);
    backdrop-filter: none;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    height: 100%;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* ========== Stats Section ========== */
.stats-section {
    background: var(--primary-blue);
    color: var(--white);
    padding: var(--spacing-2xl) 0;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
}

.stat-item {
    padding: var(--spacing-md);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-xs);
    line-height: 1;
    color: var(--white);
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 500;
}

/* ========== Footer ========== */
.footer {
    background: var(--black);
    color: var(--white);
    padding: var(--spacing-2xl) 0 var(--spacing-md);
    font-size: 0.95rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer h3 {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    position: relative;
    display: inline-block;
}

.footer h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-blue);
    border-radius: 2px;
}

.footer p {
    color: var(--medium-gray);
    margin-bottom: var(--spacing-md);
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    margin-bottom: 0.75rem;
}

.footer ul li a {
    color: var(--light-gray);
    transition: all var(--transition-fast);
}

.footer ul li a:hover {
    color: var(--primary-light);
    padding-left: 4px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all var(--transition-base);
}

.social-links a:hover {
    background: var(--primary-blue);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-lg);
    text-align: center;
    color: var(--medium-gray);
    font-size: 0.875rem;
}

/* ========== Responsive Design ========== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        /* Changed to right for side drawer effect */
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease-in-out;
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        margin-bottom: 1rem;
    }

    .nav-menu li a {
        font-size: 1.125rem;
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--light-gray);
    }

    .nav-menu li a:hover::after {
        width: 0;
        /* No underline on mobile */
    }

    .hero-content h1 {
        font-size: 2.25rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: var(--spacing-xl) 0;
    }
}

/* ========== Loading & Animations ========== */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Utility to ensure equal height in flex containers */
.h-full {
    height: 100%;
}

/* ========== Newsletter Form ========== */
.footer-newsletter {
    margin-top: var(--spacing-md);
}

.footer-newsletter h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.625rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
}

.newsletter-form button {
    padding: 0.625rem 1.25rem;
    white-space: nowrap;
}

/* ========== Loading Animation ========== */
.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light-gray);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== New Helper Classes (Refactoring from Inline) ========== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    align-items: center;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-top: var(--spacing-md);
}

.feature-list li {
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.feature-list li i {
    color: var(--primary-blue);
    margin-top: 0.25rem;
}

.cta-card {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: var(--spacing-xl);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--light-gray);
}

.cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    align-items: start;
    text-align: center;
}

.cta-icon {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: var(--spacing-sm);
}

.testimonial-header {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    align-items: center;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--royal-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.testimonial-info h4 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
    color: var(--black);
}

.testimonial-info p {
    font-size: 0.9rem;
    color: var(--medium-gray);
    margin: 0;
}

.step-card {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--light-gray);
    transition: all var(--transition-base);
    height: 100%;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-blue);
}

.step-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-md);
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
}

/* Section specific backgrounds */
.bg-glass-dark {
    background: rgba(30, 144, 255, 0.05);
    /* Lighter touch */
    border-top: 1px solid var(--light-gray);
    border-bottom: 1px solid var(--light-gray);
}