/* CSS Variables */
:root {
    --primary-color: #FF69B4;
    --primary-dark: #C71585;
    --primary-light: #FFB6C1;
    --accent-color: #FF1493;
    --text-color: #1e293b;
    --text-light: #64748b;
    --bg-light: #fdf2f8;
    --white: #FFFFFF;
    --gradient-main: linear-gradient(135deg, #FF69B4 0%, #FFB6C1 100%);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --card-bg: #FFFFFF;
    --nav-bg: rgba(255, 255, 255, 0.9);
    --border-color: rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.7);
}


/* Universal Page Hero (Questionnaire Style) */
.page-hero {
    background: linear-gradient(135deg, #0B0F19 0%, #1A1A2E 40%, #16213E 100%) !important;
    padding: 30px 0 120px !important;
    text-align: center;
    color: white !important;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

/* Decorative Shapes for Page Hero */
.shape-circle,
.shape-square,
.shape-molecule,
.shape-atom,
.science-shape {
    position: absolute;
    opacity: 0.1;
    z-index: 1;
    pointer-events: none;
}

.shape-circle {
    border-radius: 50%;
    background: var(--white);
}

.shape-square {
    background: var(--white);
    transform: rotate(45deg);
}

/* Common Header Text Styles in Hero */
.page-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
    color: white !important;
}

.page-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
    color: white !important;
}

/* Search Box Adjustment for Pink Hero */
.page-hero .search-input-wrapper {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.page-hero .search-btn {
    background: linear-gradient(90deg, #FF1493, #FF69B4);
}

.page-hero .search-icon {
    color: #FF69B4;
}

.page-hero .search-input:focus {
    border-color: #FF69B4;
}







/* Back to Top Button */
#back-to-top {
    display: none;
    /* Hidden by default */
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    font-size: 1.2rem;
    border: none;
    outline: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    display: flex;
}

#back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-y: scroll;
    /* Force scrollbar to prevent layout shift */
}

body {
    font-family: 'Sarabun';
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Ensure form elements inherit the font */
input,
button,
select,
textarea {
    font-family: 'Sarabun';
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gradient-main);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
}

.btn-outline {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-warning {
    background: #ffbc00;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.section {
    padding: 80px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.divider {
    width: 60px;
    height: 4px;
    background: var(--gradient-main);
    margin: 0 auto 15px;
    border-radius: 2px;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 10px 0;
    transition: all 0.3s ease;
}


.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    z-index: 1002;
    /* Ensure logo is clickable */
}

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

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-grow: 1;
    justify-content: center;
}

.nav-links li {
    display: inline-block;
    position: relative;
}

.nav-links li a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.1rem;
    text-decoration: none;
    position: relative;
    padding: 5px 0;
    transition: 0.3s;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--primary-color);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1002;
}

.card-stats-btns {
    display: flex;
    align-items: center;
    gap: 10px;
}

.like-btn,
.favorite-btn {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #6c757d;
    font-family: inherit;
}

.like-btn .like-count {
    font-weight: 600;
}

.like-btn:hover {
    background: #e7f3ff;
    color: #007bff;
    border-color: #007bff;
    transform: translateY(-2px);
}

.like-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.favorite-btn:hover {
    background: #fff9e6;
    color: #ffc107;
    border-color: #ffc107;
    transform: translateY(-2px);
}

.favorite-btn.active {
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.3);
}






.nav-links li a {
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    padding: 5px 0;
}

.nav-links li a:not(.nav-btn):hover,
.nav-links li a:not(.nav-btn).active {
    color: var(--primary-color);
}


.nav-profile-img {
    width: 33px;
    height: 33px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    border: 2px solid var(--white);
    vertical-align: middle;
}

.nav-btn.profile-nav-btn {
    display: flex;
    align-items: center;
    padding: 5px 14px;
}

/* Navbar Dropdown */
.nav-item.dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    padding: 10px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    margin-top: 12px;
    border: 1px solid #f1f5f9;
    gap: 5px;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 15px;
    height: 15px;
    background: var(--card-bg);
    transform: rotate(45deg);
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
}

/* Invisible bridge to prevent closing */
.dropdown-menu::after {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.nav-item.dropdown:hover .dropdown-menu {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.dropdown-item {
    padding: 12px 15px !important;
    color: #64748b !important;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    width: 100%;
    text-align: left;
    border-radius: 10px;
    background: transparent;
    text-decoration: none;
    border: none;
}

.dropdown-item:hover {
    background: #fff1f2;
    color: var(--primary-color) !important;
    padding-left: 20px !important;
}

.dropdown-item.logout-item:hover {
    background: #fef2f2;
    color: #ef4444 !important;
}

.dropdown-item.active {
    color: var(--primary-color) !important;
    font-weight: 600;
    background: var(--bg-light);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--primary-color);
}

/* Mobile Toggle Style */
.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Hide Mobile Elements globally */
.mobile-profile-item,
.mobile-auth-item {
    display: none !important;
}


/* Desktop Login Button */
.btn-login-desktop {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%);
    color: white !important;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.2);
}

.btn-login-desktop:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 105, 180, 0.3);
    color: white !important;
}

/* Mobile Navigation Media Query */
@media (max-width: 960px) {
    .hamburger {
        display: block;
        z-index: 1003;
    }

    .hide-mobile {
        display: none !important;
    }

    .mobile-profile-item,
    .mobile-auth-item {
        display: block !important;
    }








    /* Mobile Login Button Styling */
    .mobile-login-btn {
        background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%);
        color: white !important;
        padding: 15px 30px;
        border-radius: 50px;
        font-weight: 700;
        font-size: 1.25rem;
        display: flex;
        align-items: center;
        width: 100%;
        max-width: 250px;
        justify-content: center;
        gap: 12px;
        box-shadow: 0 10px 20px rgba(255, 105, 147, 0.3);
        margin: 20px auto 0;
        transition: all 0.3s ease;
        border: none;
    }

    .mobile-login-btn:active {
        transform: scale(0.95);
        box-shadow: 0 5px 10px rgba(255, 105, 147, 0.2);
    }

    .mobile-auth-item {
        width: 100%;
        margin-top: 10px;
        list-style: none;
    }

    /* Mobile Profile Card */
    .mobile-profile-item {
        width: 100%;
        margin-bottom: 30px !important;
    }

    .mobile-profile-card {
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 30px 25px;
        border-radius: 25px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 90%;
        margin: 0 auto;
        border: 1px solid rgba(255, 105, 180, 0.15);
    }

    .mobile-avatar {
        width: 90px;
        height: 90px;
        border-radius: 50%;
        overflow: hidden;
        margin-bottom: 20px;
        border: 4px solid white;
        box-shadow: 0 8px 20px rgba(255, 105, 180, 0.25);
    }

    .mobile-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .mobile-user-name {
        display: block;
        font-size: 1.4rem;
        font-weight: 800;
        color: var(--text-color);
        margin-bottom: 6px;
    }

    .mobile-user-role {
        display: inline-block;
        font-size: 0.8rem;
        margin-bottom: 25px;
        padding: 5px 18px;
        border-radius: 50px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .mobile-user-role.role-student {
        background: #fdf2f8;
        color: #db2777;
        border: 1px solid rgba(219, 39, 119, 0.1);
    }

    .mobile-user-role.role-admin {
        background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
        color: #92400e;
        border: 1px solid rgba(146, 64, 14, 0.1);
    }

    .mobile-profile-actions {
        display: flex;
        gap: 15px;
        width: 100%;
    }

    .mobile-action-btn {
        flex: 1;
        padding: 10px;
        border-radius: 12px;
        font-size: 0.95rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: all 0.3s;
        background: #f8f9fa;
        color: var(--text-color);
    }

    .mobile-action-btn.logout {
        color: #ff4757;
        background: #fff5f5;
    }

    .mobile-action-btn:hover {
        transform: translateY(-2px);
    }

    .mobile-action-btn:not(.logout):hover {
        background: var(--primary-color);
        color: white;
    }

    .mobile-action-btn.logout:hover {
        background: #ff4757;
        color: white;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden right */
        left: auto;
        /* Reset left centering */
        transform: none;
        /* Reset transform */
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 160px 20px 60px 20px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 25px;
    }

    .nav-links li a {
        font-size: 1.35rem;
        color: var(--text-color);
        padding: 10px;
    }

    /* Hide nav actions on mobile if we want them inside menu, 
           BUT we moved them out. We should probably move them INTO the menu for mobile or 
           just keep them visible in headers? 
           Usually mobile header has Logo + Hamburger. 
           Let's hide .nav-auth on mobile and show a "Login/Profile" link inside the menu?
           OR better: styling .nav-auth to disappear and rely on a mobile-specific link logic?
           
           Actually, simpler: Let's assume .nav-auth stays in the header for tablets, but for PHONES maybe hide?
           If we hide .nav-auth, user can't login.
           
           Let's Move .nav-auth to be visually integrated into .nav-links on mobile?
           No, HTML structure is fixed.
           
           Solution: On mobile, position .nav-auth to the left of hamburger or hide it and duplicate links?
           I can't duplicate links easily without JS or PHP.
           
           Let's let .nav-auth STAY in the header on mobile (logo - auth - hamburger)?
           Space might be tight.
           
           Alternative: On mobile, just hide the desktop .nav-auth and show a mobile-only login link inside .nav-links?
           I didn't add a mobile-only link.
           
           Let's try to keep .nav-auth visible but small icons? or just hide text?
           
           Let's just keep it visible on right side next to hamburger.
        */

    .nav-auth {
        margin-right: 40px;
        /* Space for hamburger */
    }

    .nav-auth span {
        display: none;
        /* Hide greeting text on mobile */
    }

    .nav-auth {
        gap: 10px;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 10px 0 0 0;
        display: none;
        background: transparent;
        text-align: center;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .dropdown-menu::before {
        display: none;
    }

    .dropdown-item {
        justify-content: center;
        border: none;
        font-size: 1.1rem;
        padding: 8px 0 !important;
    }

    .nav-item.dropdown.active .dropdown-menu {
        display: flex;
        animation: fadeIn 0.3s ease;
    }

    .logo {
        z-index: 1002;
    }
}

/* Hero Section */
.hero {
    padding-top: 30px;
    padding-bottom: 80px;
    background: linear-gradient(135deg, #0B0F19 0%, #1A1A2E 40%, #16213E 100%);
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
}



@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

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

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
        font-size: 1rem;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .school-name {
        font-size: 1.25rem;
    }

    .district {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2.1rem;
    }

    .school-name {
        font-size: 1.1rem;
    }

    .district {
        font-size: 0.95rem;
    }

    .hero-desc {
        font-size: 0.95rem;
    }

    .image-blob {
        width: 320px;
        height: 320px;
    }

    .section {
        padding: 50px 0;
    }
}

.badge {
    display: inline-block;
    background: rgba(255, 105, 180, 0.15);
    color: #FFB6C1;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 105, 180, 0.3);
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #ffffff;
}

.school-name {
    font-size: 1.5rem;
    color: rgba(255, 105, 180, 0.9);
    font-weight: 600;
    margin-bottom: 5px;
}

.district {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-bottom: 30px;
    max-width: 500px;
    min-height: 3.2em;
}

/* Typing Effect Cursor */
.typing-cursor {
    display: inline-block;
    width: 2px;
    background-color: var(--primary-color);
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-btns {
    display: flex;
    gap: 15px;
}

.hero-image {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.image-blob {
    width: 450px;
    height: 450px;
    border-radius: 50%;
    /* overflow: hidden; Removed to allow ripples to show outside */
    position: relative;
    border: 5px solid var(--white);
    box-shadow: var(--shadow-md);
    animation: float 6s ease-in-out infinite;
    background: var(--white);
    z-index: 1;
    /* Ensure blob content is above ripples if needed, though pseudos are part of it. */
}

/* Water Ripple Effect */
.image-blob::before,
.image-blob::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(255, 105, 180, 0.6);
    z-index: -1;
    opacity: 0;
}

.image-blob::before {
    animation: ripple 2.5s linear infinite;
}

.image-blob::after {
    animation: ripple 2.5s linear 1.25s infinite;
}

@keyframes ripple {
    0% {
        width: 100%;
        height: 100%;
        opacity: 0.8;
        border-width: 3px;
        box-shadow: 0 0 10px rgba(255, 105, 180, 0.3);
    }

    100% {
        width: 150%;
        height: 150%;
        opacity: 0;
        border-width: 0px;
        box-shadow: 0 0 20px rgba(255, 105, 180, 0);
    }
}

.image-blob img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    /* Ensure image is circular since overflow is removed */
}

/* Upcoming Events Section */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.event-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: 0.3s;
    border: 1px solid var(--border-color);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 20, 147, 0.15);
    border-color: #ffdeeb;
}

.event-date {
    background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 12px;
    text-align: center;
    min-width: 60px;
}

.event-date .day {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.event-date .month {
    font-size: 0.8rem;
    font-weight: 500;
}

.event-details {
    flex: 1;
}

.event-details h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
}

.event-time {
    color: #ff69b4;
    font-size: 0.85rem;
    margin: 0 0 5px 0;
    font-weight: 500;
}

.event-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-action .btn-icon {
    width: 40px;
    height: 40px;
    background: #fff0f5;
    color: #ff69b4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.3s;
}

.event-action .btn-icon:hover {
    background: #ff69b4;
    color: white;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.profile-card {
    background: var(--bg-light);
    padding: 40px 30px;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 105, 180, 0.1);
}

.profile-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    background: var(--white);
    border-color: var(--primary-light);
}

.profile-card .icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.profile-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.profile-list {
    text-align: left;
    display: inline-block;
}

.profile-list li {
    margin-bottom: 10px;
    color: var(--text-light);
}

/* Portfolio Section (Reusable for Projects & News) */
.portfolio-section {
    background: var(--bg-light);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.portfolio-img {
    height: 200px;
    overflow: hidden;
    position: relative;
    /* Context for absolute positioning badge */
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.1);
}

.portfolio-info {
    padding: 25px;
}

.portfolio-info h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portfolio-info p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: var(--primary-color);
}

/* Hover effects removed */

/* Activities Section & Date Badge */
.activities-section {
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.date-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 60px;
}

.date-badge .day {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.date-badge .month {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Courses Section */
.courses-section {
    background-color: var(--bg-light) !important;
    padding: 80px 0;
    position: relative;
    z-index: 10;
}

/* Section Separator */
.section-separator {
    height: 4px;
    background: linear-gradient(to right, transparent, var(--primary-light), transparent);
    width: 80%;
    margin: 0 auto;
    border-radius: 5px;
    opacity: 0.6;
}

/* Course Card Styles (Reusable) */

/* Contact Section */
.contact-section {
    background: var(--bg-light);
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: rgba(255, 105, 180, 0.1);
    border-radius: 50%;
    z-index: 0;
    animation: pulse 4s infinite;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
}

@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 30px;
    }

    .map-container {
        min-height: 300px;
    }
}

.contact-info h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.info-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.info-item p {
    color: var(--text-light);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-dark);
    transform: translateY(-3px) rotate(360deg);
}

.map-container {
    border-radius: var(--radius);
    overflow: hidden;
    height: 100%;
    min-height: 400px;
    background: #eee;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #334155;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

footer p {
    opacity: 0.9;
}


/* Global Custom File Input Styles */
.custom-file-upload-box {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 15px;
    border: 2px dashed var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.custom-file-upload-box:hover {
    border-color: var(--primary-color);
    background: #fff0f5;
}

.custom-file-upload-box:hover .btn-file-custom {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.3);
}

.btn-file-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%);
    color: white;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.2);
}

.file-name-display {
    margin-top: 15px;
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
    display: block;
    word-break: break-all;
}

.file-preview-img {
    max-width: 200px;
    max-height: 200px;
    margin-top: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid white;
}

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Background Shapes */
.shape-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    z-index: 0;
    opacity: 0.6;
    animation: moveShape 10s infinite alternate;
}

.shape-1 {
    top: 10%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: #FFB6C1;
    animation-delay: 0s;
}

.shape-2 {
    bottom: 20%;
    right: -5%;
    width: 250px;
    height: 250px;
    background: #FF69B4;
    animation-delay: 2s;
}

.shape-3 {
    top: 50%;
    left: 40%;
    width: 200px;
    height: 200px;
    background: #FFC0CB;
    opacity: 0.4;
    animation-delay: 4s;
}

/* Animations Keyframes */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.2;
    }

    100% {
        transform: scale(1);
        opacity: 0.1;
    }
}

@keyframes moveShape {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(30px, 30px) rotate(20deg);
    }
}


/* Modern Profile Teaser Section */
.profile-teaser-section {
    background: linear-gradient(135deg, #FFF0F5 0%, #FFFFFF 100%);
    position: relative;
    overflow: hidden;
    padding: 100px 0;
}

.profile-teaser-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.teaser-image {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
}

.teaser-image img {
    width: 380px;
    height: 450px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 20px 20px 0px rgba(255, 105, 180, 0.2);
    transition: var(--transition);
    z-index: 2;
    position: relative;
}

.teaser-image::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 20px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.2;
    filter: blur(20px);
    z-index: 1;
}

.teaser-image::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: 20px;
    width: 150px;
    height: 150px;
    background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="2" fill="%23FF69B4" /><circle cx="30" cy="10" r="2" fill="%23FF69B4" /><circle cx="50" cy="10" r="2" fill="%23FF69B4" /><circle cx="10" cy="30" r="2" fill="%23FF69B4" /><circle cx="30" cy="30" r="2" fill="%23FF69B4" /><circle cx="50" cy="30" r="2" fill="%23FF69B4" /></svg>');
    opacity: 0.3;
    z-index: 0;
}

.teaser-content {
    flex: 1;
}

.teaser-sub {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 15px;
}

.teaser-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
    margin-bottom: 25px;
    position: relative;
}

.teaser-desc {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 35px;
    border-left: 4px solid var(--primary-light);
    padding-left: 20px;
}

.stat-row {
    display: flex;
    gap: 40px;
    margin-bottom: 35px;
}

.stat-item h4 {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Responsive for Teaser */
@media (max-width: 992px) {
    .profile-teaser-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .teaser-desc {
        border-left: none;
        padding-left: 0;
    }

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

    .teaser-image img {
        width: 100%;
        max-width: 350px;
        height: auto;
    }
}

/* Responsive */

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

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

    .hero-image {
        order: -1;
    }

    .image-blob {
        width: 350px;
        height: 350px;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 30px;
    }

    .map-container {
        min-height: 300px;
    }
}

@media (max-width: 768px) {

    .hamburger {
        display: block;
        margin-left: auto;
        /* Push hamburger to right */
    }

    .nav-container {
        justify-content: space-between;
        /* Reset alignment */
    }

    .logo {
        position: static;
        /* Reset logo position */
        transform: none;
        margin: 0;
    }

    .nav-links li:last-child {
        position: static;
        /* Reset login btn position */
        transform: none;
        margin-top: 10px;
    }

    /* Mobile Dropdown Styles */
    .nav-item.dropdown {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .nav-item.dropdown>a {
        width: 100%;
        justify-content: center;
    }

    .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
        border: none;
        background: #f8f9fa;
        margin-top: 5px;
        padding-left: 0;
        text-align: center;
        opacity: 1;
        /* Override fade animation */
        transform: none;
    }

    .nav-item.dropdown.active .dropdown-menu {
        display: flex;
    }

    .dropdown-item {
        justify-content: center;
        padding: 10px !important;
    }

    .nav-item.dropdown.active>a i.fa-chevron-down {
        transform: rotate(180deg);
        transition: transform 0.3s;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .reveal {
        transition-delay: 0s !important;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    transition: var(--transition);
    text-decoration: none;
    font-weight: 600;
}

.page-link:hover,
.page-link.active {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

/* Footer Admin Link */
.footer-admin-link {
    margin-top: 10px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.footer-admin-link a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-admin-link a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Admin Menu Grid */
.admin-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.admin-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
    border: 1px solid #eee;
}

.admin-menu-item i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.admin-menu-item span {
    font-weight: 500;
}

.admin-menu-item:hover {
    background: var(--white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

/* Search Form Styles */
.search-form-container {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    margin-top: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
    border: 1px solid #dae1e7;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 10;
}

.search-input,
.search-select {
    padding: 12px 20px;
    border: 2px solid #eee;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
    color: var(--text-color);
    background: #fdfdfd;
}

.search-input:focus,
.search-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(255, 105, 180, 0.1);
    background: var(--white);
}

.search-input {
    flex-grow: 1;
    min-width: 250px;
}

.search-select {
    min-width: 150px;
    cursor: pointer;
}

.search-btn {
    background: var(--gradient-main);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.3);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 105, 180, 0.4);
}

.clear-btn {
    color: #888;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.clear-btn:hover {
    color: var(--primary-color);
}

/* Profile Wrapper */
.profile-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.profile-about {
    display: flex;
    gap: 40px;
    align-items: center;
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border-left: 5px solid var(--primary-color);
}

.about-img {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--bg-light);
    box-shadow: var(--shadow-md);
}

.about-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-text {
    flex-grow: 1;
}

.about-text h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.position-badge {
    display: inline-block;
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.about-desc {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

.personal-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.detail-item i {
    width: 45px;
    height: 45px;
    background: var(--bg-light);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.detail-item:hover i {
    background: var(--primary-color);
    color: var(--white);
    transform: rotate(15deg);
}

.detail-item span {
    font-size: 0.85rem;
    color: var(--text-light);
    display: block;
}

.detail-item p {
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

/* Responsive Profile */
@media (max-width: 768px) {
    .profile-about {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .about-img {
        width: 150px;
        height: 150px;
        margin-bottom: 20px;
    }

    .personal-details {
        text-align: left;
    }
}

/* Profile Teaser Section */
.profile-teaser-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    background: var(--white);
    padding: 60px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    margin-bottom: 50px;
    border: 1px solid rgba(255, 105, 180, 0.1);
}

/* Decorative background shape for balance */
.profile-teaser-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 105, 180, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

.teaser-image {
    flex: 0 0 320px;
    height: 320px;
    border-radius: 50%;
    overflow: hidden;
    border: 10px solid var(--white);
    box-shadow: 0 15px 35px rgba(255, 105, 180, 0.2);
    position: relative;
    z-index: 1;
}

.teaser-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.teaser-image:hover img {
    transform: scale(1.05);
}

.teaser-text {
    flex: 1;
    position: relative;
    z-index: 1;
    text-align: left;
}

.teaser-text h3 {
    font-size: 2.4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.teaser-text h3::after {
    content: '';
    display: block;
    width: 80px;
    height: 5px;
    background: var(--gradient-main);
    border-radius: 50px;
    margin-top: 10px;
}

.teaser-text p {
    font-size: 1.15rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 35px;
}

.teaser-text .btn-outline {
    padding: 12px 35px;
    font-size: 1rem;
    border-width: 2px;
}

/* Responsive Teaser */
@media (max-width: 992px) {
    .profile-teaser-content {
        flex-direction: column;
        text-align: center;
        padding: 40px 30px;
        gap: 40px;
    }

    .teaser-text h3::after {
        margin: 10px auto 0;
    }

    .teaser-image {
        width: 260px;
        height: 260px;
        border-width: 6px;
    }
}

/* Top Bar */
.top-bar {
    background: var(--primary-dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.9rem;
    position: relative;
    z-index: 1001;
}

.top-bar .container {
    display: flex;
    justify-content: flex-end;
}

/* Adjust Navbar top position */
.navbar {
    top: 0;
}

@media (max-width: 768px) {
    .navbar {
        top: 0;
    }

    .top-bar {
        display: none;
    }
}

/* Admin Filter Card Styles */
.filter-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid var(--border-color);
}

.filter-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
    /* Allow growing */
}

.filter-input {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    min-width: 220px;
    color: var(--text-color);
    background: var(--bg-light);
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.15);
}

.filter-input::placeholder {
    color: #aaa;
}

/* Ensure icons in form look good */
.filter-form i.fa-filter {
    color: var(--primary-color) !important;
    background: rgba(255, 105, 180, 0.1);
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 5px;
}

/* Mobile Responsiveness for Filters */
@media (max-width: 992px) {
    .filter-card {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-form {
        width: 100%;
    }

    .filter-input {
        flex: 1;
    }
}

@media (max-width: 576px) {
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-input {
        width: 100%;
        min-width: 0;
    }

    .filter-card button,
    .filter-card a.btn {
        width: 100%;
        justify-content: center;
    }
}

.table-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h1 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-color);
}

/* Print optimizations */
@media print {
    @page {
        size: auto;
        margin: 20mm;
    }

    .admin-nav,
    .filter-card,
    .btn,
    .actions,
    .header-card {
        display: none !important;
    }

    .content-card {
        box-shadow: none;
        border: none;
        border-radius: 0;
    }

    table {
        border: 1px solid #ddd;
    }

    th,
    td {
        border: 1px solid #ddd;
    }
}

/* Cookie Consent Banner */
.cookie-banner-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    color: var(--text-color);
    padding: 15px 20px;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    font-family: 'Sarabun';
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-text {
    flex: 1;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    white-space: nowrap;
}

.btn-cookie-accept {
    background-color: transparent;
    color: #00BFFF;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-cookie-accept:hover {
    color: #fff;
    text-decoration: underline;
}

.btn-cookie-settings {
    background-color: transparent;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-cookie-settings:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Report Box Styles */
.report-box {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 5;
}

.report-header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

.report-header h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
}

.report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid transparent;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
    background: var(--card-bg);
}

.stat-card.total {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.stat-card.total .stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.stat-card.total p {
    color: rgba(255, 255, 255, 0.9);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.stat-icon.secondary {
    background: var(--primary-light);
    color: var(--primary-color);
}

.stat-info h3 {
    font-size: 1.8rem;
    margin: 0;
    line-height: 1;
    color: inherit;
}

.stat-info p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Course Grid Adjustment */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

@media (min-width: 992px) {
    .course-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.course-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.course-img {
    height: 180px;
    overflow: hidden;
}

.course-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.course-card:hover .course-img img {
    transform: scale(1.05);
}

.course-body {
    padding: 20px;
}

.course-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.btn-enroll {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 12px 20px;
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
    margin-top: 10px;
    gap: 8px;
}

.btn-enroll:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.4);
}

.cookie-banner-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #0F1740;
    /* Dark Blue from image */
    color: white;
    padding: 15px 20px;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    font-family: 'Sarabun';
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-text {
    flex: 1;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    white-space: nowrap;
}

.btn-cookie-accept {
    background-color: transparent;
    color: #00BFFF;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-cookie-accept:hover {
    color: #fff;
    text-decoration: underline;
}

.btn-cookie-settings {
    background-color: transparent;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-cookie-settings:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Report Box Styles */
.report-box {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 5;

}

.report-header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;

}

.report-header h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;

}

.report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;

}

.stat-card {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid transparent;

}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
    background: var(--white);

}

.stat-card.total {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;

}

.stat-card.total .stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;

}

.stat-card.total p {
    color: rgba(255, 255, 255, 0.9);

}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);

}

.stat-icon.secondary {
    background: var(--primary-light);
    color: var(--primary-color);

}

.stat-info h3 {
    font-size: 1.8rem;
    margin: 0;
    line-height: 1;
    color: inherit;

}

.stat-info p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    color: var(--text-light);

}

/* Course Grid Adjustment */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;

}

@media (min-width: 992px) {
    .course-grid {
        grid-template-columns: repeat(3, 1fr);

    }


}

.course-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    border: 1px solid var(--border-color);

}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);

}

.course-img {
    height: 180px;
    overflow: hidden;

}

.course-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;

}

.course-card:hover .course-img img {
    transform: scale(1.05);

}

.course-body {
    padding: 20px;

}

.course-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

}

.course-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;

}

.btn-enroll {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;

}

.btn-enroll:hover {
    color: var(--primary-color);

}

/* Favorite Button (Premium Heart - Bottom Position) */
.favorite-btn {
    position: relative;
    /* Changed from absolute */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    color: #bbb;
    padding: 0;
    outline: none;
    z-index: 5;
}

.favorite-btn:hover {
    transform: scale(1.1) translateY(-2px);
    background: var(--white);
    color: #ffb100;
    box-shadow: 0 8px 20px rgba(255, 177, 0, 0.2);
    border-color: rgba(255, 177, 0, 0.2);
}

.favorite-btn.active {
    color: #ffc107;
    background: var(--white);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.1);
}

.favorite-btn.active i {
    animation: starIconPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.favorite-btn i {
    font-size: 1.2rem;
    transition: all 0.3s;
    pointer-events: none;
}

/* Clicking feedback */
.favorite-btn:active {
    transform: scale(0.9);
}

@keyframes starIconPop {
    0% {
        transform: scale(0.5);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

/* Extra Glow for active state */
.favorite-btn.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.4);
    opacity: 0;
    transition: opacity 0.3s;
}

.favorite-btn.active:hover::after {
    opacity: 1;
}

/* Footer layout for buttons */
.card-footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* Mobile Grid Adjustments */
@media (max-width: 576px) {

    .course-grid,
    .portfolio-grid,
    .activities-grid,
    .profile-grid,
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-input {
        width: 100%;
        min-width: 0;
    }
}

/* Ensure tables scroll on mobile */
@media (max-width: 992px) {

    .table-responsive,
    .dashboard-main>div>div[style*="overflow-x: auto"] {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .premium-table {
        min-width: 800px;
        /* Ensure table keeps shape */
    }
}


/* Premium Pill Button Style Fix */
.btn-pill-pink {
    background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 8px 12px !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.4) !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    white-space: nowrap !important;
}

.btn-pill-pink:hover {
    background: linear-gradient(135deg, #FF1493 0%, #C71585 100%) !important;
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.5) !important;
    transform: translateY(-2px) !important;
    color: white !important;
}


/* Gold Button (Request Retake) */
.btn-pill-gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 8px 12px !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.4) !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-pill-gold:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%) !important;
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.5) !important;
    transform: translateY(-2px) !important;
    color: #fff !important;
}

/* Silver Button (Pending / Disabled) */
.btn-pill-silver {
    background: linear-gradient(135deg, #e0e0e0 0%, #c0c0c0 100%) !important;
    color: #666 !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 8px 12px !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    text-decoration: none !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    white-space: nowrap !important;
    cursor: not-allowed !important;
    opacity: 0.8;
}


/* Cyan Button (Certificate) */
.btn-pill-cyan {
    background: linear-gradient(135deg, #00BFFF 0%, #1E90FF 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 8px 12px !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(0, 191, 255, 0.4) !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-pill-cyan:hover {
    background: linear-gradient(135deg, #00d2ff 0%, #0096FF 100%) !important;
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.5) !important;
    transform: translateY(-2px) !important;
    color: #fff !important;
}

/* User Profile Compact style for Navbar - Premium Redesign */
.user-profile-compact {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 6px 18px 6px 8px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 50px;
    text-decoration: none !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: visible;
}

.user-profile-compact:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--primary-light);
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.15);
    transform: translateY(-2px);
}

.user-avatar-mini {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.3);
    background: white;
    transition: var(--transition);
}

.user-profile-compact:hover .user-avatar-mini {
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.5);
    transform: scale(1.05);
}

.user-avatar-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info-mini {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.3;
    text-align: left;
}

.user-name-mini {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 2px;
    white-space: nowrap;
}

.user-role-mini {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 50px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Role Specific Badges */
.user-role-mini.role-student {
    background: #fdf2f8;
    color: #db2777;
    border: 1px solid rgba(219, 39, 119, 0.1);
}

.user-role-mini.role-admin {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #92400e;
    border: 1px solid rgba(146, 64, 14, 0.1);
}

.user-chevron {
    font-size: 0.75rem;
    color: #94a3b8;
    transition: var(--transition);
}

.user-profile-compact:hover .user-chevron {
    color: var(--primary-color);
    transform: rotate(180deg);
}

/* Adjust dropdown toggle in header to match */
.nav-item.dropdown .user-profile-compact {
    cursor: pointer;
}

/* User Profile in Navbar (Restored) */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-profile-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 15px 5px 5px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
}

.user-profile-compact:hover {
    background: #f8f8f8;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.user-avatar-mini {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--primary-color);
}

.user-avatar-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info-mini {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.user-name-mini {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Removed conflicting white !important for user-role-mini */


/* Gold Button (Request Retake) */
.btn-pill-gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 8px 12px !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.4) !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-pill-gold:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%) !important;
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.5) !important;
    transform: translateY(-2px) !important;
    color: #fff !important;
}

/* Silver Button (Pending / Disabled) */
.btn-pill-silver {
    background: linear-gradient(135deg, #e0e0e0 0%, #c0c0c0 100%) !important;
    color: #666 !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 8px 12px !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    text-decoration: none !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    white-space: nowrap !important;
    cursor: not-allowed !important;
    opacity: 0.8;
}


/* Cyan Button (Certificate) */
.btn-pill-cyan {
    background: linear-gradient(135deg, #00BFFF 0%, #1E90FF 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 8px 12px !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(0, 191, 255, 0.4) !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-pill-cyan:hover {
    background: linear-gradient(135deg, #00d2ff 0%, #0096FF 100%) !important;
    box-shadow: 0 6px 20px rgba(0, 191, 255, 0.5) !important;
    transform: translateY(-2px) !important;
    color: #fff !important;
}

/* User Profile Compact style for Navbar */
.user-profile-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 15px 4px 4px;
    background: white;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.user-profile-compact:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.user-avatar-mini {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-avatar-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info-mini {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
    text-align: left;
}

.user-name-mini {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-color);
}

/* Redundant user-role-mini removed */

/* Adjust dropdown toggle in header to match */
.nav-item.dropdown .user-profile-compact {
    cursor: pointer;
}

/* User Profile in Navbar (Restored) */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-profile-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 15px 5px 5px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
}

.user-profile-compact:hover {
    background: #f8f8f8;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.user-avatar-mini {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--primary-color);
}

.user-avatar-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info-mini {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.user-name-mini {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Secondary redundant user-role-mini removed */

/* Role COLOR Badges */
.role-admin {
    color: #FF1493 !important;
    font-weight: 700;
}

.role-student {
    color: #2196f3 !important;
    font-weight: 700;
}

/* Star Button in Image Overlay (Request: เล็ก, กรอบด้านบน) */
.course-img .favorite-btn,
.portfolio-img .favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--glass-bg);
    backdrop-filter: blur(5px);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    color: #ccc;
    /* Default gray for not active */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.course-img .favorite-btn:hover,
.portfolio-img .favorite-btn:hover {
    transform: scale(1.15);
    background: var(--white);
    color: #ffd700;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.course-img .favorite-btn i,
.portfolio-img .favorite-btn i {
    font-size: 1rem;
    /* Smaller icon */
    line-height: 1;
}

.course-img .favorite-btn.active,
.portfolio-img .favorite-btn.active {
    color: #ffc107;
    /* Gold when active */
    background: var(--white);
}

/* Full Width Rectangular Pink Button */
.btn-block-pink {
    background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 0 !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    box-shadow: 0 4px 6px rgba(255, 20, 147, 0.2) !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    gap: 8px !important;
}

.btn-block-pink:hover {
    background: linear-gradient(135deg, #FF1493 0%, #C71585 100%) !important;
    box-shadow: 0 6px 12px rgba(255, 20, 147, 0.3) !important;
    transform: translateY(-2px) !important;
    color: white !important;
}

/* --- Animations --- */
@keyframes podiumDrop {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }

    60% {
        transform: translateY(10px);
        opacity: 1;
    }

    80% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes crownFloat {

    0%,
    100% {
        transform: translateX(-50%) rotate(-10deg) translateY(0);
    }

    50% {
        transform: translateX(-50%) rotate(-5deg) translateY(-10px);
    }
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
        border-color: #FFD700;
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
        border-color: #FFFACD;
    }

    100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
        border-color: #FFD700;
    }
}

.podium-section-image {
    padding: 60px 0;
    text-align: center;
    background: var(--bg-light);
    overflow: hidden;
    /* For entrance animations */
}

.podium-image-container {
    position: relative;
    width: 600px;
    height: 400px;
    margin: 0 auto;
    background-image: url('images/podium_bg.svg');
    background-repeat: no-repeat;
    background-position: bottom center;
    background-size: contain;
}

.podium-avatar-pos {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    background: var(--white);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: podiumDrop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
    /* Star hidden */
}

.podium-avatar-pos:hover {
    transform: scale(1.15) translateY(-5px);
    z-index: 100;
}

.podium-avatar-pos img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Rank 1 Position */
.pos-1 {
    top: 20px;
    /* Adjusted for new SVG */
    left: 240px;
    /* Center of 190-410 (300) - 60 */
    width: 120px;
    height: 120px;
    border-color: #FFD700;
    animation-delay: 0.6s;
    /* Enters last */
    animation-name: podiumDrop, glowPulse;
    /* Combo animation */
    animation-duration: 0.8s, 2s;
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1), ease-in-out;
    animation-iteration-count: 1, 1;
    animation-direction: normal, normal;
    animation-fill-mode: forwards, none;
}

.pos-1 .crown-icon {
    position: absolute;
    top: -50px;
    left: 50%;
    font-size: 3.5rem;
    color: #FFD700;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    animation: crownFloat 3s ease-in-out 1;
    z-index: 10;
}

/* Rank 2 Position */
.pos-2 {
    top: 90px;
    left: 75px;
    /* Center of 40-210 (125) - 50 */
    border-color: #C0C0C0;
    animation-delay: 0.2s;
}

/* Rank 3 Position */
.pos-3 {
    top: 130px;
    left: 425px;
    /* Center of 390-560 (475) - 50 */
    border-color: #CD7F32;
    animation-delay: 0.4s;
}

.podium-info-box {
    position: absolute;
    background: var(--white);
    padding: 5px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
    left: 50%;
    transform: translateX(-50%);
    bottom: -35px;
    width: 120px;
    text-align: center;
}

.podium-info-name {
    display: block;
    color: var(--text-color);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.podium-info-points {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

/* --- Ranking List (4-10) --- */
.ranking-list-container {
    max-width: 600px;
    margin: 20px auto 0;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item:hover {
    background: var(--bg-light);
}

.ranking-rank {
    width: 30px;
    font-weight: bold;
    color: #888;
    font-size: 1.1rem;
    text-align: center;
    margin-right: 15px;
}

.ranking-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.ranking-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-name {
    flex-grow: 1;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.ranking-points {
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Mobile Responsiveness */
@media (max-width: 650px) {
    .podium-image-container {
        width: 100%;
        height: auto;
        aspect-ratio: 600/400;
        background-size: contain;
    }

    .podium-avatar-pos {
        width: 14vw;
        height: 14vw;
        border-width: 2px;
    }

    .pos-1 {
        width: 18vw;
        height: 18vw;
        left: 41%;
        top: 8%;
    }

    .pos-2 {
        left: 12%;
        top: 25%;
    }

    .pos-3 {
        left: 71%;
        top: 35%;
    }

    .podium-info-box {
        bottom: -30px;
        padding: 2px 5px;
        font-size: 0.7rem;
        width: 80px;
    }

    .crown-icon {
        font-size: 1.5rem !important;
        top: -25px !important;
    }
}

/* Global Mobile Hero Scaling */
@media (max-width: 768px) {
    .page-hero {
        padding: 20px 0 100px !important;
    }
}