/* SmartTag Modern Design - WordPress Style */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Yellow and Orange Theme Colors */
    --primary-yellow: #FFD700;
    --primary-yellow-light: #FFF8DC;
    --primary-yellow-dark: #FFA500;
    --primary-orange: #FF8C00;
    --primary-orange-light: #FFE4B5;
    --primary-orange-dark: #FF6347;
    --primary-blue: #4FA3F7; /* Keep for compatibility */
    --primary-blue-dark: #2d7dd2;
    /* Additional yellow/orange shades */
    --yellow-light: #FFFACD;
    --yellow-medium: #FFD700;
    --yellow-dark: #FFA500;
    --orange-light: #FFE4B5;
    --orange-medium: #FF8C00;
    --orange-dark: #FF6347;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--bg-white);
    margin: 0;
    padding: 0;
}

/* Override body background for login page */
body.login-page {
    background-color: transparent !important;
    background: none !important;
}

/* Custom Container Widths - Centered and Responsive */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Navbar container - allow logo to move left */
.navbar .container,
#mainNavbar .container,
.navbar > .container {
    padding-left: 0 !important;
    padding-right: 1.5rem !important;
    overflow: visible !important;
}

@media (min-width: 992px) {
    .navbar .container,
    #mainNavbar .container,
    .navbar > .container {
        padding-left: 0 !important;
        padding-right: 1.5rem !important;
    }
}

@media (min-width: 1400px) {
    .navbar .container,
    #mainNavbar .container,
    .navbar > .container {
        padding-left: 0 !important;
        padding-right: 2rem !important;
    }
}

/* Large screens - slightly wider but still centered */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Medium screens - Tablet */
@media (min-width: 768px) and (max-width: 1199px) {
    .container {
        max-width: 100%;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Small screens - Mobile */
@media (max-width: 767px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
        max-width: 100%;
    }
}

/* Extra small screens - Small Mobile */
@media (max-width: 576px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
}

/* Navbar - Modern Sticky Design */
.navbar {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
}

.navbar-brand,
#mainNavbar .navbar-brand,
.navbar .navbar-brand,
a.navbar-brand {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    position: relative !important;
    left: -2rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 1rem !important;
}

@media (min-width: 992px) {
    .navbar-brand,
    #mainNavbar .navbar-brand,
    .navbar .navbar-brand,
    a.navbar-brand {
        left: -4rem !important;
    }
}

@media (min-width: 1400px) {
    .navbar-brand,
    #mainNavbar .navbar-brand,
    .navbar .navbar-brand,
    a.navbar-brand {
        left: -5rem !important;
    }
}

.navbar-nav {
    margin-left: -1.5rem !important;
    padding-left: 0 !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark) !important;
    padding: 0.5rem 0.75rem !important;
    margin: 0 0.15rem !important;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

.navbar-nav .nav-link i {
    margin-right: 0.5rem !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.navbar-nav .nav-link span {
    display: inline-block !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

/* Ensure nav-link text and icon stay in one row */
.navbar-nav .nav-link > * {
    display: inline-block !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

/* Malay language specific - smaller navigation font and ensure horizontal layout */
body.lang-ms .navbar-nav,
.navbar.lang-ms .navbar-nav {
    margin-left: -2rem !important;
    padding-left: 0 !important;
}

body.lang-ms .navbar-nav .nav-link,
body.lang-ms #navbarNav .nav-link,
.navbar.lang-ms .navbar-nav .nav-link {
    font-size: 0.85rem !important;
    padding: 0.5rem 0.6rem !important;
    margin: 0 0.1rem !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

body.lang-ms .navbar-nav .nav-link i,
.navbar.lang-ms .navbar-nav .nav-link i {
    display: inline-block !important;
    margin-right: 0.5rem !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
}

body.lang-ms .navbar-nav .nav-link span,
.navbar.lang-ms .navbar-nav .nav-link span {
    display: inline-block !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::before {
    width: 80%;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-blue) !important;
    background: rgba(79, 163, 247, 0.1);
}

/* Navbar Search Bar */
.navbar-search-form {
    position: relative;
}

.navbar-search-input {
    border: 2px solid #e9ecef;
    border-radius: 25px 0 0 25px !important;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: var(--transition);
    min-width: 200px;
}

.navbar-search-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(79, 163, 247, 0.15);
    outline: none;
}

.navbar-search-btn {
    border-radius: 0 25px 25px 0 !important;
    padding: 0.5rem 1rem;
    border-left: none;
    transition: var(--transition);
}

.navbar-search-btn:hover {
    background: var(--primary-blue-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 163, 247, 0.4);
}

.input-group .navbar-search-input + .navbar-search-btn {
    border-left: none;
}

/* Mobile Responsive for Navbar Search */
@media (max-width: 991px) {
    .navbar-search-form {
        width: 100%;
        margin: 0.5rem 0;
        order: 1;
    }
    
    .navbar-search-form .input-group {
        min-width: 100%;
        max-width: 100%;
    }
    
    .navbar-search-input {
        min-width: auto;
        width: 100%;
    }
    
    .d-flex.align-items-center.gap-2.ms-auto.flex-wrap,
    .navbar-right-section {
        flex-direction: column;
        width: 100%;
        align-items: stretch !important;
    }
}

@media (max-width: 768px) {
    .navbar-search-form {
        margin-bottom: 0.5rem;
    }
    
    .navbar-search-input {
        font-size: 0.85rem;
        padding: 0.45rem 0.85rem;
    }
    
    .navbar-search-btn {
        padding: 0.45rem 0.85rem;
    }
}

/* Language and Navigation Responsive Fixes */
@media (max-width: 1400px) {
    .navbar-nav .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 0.8rem !important;
    }
    
    /* Malay language specific - smaller font */
    body.lang-ms .navbar-nav .nav-link,
    body.lang-ms #navbarNav .nav-link,
    .navbar.lang-ms .navbar-nav .nav-link {
        font-size: 0.8rem !important;
    }
    
    .navbar-search-form .input-group {
        min-width: 200px;
        max-width: 380px;
    }
    
    .d-flex.align-items-center.gap-2.ms-auto.flex-wrap {
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
    }
    
    #languageDropdown {
        font-size: 0.85rem;
        padding: 0.4rem 0.7rem;
        flex-shrink: 0;
    }
    
    #languageDropdown span {
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
        display: inline-block;
        white-space: nowrap;
    }
    
    #navbarStateDropdownDesktop {
        min-width: 100px;
        max-width: 150px;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
    
    #navbarStateDropdownDesktop span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
        max-width: 120px;
    }
    
    .navbar-search-input {
        flex: 1 1 auto;
        min-width: 150px;
    }
}

@media (max-width: 1200px) {
    .navbar-nav .nav-link {
        font-size: 0.85rem;
        padding: 0.5rem 0.7rem !important;
    }
    
    .navbar-search-form .input-group {
        min-width: 180px;
        max-width: 340px;
    }
    
    #languageDropdown {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }
    
    #languageDropdown span {
        max-width: 90px;
    }
    
    #navbarStateDropdownDesktop {
        min-width: 90px;
        max-width: 140px;
        font-size: 0.8rem;
    }
    
    #navbarStateDropdownDesktop span {
        max-width: 110px;
    }
}

@media (max-width: 992px) {
    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        width: 100%;
        text-align: left;
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem;
    }
    
    /* Malay language specific - smaller font */
    body.lang-ms .navbar-nav .nav-link,
    body.lang-ms #navbarNav .nav-link,
    .navbar.lang-ms .navbar-nav .nav-link {
        font-size: 0.8rem !important;
    }
    
    .right-actions-inline {
        width: auto !important;
        min-width: fit-content !important;
        justify-content: flex-start !important;
        margin-top: 0.5rem;
        flex-wrap: nowrap !important;
        display: flex !important;
        flex-direction: row !important;
    }
    
    /* Override for Malay version to prevent wrapping */
    body.lang-ms .right-actions-inline,
    .navbar.lang-ms .right-actions-inline {
        width: auto !important;
        min-width: fit-content !important;
        flex-wrap: nowrap !important;
    }
    
    /* Ensure order: Language → Love → Notifications → Profile */
    .right-actions-inline {
        display: flex !important;
        flex-direction: row !important;
    }
    
    /* Language Switcher - first dropdown */
    .right-actions-inline > .dropdown:first-child {
        order: 1 !important;
    }
    
    /* Love Icon - button with specific ID */
    .right-actions-inline > button#navbarCollectionsBtn {
        order: 2 !important;
    }
    
    /* Notifications Bell - dropdown containing #notificationDropdown */
    .right-actions-inline > .dropdown:has(button#notificationDropdown),
    .right-actions-inline > .dropdown:nth-child(3) {
        order: 3 !important;
    }
    
    /* Profile Dropdown - dropdown containing #profileDropdown */
    .right-actions-inline > .dropdown:has(button#profileDropdown),
    .right-actions-inline > .dropdown:last-child {
        order: 4 !important;
    }
    
    .navbar-search-form {
        order: -1;
        margin-bottom: 0.5rem;
    }
    
    #languageDropdown {
        font-size: 0.85rem;
    }
    
    #languageDropdown span {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .navbar-nav .nav-link {
        font-size: 0.85rem;
    }
    
    /* Malay language specific - smaller font */
    body.lang-ms .navbar-nav .nav-link,
    body.lang-ms #navbarNav .nav-link,
    .navbar.lang-ms .navbar-nav .nav-link {
        font-size: 0.75rem !important;
    }
    
    #languageDropdown {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }
    
    .navbar-search-form .input-group {
        min-width: 100%;
        max-width: 100%;
    }
    
    #navbarStateDropdownDesktop {
        min-width: 80px;
        max-width: 120px;
        font-size: 0.75rem;
    }
    
    #navbarStateDropdownDesktop span {
        max-width: 90px;
    }
    
    .right-actions-inline {
        gap: 0.5rem !important;
    }
}

/* Fix for long language names */
#languageDropdown {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#languageDropdown .d-xl-none.d-md-inline {
    display: inline-block;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

@media (min-width: 1200px) {
    #languageDropdown .d-xl-none.d-md-inline {
        display: none !important;
    }
}

/* Fix for State dropdown text overflow */
#navbarStateDropdownDesktop,
#navbarStateDropdownMobile {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#navbarStateDropdownDesktop span,
#navbarStateDropdownMobile span {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Ensure State dropdown has enough space for longer text like "Negeri" */
#navbarStateDropdownDesktop {
    flex-shrink: 0;
}

#navbarStateDropdownDesktop span.d-none.d-md-inline {
    min-width: 60px;
}

/* Navbar right section - prevent wrapping and ensure proper spacing */
.navbar-right-section {
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
}

.navbar-right-section > * {
    flex-shrink: 0;
}

.navbar-right-section .navbar-search-form {
    flex: 0 1 auto;
    min-width: 0;
}

.navbar-right-section .right-actions-inline,
body.lang-ms .navbar-right-section .right-actions-inline,
.navbar.lang-ms .navbar-right-section .right-actions-inline {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-wrap: nowrap !important;
    width: auto !important;
    min-width: fit-content !important;
}

/* Ensure Language Switcher and Profile icon order is consistent across all languages */
.right-actions-inline,
body.lang-ms .right-actions-inline,
.navbar.lang-ms .right-actions-inline {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 0 !important; /* Use margin instead of gap for better spacing control */
    width: auto !important;
    min-width: fit-content !important;
}

/* Order: Language → Love → Notifications → Profile */
.right-actions-inline > .dropdown:first-child {
    order: 1 !important; /* Language Switcher */
}

/* Spacing adjustments for right-actions-inline icons - Use larger margins for visible spacing */
.right-actions-inline > button#navbarCollectionsBtn {
    order: 2 !important; /* Love Icon */
    margin-right: 1.5rem !important; /* Add spacing between Love Icon and Notifications Bell */
}

.right-actions-inline > .dropdown:nth-of-type(2) {
    order: 3 !important; /* Notifications Bell (2nd dropdown) */
    margin-right: 1.5rem !important; /* Add spacing between Notifications Bell and Profile */
}

.right-actions-inline > .dropdown:nth-of-type(3) {
    order: 4 !important; /* Profile Dropdown (3rd dropdown) */
    margin-right: 2rem !important; /* Add space to the right of profile icon */
}

/* Override Bootstrap gap-2 to use margin-based spacing instead */
.right-actions-inline.gap-2 {
    gap: 0 !important; /* Remove default gap, use margin instead */
}

/* Notification Bell Red Dot Indicator - Ensure button allows overflow */
#notificationDropdown,
#mobileNotificationDropdown {
    overflow: visible !important;
}

/* Disable hover circle effect for notification buttons */
#notificationDropdown::before,
#mobileNotificationDropdown::before {
    display: none !important;
    content: none !important;
}

#notificationDropdown:hover::before,
#mobileNotificationDropdown:hover::before {
    display: none !important;
    content: none !important;
}

/* Notification Bell Red Dot Indicator */
.notification-red-dot,
#notificationDropdown .notification-red-dot,
#mobileNotificationDropdown .notification-red-dot,
#notificationDropdown .badge.rounded-circle.bg-danger,
#mobileNotificationDropdown .badge.rounded-circle.bg-danger {
    position: absolute !important;
    top: 2px !important;
    right: 2px !important;
    width: 10px !important;
    height: 10px !important;
    padding: 0 !important;
    border: 2px solid white !important;
    min-width: 10px !important;
    z-index: 1000 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: #dc3545 !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
}

/* Remove hover effect for red dot */
.notification-red-dot:hover::before,
#notificationDropdown .notification-red-dot:hover::before,
#mobileNotificationDropdown .notification-red-dot:hover::before {
    display: none !important;
    content: none !important;
    box-shadow: none !important;
}

/* Mobile-specific red dot positioning - closer to bell icon */
@media (max-width: 991px) {
    #mobileNotificationDropdown .notification-red-dot,
    #mobileNotificationDropdown .mobile-notification-dot,
    #mobileNotificationDropdown .badge.rounded-circle.bg-danger {
        top: 0 !important;
        right: 0 !important;
        transform: translate(25%, -25%) !important;
    }
}

/* Notification Dropdown Internal Scroll */
.notification-scroll-container {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Language Tab Navigation for School Forms */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 1rem;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-blue);
    border-bottom-color: rgba(79, 163, 247, 0.3);
}

.nav-tabs .nav-link.active {
    color: var(--primary-blue);
    background-color: transparent;
    border-bottom-color: var(--primary-blue);
    font-weight: 600;
}

.tab-content {
    padding-top: 1rem;
}

/* Custom scrollbar styling for notification dropdown */
.notification-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.notification-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.notification-scroll-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.notification-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Firefox scrollbar styling */
.notification-scroll-container {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

@media (min-width: 992px) {
    .navbar-right-section {
        flex: 1 1 auto;
        flex-wrap: nowrap !important;
    }
    
    .navbar-right-section .navbar-search-form {
        flex: 0 1 320px;
        max-width: 400px;
    }
    
    .navbar-right-section .right-actions-inline {
        margin-left: auto;
    }

    /* Desktop: use gap (not trailing margins) so actions can sit flush right */
    #mainNavbar .navbar-right-section .right-actions-inline,
    body.lang-ms #mainNavbar .navbar-right-section .right-actions-inline,
    .navbar.lang-ms #mainNavbar .navbar-right-section .right-actions-inline {
        gap: 0.75rem !important;
    }

    #mainNavbar .navbar-right-section .right-actions-inline.gap-2 {
        gap: 0.75rem !important;
    }

    #mainNavbar .navbar-right-section .right-actions-inline > button#navbarCollectionsBtn,
    #mainNavbar .navbar-right-section .right-actions-inline > .dropdown:nth-of-type(2),
    #mainNavbar .navbar-right-section .right-actions-inline > .dropdown:nth-of-type(3),
    #mainNavbar .navbar-right-section .right-actions-inline > :last-child {
        margin-right: 0 !important;
    }
    
    .navbar-search-form .input-group {
        flex-wrap: nowrap;
    }
}

/* Buttons - Modern Design */
.btn {
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(79, 163, 247, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 163, 247, 0.5);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--primary-yellow), var(--primary-yellow-dark));
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(255, 217, 102, 0.4);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 217, 102, 0.5);
    color: var(--text-dark);
}

.btn-outline-primary {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

/* Hero Section - Modern Animated */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, var(--primary-blue) 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    color: white;
    padding: 160px 0 60px;
    padding-top: 160px;
    position: relative;
    overflow: hidden;
    min-height: 450px;
    display: flex;
    align-items: center;
    margin-top: 0;
}

/* Hero with background image - Modern Design */
.hero-section.hero-with-image {
    animation: none;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Ensure overlay works properly with image */
.hero-section.hero-with-image::before {
    background: none; /* Remove grid pattern when image is present */
}

/* Hero with gradient (fallback) - uses default hero-section styles */

/* Page Hero Sections - Redesigned for Visibility */
.about-hero-section,
.contact-hero-section,
.directory-header-section {
    position: relative;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin-top: 80px;
    min-height: 250px;
    display: flex;
    align-items: center;
    padding: 60px 0 !important;
    overflow: hidden;
    background: linear-gradient(135deg, #4FA3F7 0%, #764ba2 100%);
}

/* Dark overlay for text readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
}

/* Text container with backdrop */
.hero-text-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 40px 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.5);
    display: inline-block;
    max-width: 90%;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-text-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.6);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero title styling */
.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a2332 !important;
    margin: 0 0 15px 0 !important;
    line-height: 1.3;
    text-shadow: none !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 2 !important;
    letter-spacing: -0.02em;
}

/* Hero subtitle styling */
.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    color: #4a5568 !important;
    margin: 0 !important;
    line-height: 1.7;
    text-shadow: none !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 2 !important;
}

.directory-header-section .hero-text-container {
    padding: 30px 50px;
}

.directory-header-section .hero-title {
    font-size: 2rem;
    margin: 0 !important;
}

.directory-header-section .hero-title i {
    color: #4FA3F7;
    margin-right: 10px;
}

/* Login & Register Page Wrapper */
.login-page-wrapper,
.register-page-wrapper {
    position: relative;
    min-height: 100vh;
    padding: 40px 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    width: 100%;
    background-attachment: fixed !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-clip: border-box !important;
    background-origin: border-box !important;
}

/* Ensure body background covers entire page on login */
body.login-page {
    background-attachment: fixed !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Ensure body background is transparent on login page to prevent white gap */
body.login-page,
body:has(.login-page-wrapper) {
    background-color: transparent !important;
    background: none !important;
    margin: 0;
    padding: 0;
}

.login-page-wrapper .card,
.register-page-wrapper .card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Legacy support - keep old selector working */
.hero-section[style*="background-image"] {
    animation: none;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: fadeInUp 1s ease;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-section .lead {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s backwards;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Box - Modern Card Design */
.search-box {
    background: var(--bg-white);
    padding: 25px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    margin-top: 20px;
    position: relative;
    z-index: 10;
    animation: fadeInUp 1s ease 0.4s backwards;
    backdrop-filter: blur(10px);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Search Row - State + Search Bar */
.search-row {
    margin-bottom: 1rem;
}

.state-dropdown-wrapper {
    min-width: 180px;
    max-width: 220px;
}

.state-select {
    border-radius: 50px 0 0 50px !important;
    border: 2px solid #e9ecef;
    border-right: none;
    padding: 0.7rem 1.25rem;
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: #f8f9fa;
    font-weight: 500;
}

.state-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(79, 163, 247, 0.15);
    background-color: white;
    outline: none;
}

.search-input-wrapper {
    flex-grow: 1;
}

.search-input-wrapper .form-control {
    border-radius: 0 50px 50px 0 !important;
    border: 2px solid #e9ecef;
    border-left: 1px solid #e9ecef;
    padding: 0.7rem 1.25rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-input-wrapper .form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(79, 163, 247, 0.15);
    outline: none;
}

.search-box .form-control,
.search-box .form-select {
    border: 2px solid #e9ecef;
    border-radius: 50px;
    padding: 0.7rem 1.25rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-box .form-control:focus,
.search-box .form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(79, 163, 247, 0.15);
    transform: translateY(-2px);
}

/* School Cards - Modern Card Design */
.school-card {
    background: var(--bg-white);
    border: none;
    border-radius: var(--border-radius);
    padding: 0;
    margin-bottom: 30px;
    transition: var(--transition);
    height: 100%;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    position: relative;
    display: flex;
    flex-direction: column;
}

.school-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-yellow));
    transform: scaleX(0);
    transition: var(--transition);
    z-index: 2;
}

.school-card:hover::before {
    transform: scaleX(1);
}

.school-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* School Card Image */
.school-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
}

.school-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.school-card:hover .school-card-image img {
    transform: scale(1.1);
}

.school-card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.school-card-badge .badge {
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* School Level Badge - Bottom Left Position (for all containers) */
.school-level-badge-bottom {
    position: absolute !important;
    bottom: 15px !important;
    left: 15px !important;
    top: auto !important;
    z-index: 1;
}

/* School Level Badge - Light Grey Background with White Text */
.school-level-badge-bottom .badge,
.school-level-badge,
.badge.school-level-badge,
.school-card-badge .badge.school-level-badge,
.school-card-badge.school-level-badge-bottom .badge,
.school-card-badge.school-level-badge-bottom .badge.school-level-badge,
.school-card .school-card-badge.school-level-badge-bottom .badge,
.school-card .school-card-badge.school-level-badge-bottom .badge.school-level-badge {
    background-color: #9ca3af !important;
    background: #9ca3af !important;
    background-image: none !important;
    color: white !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    padding: 0.5rem 1rem !important;
    font-weight: 500 !important;
    border: none !important;
    border-radius: 20px !important;
    text-decoration: none !important;
}

/* Additional override for any Bootstrap classes */
.school-card-badge.school-level-badge-bottom span.badge,
.school-card-badge.school-level-badge-bottom .badge.school-level-badge {
    background-color: #9ca3af !important;
    background: #9ca3af !important;
    background-image: none !important;
    color: white !important;
    color: #ffffff !important;
}

/* School detail page - ensure school level badge uses same style */
.page-title + div .badge.school-level-badge,
.d-flex.align-items-center .badge.school-level-badge {
    background-color: #9ca3af !important;
    background: #9ca3af !important;
    background-image: none !important;
    color: white !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    border-radius: 20px !important;
    padding: 0.4rem 0.75rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

/* School detail page - ensure special label uses same style */
.page-title + div .badge.special-label-award,
.d-flex.align-items-center .badge.special-label-award {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4), 0 1px 4px rgba(0, 0, 0, 0.2) !important;
    padding: 0.4rem 0.75rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

/* Special Label Badge - Award Style (Blue Rounded Rectangle) */
.special-label-wrapper {
    max-width: calc(100% - 4rem);
    z-index: 10;
}

.special-label-award {
    display: inline-flex;
    align-items: center;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    line-height: 1.3;
    padding: 0.4rem 0.75rem !important;
    font-size: 0.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4), 0 1px 4px rgba(0, 0, 0, 0.2);
    text-align: left;
    cursor: help;
    transition: all 0.2s ease;
}

.special-label-award i {
    color: white;
    font-size: 0.75rem;
    margin-right: 0.35rem !important;
}

.special-label-text {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    color: white;
}

/* For horizontal containers - allow badge to expand downward */
.school-container-horizontal .special-label-wrapper {
    max-width: calc(100% - 4rem);
}

.school-container-horizontal .special-label-award {
    max-width: 280px;
    min-width: auto;
}

/* Responsive - smaller max-width on mobile */
@media (max-width: 768px) {
    .special-label-wrapper {
        max-width: calc(100% - 3rem);
    }
    
    .school-container-horizontal .special-label-award {
        max-width: 200px;
        font-size: 0.7rem;
        padding: 0.35rem 0.65rem !important;
    }
    
    .special-label-award i {
        font-size: 0.7rem;
    }
}

/* Hover effect - show full text on hover */
.special-label-award:hover {
    z-index: 100;
    position: relative;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
    transition: all 0.2s ease;
}

/* Collection Button - Homepage Style (Top Right of Photo) */
/* Collection Icon - Yellow Background with Dark Grey Heart */
.school-container-card .school-card-heart-btn.school-collection-btn,
.school-container-horizontal .school-card-heart-btn.school-collection-btn,
.school-card-heart-btn.school-collection-btn {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: #ffd700 !important; /* Vibrant yellow */
    border: none !important;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4), 
                0 0 20px rgba(255, 215, 0, 0.3), 
                inset 0 0 10px rgba(255, 235, 59, 0.2) !important; /* Subtle yellow glow/halo */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 0 !important;
}

.school-container-card .school-card-heart-btn.school-collection-btn i,
.school-container-horizontal .school-card-heart-btn.school-collection-btn i,
.school-card-heart-btn.school-collection-btn i {
    font-size: 1.1rem !important;
    color: #4a4a4a !important; /* Dark grey/almost black heart */
    transition: all 0.3s ease !important;
}

.school-container-card .school-card-heart-btn.school-collection-btn:hover,
.school-container-horizontal .school-card-heart-btn.school-collection-btn:hover,
.school-card-heart-btn.school-collection-btn:hover {
    background: #ffed4e !important; /* Lighter yellow on hover */
    transform: scale(1.15) !important;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.6), 
                0 0 30px rgba(255, 215, 0, 0.4),
                inset 0 0 15px rgba(255, 235, 59, 0.3) !important;
}

.school-container-card .school-card-heart-btn.school-collection-btn:hover i,
.school-container-horizontal .school-card-heart-btn.school-collection-btn:hover i,
.school-card-heart-btn.school-collection-btn:hover i {
    color: #2c2c2c !important; /* Darker grey on hover */
}

.school-container-card .school-card-heart-btn.school-collection-btn:active,
.school-container-horizontal .school-card-heart-btn.school-collection-btn:active,
.school-card-heart-btn.school-collection-btn:active {
    transform: scale(0.95) !important;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4), 
                0 0 15px rgba(255, 215, 0, 0.3),
                inset 0 0 8px rgba(255, 235, 59, 0.2) !important;
}

/* Active state - when school is in collection */
.school-container-card .school-card-heart-btn.school-collection-btn.active,
.school-container-horizontal .school-card-heart-btn.school-collection-btn.active,
.school-card-heart-btn.school-collection-btn.active {
    background: #ffd700 !important;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5), 
                0 0 20px rgba(255, 215, 0, 0.4),
                inset 0 0 10px rgba(255, 235, 59, 0.25) !important;
}

.school-container-card .school-card-heart-btn.school-collection-btn.active i,
.school-container-horizontal .school-card-heart-btn.school-collection-btn.active i,
.school-card-heart-btn.school-collection-btn.active i {
    color: #dc3545 !important; /* Red when active (in collection) */
}

/* Collection button animation feedback */
.school-card-heart-btn.school-collection-btn.adding,
.school-card-heart-btn.school-collection-btn.removing {
    animation: collectionPulse 0.6s ease;
}

@keyframes collectionPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

/* Toast Notification Styles */
.collection-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    max-width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: toastSlideIn 0.3s ease;
    border-left: 4px solid;
}

.collection-toast.success {
    border-left-color: #28a745;
}

.collection-toast.error {
    border-left-color: #dc3545;
}

.collection-toast.success .toast-icon {
    color: #28a745;
    font-size: 1.25rem;
}

.collection-toast.error .toast-icon {
    color: #dc3545;
    font-size: 1.25rem;
}

.collection-toast .toast-message {
    flex: 1;
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Dollar Sign Input Component */
.dollar-sign-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.5rem;
    background-color: #fff;
    transition: all 0.3s ease;
}

.dollar-sign-input-wrapper:focus-within {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(79, 163, 247, 0.15);
}

.dollar-sign-display {
    flex: 1;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-blue);
    min-width: 120px;
    padding: 0.5rem;
    user-select: none;
}

.dollar-sign-display.free {
    color: #28a745;
}

.dollar-sign-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
    color: #495057;
    user-select: none;
}

.dollar-sign-btn:hover:not(:disabled) {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.dollar-sign-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.dollar-sign-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dollar-sign-input-hidden {
    display: none;
}

/* School Featured Image (Detail Page) */
.school-featured-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    width: 100%;
    display: block;
}

.school-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: none;
}

.school-card .card-body {
    padding: 20px;
}

.school-card h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    line-height: 1.4;
}

.school-card .badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: white;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(79, 163, 247, 0.3);
}

.school-card .text-muted {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.school-card .text-muted i {
    color: var(--primary-blue);
    margin-right: 0.5rem;
}

.school-card .btn {
    margin-top: auto;
    width: 100%;
}

/* Featured Section */
.featured-section {
    padding: 60px 0;
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 100%);
    position: relative;
}

/* School Rating Display - Modern Design */
.school-rating-display {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(79, 163, 247, 0.08), rgba(255, 217, 102, 0.08));
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.school-rating-score .rating-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1;
    text-shadow: 0 2px 4px rgba(79, 163, 247, 0.15);
    display: inline-block !important;
}

.school-rating-stars {
    line-height: 1;
    display: inline-flex !important;
    align-items: center !important;
}

.school-rating-stars i {
    font-size: 1rem;
    margin: 0 1px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    display: inline-block !important;
    visibility: visible !important;
}

.school-rating-display .text-muted {
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block !important;
}

.featured-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.featured-section h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-yellow));
    border-radius: 2px;
}

/* Page Title */
.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    position: relative;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-yellow));
    border-radius: 2px;
}

/* Forms - Modern Design */
.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-white);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(79, 163, 247, 0.15);
    background: var(--bg-white);
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Cards - Modern Design */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: white;
    border: none;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

/* Map Container - Not used anymore, but kept for compatibility */
.map-container {
    height: 600px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin: 20px 0;
}

/* Leaflet Map Styling - Interactive map with proper sizing */
#interactiveMap {
    width: 100% !important;
    height: 450px !important;
    position: relative;
    z-index: 1;
}

#interactiveMap .leaflet-container {
    width: 100% !important;
    height: 450px !important;
    background-color: #f4f4f4;
}

/* Ensure map container is visible */
#mapContainer {
    width: 100%;
}

#mapPreview {
    width: 100%;
}

/* Map loading overlay */
#mapLoading {
    pointer-events: none;
}

/* Fix for Leaflet attribution */
.leaflet-control-attribution {
    font-size: 10px !important;
    background: rgba(255, 255, 255, 0.8) !important;
}

/* Location Card Styling */
.location-card-icon {
    font-size: 4rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

/* Alert Messages */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* Footer - Modern Design with Better Contrast */
.footer-modern {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    color: #ffffff !important;
    padding: 3rem 0 1.5rem !important;
    margin-top: 4rem;
    border-top: 3px solid var(--primary-blue);
}

/* Remove margin-top for footer inside login-page-wrapper to eliminate white gap */
.login-page-wrapper .footer-modern {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Ensure login-page-wrapper extends to cover footer and eliminate gaps */
.login-page-wrapper {
    padding-bottom: 0 !important;
    min-height: 100vh;
}

/* Ensure no gaps between content and footer in login page */
.login-page-wrapper .page-content {
    margin-bottom: 0 !important;
}

.login-page-wrapper .container {
    margin-bottom: 0 !important;
}

/* Remove bottom margin from my-5 class in login wrapper */
.login-page-wrapper .container.my-5 {
    margin-bottom: 0 !important;
}

/* Ensure wrapper extends fully to cover footer */
.login-page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Ensure body background is transparent on login page */
body.login-page {
    background-color: transparent !important;
    background: none !important;
}

/* Make sure wrapper background covers everything including footer - remove duplicate */

.footer-modern .footer-brand {
    color: #ffffff !important;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-modern .footer-description {
    color: rgba(255, 255, 255, 0.9) !important;
    line-height: 1.7;
    margin-bottom: 0;
}

.footer-modern .footer-heading {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-modern .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-modern .footer-links li {
    margin-bottom: 0.75rem;
}

.footer-modern .footer-links a {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    font-weight: 400;
}

.footer-modern .footer-links a:hover {
    color: var(--primary-yellow) !important;
    transform: translateX(5px);
    padding-left: 5px;
}

.footer-modern .footer-text {
    color: rgba(255, 255, 255, 0.85) !important;
    margin-bottom: 0;
    line-height: 1.7;
}

.footer-modern .footer-divider {
    border-color: rgba(255, 255, 255, 0.2) !important;
    margin: 2rem 0 1.5rem;
}

.footer-modern .footer-copyright {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.9rem;
}

/* Loading Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-border {
    animation: spin 0.75s linear infinite;
}

/* Responsive Design - Tablet (768px - 992px) */
@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 2.25rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .search-box {
        padding: 20px 18px;
        margin-top: 15px;
    }
    
    .featured-section {
        padding: 50px 0;
    }
    
    .featured-section h2 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    /* School details - stack columns on tablet */
    .school-details-layout .col-xl-8,
    .school-details-layout .col-xl-4 {
        margin-bottom: 2rem;
    }
    
    /* Map container - slightly smaller on tablet */
    .map-container {
        height: 400px;
    }
}

/* Responsive Design - Mobile (up to 768px) */
@media (max-width: 768px) {
    .hero-section {
        padding: 110px 0 36px;
        min-height: auto;
    }
    
    /* Mobile: Disable fixed background attachment for better performance */
    .hero-section.hero-with-image {
        background-attachment: scroll !important;
    }
    
    /* Mobile: Page hero sections */
    .about-hero-section,
    .contact-hero-section,
    .directory-header-section {
        margin-top: 60px;
        border-radius: 0 0 20px 20px;
        padding: 40px 15px !important;
        min-height: 200px;
    }
    
    .hero-text-container {
        padding: 30px 25px !important;
        max-width: 100% !important;
        border-radius: 15px !important;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2) !important;
    }
    
    .hero-title {
        font-size: 1.75rem !important;
        margin-bottom: 10px !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    .directory-header-section .hero-title {
        font-size: 1.5rem !important;
    }
    
    .login-page-wrapper,
    .register-page-wrapper {
        padding: 20px 0;
    }
    
    .hero-section h1 {
        font-size: 1.22rem;
        line-height: 1.18;
        margin-bottom: 0.3rem;
        letter-spacing: -0.01em;
        word-break: keep-all;
        white-space: normal;
        text-align: center;
    }
    
    .hero-section h1 br {
        display: none;
    }

    .hero-section h1 span.hero-line {
        display: block;
    }

    .hero-section .lead {
        font-size: 0.82rem;
        margin-bottom: 0.75rem;
        text-align: center;
    }
    
    .hero-section .container {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }
    
    .search-box {
        margin-top: 124px;
        padding: 14px 12px;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    }
    
    .state-dropdown-wrapper {
        flex: 0 0 28%;
        max-width: 28%;
        display: flex;
        min-width: 0;
        justify-content: stretch;
    }
    
    .search-input-wrapper {
        flex: 0 1 72%;
        max-width: 72%;
        display: flex;
        min-width: 0;
    }
    
    .state-dropdown-wrapper select,
    .search-input-wrapper input {
        width: 100%;
        min-width: 0;
    }

    .right-actions-inline {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 0.5rem;
        width: auto !important;
        min-width: fit-content !important;
    }
    
    /* Override for Malay version to prevent wrapping */
    body.lang-ms .right-actions-inline,
    .navbar.lang-ms .right-actions-inline {
        flex-wrap: nowrap !important;
        width: auto !important;
        min-width: fit-content !important;
    }

    .right-actions-inline .dropdown {
        flex-shrink: 0;
    }

    .right-actions-inline .btn-link {
        text-decoration: none !important;
        border: none !important;
        box-shadow: none !important;
    }

    .navbar-search-form-mobile .input-group {
        width: 100%;
        gap: 0.35rem;
    }

    .navbar-search-form-mobile .input-group > * {
        border-radius: 999px !important;
    }

    .navbar-search-form-mobile .input-group .btn-outline-secondary {
        min-width: 110px;
        border-top-right-radius: 12px !important;
        border-bottom-right-radius: 12px !important;
    }

    .navbar-search-form-mobile .input-group .btn-primary {
        padding: 0.6rem 1rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px !important;
        min-width: 48px;
    }

    .navbar-search-form-mobile .form-control {
        border-radius: 999px !important;
        padding: 0.6rem 0.85rem;
    }
    
    .search-row .d-flex {
        flex-direction: row;
        align-items: stretch;
        gap: 0.35rem;
        display: flex;
        flex-wrap: nowrap;
    }
    
    .state-select {
        border-radius: 999px !important;
        border-right: 2px solid #e9ecef !important;
        height: 32px;
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .search-input-wrapper .form-control {
        border-radius: 999px !important;
        border-left: 2px solid #e9ecef !important;
        height: 32px;
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .search-box .form-control,
    .search-box .form-select {
        padding: 0.4rem 0.6rem;
        font-size: 0.76rem;
    }
    
    .action-buttons-row .btn {
        width: auto;
        flex: 1 1 48%;
        padding: 0.3rem 0.45rem;
        font-size: 0.64rem;
        border-radius: 999px;
        min-height: 30px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        white-space: nowrap;
    }
    
    .action-buttons-row .d-flex {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap;
        gap: 0.35rem;
        align-items: stretch;
    }
    
    .action-buttons-row .d-flex.flex-column {
        flex-direction: row !important;
    }
    
    .action-buttons-row .btn i {
        font-size: 0.68rem;
        margin-right: 0.16rem;
    }

    .level-buttons-row .text-white.small {
        font-size: 0.64rem;
        letter-spacing: 0.05em;
    }

    .level-buttons-row .d-flex {
        flex-wrap: nowrap;
        gap: 0.28rem;
        justify-content: space-between;
        align-items: stretch;
    }

    .level-buttons-row .btn-level-filter {
        padding: 0.28rem 0.4rem;
        font-size: 0.68rem;
        border-radius: 999px;
        flex: 1 1 0;
        min-width: 0;
        text-align: center;
        min-height: 30px;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        white-space: nowrap;
        letter-spacing: 0.015em;
        gap: 0.2rem;
    }

    #chatbot-container {
        right: 12px;
        bottom: calc(80px + env(safe-area-inset-bottom, 0));
    }

    .chatbot-button {
        width: 70px;
        height: 70px;
        font-size: 30px;
        box-shadow: 0 8px 20px rgba(79, 163, 247, 0.35);
    }

    .chatbot-window {
        width: min(320px, 90vw);
        height: min(520px, 75vh);
        right: 0;
        bottom: 70px;
    }
    
    .school-card {
        margin-bottom: 20px;
    }
    
    /* Mobile: School Rating Display */
    .school-rating-display {
        text-align: center !important;
        padding: 0.6rem 0.8rem !important;
    }
    
    .school-rating-display .d-flex {
        justify-content: center !important;
        flex-wrap: wrap;
    }
    
    .school-rating-score .rating-number {
        font-size: 1.5rem !important;
    }
    
    .school-rating-stars i {
        font-size: 0.9rem !important;
    }
    
    .school-card-image {
        height: 200px;
    }
    
    .page-title {
        font-size: 1.75rem;
        padding-bottom: 0.75rem;
    }
    
    .featured-section {
        padding: 40px 0;
    }
    
    .featured-section h2 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
    
    /* School details - full width on mobile */
    .school-featured-image {
        margin-bottom: 1.5rem;
        border-radius: 8px;
    }
    
    .school-featured-image img {
        border-radius: 8px;
    }
    
    /* Map container - smaller on mobile */
    .map-container {
        height: 350px;
        border-radius: 8px;
    }
    
    /* Icon boxes smaller on mobile */
    .icon-box {
        width: 50px;
        height: 50px;
    }
    
    .icon-box i {
        font-size: 1.5rem !important;
    }
    
    /* Forms on mobile */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem 1rem;
    }
    
    /* Cards padding on mobile */
    .card-body {
        padding: 1.25rem !important;
    }
    
    /* Directory filters - stack on mobile */
    .directory-filters .col-lg-6,
    .directory-filters .col-lg-3 {
        margin-bottom: 1rem;
    }
    
    /* Navbar adjustments */
    .navbar-brand {
        font-size: 1.4rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
    }
    
    /* Footer on mobile - smaller */
    .footer-modern {
        padding: 1rem 0 0.75rem !important;
        margin-top: 2rem !important;
    }
    
    .footer-modern .footer-brand {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .footer-modern .footer-brand i {
        font-size: 0.85rem !important;
    }
    
    .footer-modern .footer-description {
        font-size: 0.7rem !important;
        line-height: 1.4;
    }
    
    .footer-modern .footer-heading {
        font-size: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .footer-modern .footer-links {
        font-size: 0.7rem !important;
        display: inline-block;
        text-align: left;
    }
    
    .footer-modern .footer-links li {
        margin-bottom: 0.35rem !important;
    }
    
    .footer-modern .footer-text {
        font-size: 0.7rem !important;
        line-height: 1.4;
    }
    
    .footer-modern .footer-divider {
        margin: 1rem 0 0.75rem !important;
    }
    
    .footer-modern .footer-copyright {
        font-size: 0.6rem !important;
    }
    
    .footer-modern .col-lg-4,
    .footer-modern .col-md-6 {
        margin-bottom: 1rem !important;
        text-align: center;
    }
    
    .footer-modern .col-md-12 {
        text-align: center;
    }
    
    /* Chatbot button - smaller */
    .chatbot-button {
        width: 48px !important;
        height: 48px !important;
        font-size: 20px !important;
    }
    
    /* Navbar mobile menu - smaller */
    .navbar-nav .nav-link {
        font-size: 0.7rem !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    .navbar-nav .nav-link i {
        font-size: 0.65rem !important;
    }
    
    /* Navbar search toggle button - smaller */
    .navbar .btn-outline-secondary[data-bs-toggle="collapse"] {
        font-size: 0.7rem !important;
        padding: 0.35rem 0.5rem !important;
        width: 36px !important;
        height: 36px !important;
    }
    
    .navbar .btn-outline-secondary[data-bs-toggle="collapse"] i {
        font-size: 0.7rem !important;
    }
    
    /* Mobile search bar - smaller */
    .navbar-search-form-mobile .form-control {
        font-size: 0.7rem !important;
        padding: 0.35rem 0.5rem !important;
    }
    
    .navbar-search-form-mobile .btn {
        font-size: 0.7rem !important;
        padding: 0.35rem 0.6rem !important;
    }
    
    .navbar-search-form-mobile .btn i {
        font-size: 0.65rem !important;
    }
    
    .navbar-search-form-mobile .dropdown-toggle {
        font-size: 0.7rem !important;
        padding: 0.35rem 0.5rem !important;
    }
    
    .navbar-search-form-mobile .dropdown-toggle i {
        font-size: 0.65rem !important;
    }
}

/* Responsive Design - Small Mobile (up to 576px) */
@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .hero-section .lead {
        font-size: 0.875rem;
    }
    
    .search-box {
        padding: 18px 14px;
        margin-top: 10px;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .school-card-image {
        height: 180px;
    }
    
    .map-container {
        height: 300px;
    }
    
    .btn-lg {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    /* Touch-friendly elements */
    .btn, .nav-link, .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Tablet Specific (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .school-card-image {
        height: 240px;
    }
    
    .map-container {
        height: 450px;
    }
    
    /* Two columns on tablet for school cards */
    .featured-section .col-xl-4 {
        flex: 0 0 auto;
        width: 50%;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices - larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 1rem !important;
    }
    
    /* Remove hover effects on touch devices */
    .school-card:hover {
        transform: none;
    }
    
    .btn:hover::before {
        width: 0;
        height: 0;
    }
}

/* Admin Panel Styles (Keep existing) */
.admin-sidebar {
    min-height: calc(100vh - 76px);
    background-color: var(--bg-light);
    padding: 20px 0;
}

.admin-content {
    padding: 30px;
}

.admin-sidebar .nav-link {
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
    transition: var(--transition);
    border-radius: 8px;
    margin: 0.25rem 1rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-sidebar .nav-item > ul {
    list-style: none;
    padding-left: 0;
    margin-top: 0.25rem;
}

.admin-sidebar .nav-item > ul .nav-link {
    padding-left: 2.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.admin-sidebar .nav-item > ul .nav-link:hover {
    background: rgba(79, 163, 247, 0.1);
    color: var(--primary-blue);
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: var(--shadow-md);
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease;
}

/* Smooth Transitions */
a, button, .btn, .card, .school-card {
    transition: var(--transition);
}

/* Page Content Spacing - For pages with fixed navbar (except home page) */
.page-content {
    padding-top: 140px;
    margin-top: 0 !important;
}

/* Reduce top spacing for login page */
.login-page-wrapper .page-content {
    padding-top: 60px !important;
}

/* Responsive adjustments for page-content spacing */
@media (max-width: 992px) {
    .page-content {
        padding-top: 130px;
    }
}

@media (max-width: 768px) {
    .page-content {
        padding-top: 120px;
    }
}

@media (max-width: 576px) {
    .page-content {
        padding-top: 110px;
    }
}

/* ============================================
   Chatbot - Fixed Position AI Assistant
   ============================================ */

#chatbot-container {
    position: fixed;
    bottom: 80px;
    right: 15px;
    z-index: 9999;
    font-family: 'Poppins', sans-serif;
}

/* Chatbot Toggle Button - Desktop Default */
.chatbot-button {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: white;
    border: none;
    box-shadow: 0 8px 25px rgba(79, 163, 247, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 28px;
    position: relative;
    z-index: 10000;
    overflow: visible;
    padding: 0;
    line-height: 1;
    box-sizing: border-box;
}

.chatbot-button i {
    font-size: 28px !important;
    line-height: 1 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(79, 163, 247, 0.6);
}

.chatbot-button:active {
    transform: scale(0.95);
}

.chatbot-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}

/* Chatbot Window */
.chatbot-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.chatbot-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: none;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1rem;
}

.chatbot-header-info i {
    font-size: 1.2rem;
}

.chatbot-header-actions {
    display: flex;
    gap: 0.5rem;
}

.chatbot-header-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.9rem;
}

.chatbot-header-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Chatbot Messages Container */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Chatbot Message */
.chatbot-message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-bot-message {
    flex-direction: row;
}

.chatbot-user-message {
    flex-direction: row-reverse;
}

.chatbot-message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.chatbot-bot-message .chatbot-message-avatar {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: white;
}

.chatbot-user-message .chatbot-message-avatar {
    background: linear-gradient(135deg, var(--primary-yellow), var(--primary-yellow-dark));
    color: var(--text-dark);
}

.chatbot-message-content {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.chatbot-bot-message .chatbot-message-content {
    background: white;
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chatbot-user-message .chatbot-message-content {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(79, 163, 247, 0.3);
}

.chatbot-message-content a {
    color: var(--primary-blue);
    text-decoration: underline;
    font-weight: 600;
}

.chatbot-user-message .chatbot-message-content a {
    color: white;
    text-decoration: underline;
}

.chatbot-typing-indicator {
    display: flex;
    gap: 5px;
    padding: 0.75rem 1rem;
}

.chatbot-typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-light);
    animation: typing 1.4s infinite;
}

.chatbot-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Chatbot Input Container */
.chatbot-input-container {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}

.chatbot-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(79, 163, 247, 0.15);
}

.chatbot-send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.chatbot-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(79, 163, 247, 0.4);
}

.chatbot-send-btn:active {
    transform: scale(0.95);
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Chatbot Minimized State */
.chatbot-window.minimized {
    height: 60px;
}

.chatbot-window.minimized .chatbot-messages,
.chatbot-window.minimized .chatbot-input-container {
    display: none;
}

/* Welcome Bubble - Shows on first visit */
.chatbot-welcome-bubble {
    position: absolute;
    bottom: 100px;
    right: 0;
    width: 280px;
    animation: bubbleSlideIn 0.5s ease-out;
    z-index: 10001;
}

@keyframes bubbleSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chatbot-welcome-bubble-content {
    background: white;
    border-radius: 18px;
    padding: 1rem 1.25rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.chatbot-welcome-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-size: 0.75rem;
    transition: var(--transition);
    padding: 0;
}

.chatbot-welcome-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.chatbot-welcome-bubble-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.chatbot-welcome-bubble-text {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-dark);
    padding-right: 20px;
    margin-top: 2px;
}

.chatbot-welcome-bubble-arrow {
    position: absolute;
    bottom: -12px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid white;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Fade out animation for welcome bubble */
.chatbot-welcome-bubble.fade-out {
    animation: bubbleFadeOut 0.5s ease-in forwards;
}

@keyframes bubbleFadeOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
        pointer-events: none;
    }
}

/* Desktop - Ensure chatbot button displays correctly */
@media (min-width: 993px) {
    .chatbot-button {
        width: 65px !important;
        height: 65px !important;
        font-size: 28px !important;
        padding: 0 !important;
        overflow: visible !important;
        line-height: 1 !important;
    }
    
    .chatbot-button i {
        font-size: 28px !important;
        line-height: 1 !important;
        display: inline-block !important;
        vertical-align: middle !important;
        width: auto !important;
        height: auto !important;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #chatbot-container {
        bottom: 80px;
        right: 15px;
    }
    
    .chatbot-button {
        width: 75px;
        height: 75px;
        font-size: 32px;
    }
    
    .chatbot-welcome-bubble {
        width: 260px;
        bottom: 85px;
        right: 0;
    }
    
    .chatbot-welcome-bubble-content {
        padding: 0.875rem 1rem;
    }
    
    .chatbot-welcome-bubble-text {
        font-size: 0.85rem;
        padding-right: 18px;
    }
    
    .chatbot-window {
        width: calc(100vw - 40px);
        max-width: 380px;
        height: calc(100vh - 140px);
        max-height: 600px;
        bottom: 90px;
        right: 0;
    }
}

@media (max-width: 576px) {
    #chatbot-container {
        bottom: 80px;
        right: 12px;
    }
    
    .chatbot-button {
        width: 70px;
        height: 70px;
        font-size: 30px;
    }
    
    .chatbot-window {
        width: calc(100vw - 30px);
        height: calc(100vh - 120px);
        max-height: 550px;
        border-radius: 15px;
    }
    
    .chatbot-header {
        padding: 0.875rem 1rem;
    }
    
    .chatbot-messages {
        padding: 1rem;
    }
    
    .chatbot-message-content {
        max-width: 80%;
        font-size: 0.85rem;
    }
    
    .chatbot-welcome-bubble {
        width: 240px;
        bottom: 80px;
    }
    
    .chatbot-welcome-bubble-content {
        padding: 0.75rem 0.875rem;
    }
    
    .chatbot-welcome-bubble-text {
        font-size: 0.8rem;
        padding-right: 16px;
    }
}

/* Mobile View: Login and Register Forms - Smaller Elements */
@media (max-width: 991.98px) {
    /* Login and Register Page Wrappers */
    .login-page-wrapper .card,
    .register-page-wrapper .card {
        margin: 1rem 0;
    }
    
    /* Target register_phone.php which uses .page-content directly */
    .page-content .card {
        margin: 1rem 0;
    }
    
    .login-page-wrapper .card-body,
    .register-page-wrapper .card-body,
    .page-content .card-body {
        padding: 1.5rem !important;
    }
    
    /* Titles */
    .login-page-wrapper h2,
    .register-page-wrapper h2,
    .page-content h2 {
        font-size: 1.5rem !important;
        margin-bottom: 1.25rem !important;
    }
    
    .login-page-wrapper h2 i,
    .register-page-wrapper h2 i,
    .page-content h2 i {
        font-size: 1.3rem !important;
    }
    
    .login-page-wrapper h4,
    .register-page-wrapper h4,
    .page-content h4 {
        font-size: 1.1rem !important;
    }
    
    /* Form Labels */
    .login-page-wrapper .form-label,
    .register-page-wrapper .form-label,
    .page-content .form-label {
        font-size: 0.85rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    /* Input Groups - Remove lg size */
    .login-page-wrapper .input-group-lg,
    .register-page-wrapper .input-group-lg,
    .page-content .input-group-lg {
        font-size: 0.9rem !important;
    }
    
    .login-page-wrapper .input-group-lg .form-select,
    .login-page-wrapper .input-group-lg .form-control,
    .register-page-wrapper .input-group-lg .form-select,
    .register-page-wrapper .input-group-lg .form-control,
    .page-content .input-group-lg .form-select,
    .page-content .input-group-lg .form-control {
        font-size: 0.9rem !important;
        padding: 0.5rem 0.75rem !important;
        height: auto !important;
    }
    
    /* Form Controls - Remove lg size */
    .login-page-wrapper .form-control-lg,
    .register-page-wrapper .form-control-lg,
    .page-content .form-control-lg {
        font-size: 0.9rem !important;
        padding: 0.5rem 0.75rem !important;
        height: auto !important;
    }
    
    /* Regular form controls (without lg) - for register.php */
    .login-page-wrapper .form-control:not(.form-control-lg),
    .register-page-wrapper .form-control:not(.form-control-lg),
    .page-content .form-control:not(.form-control-lg):not(.otp-digit) {
        font-size: 0.9rem !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    /* OTP Input */
    .login-page-wrapper .otp-digit,
    .register-page-wrapper .otp-digit,
    .page-content .otp-digit {
        font-size: 1.2rem !important;
        letter-spacing: 0.3rem !important;
        padding: 0.5rem !important;
    }
    
    /* Buttons - Remove lg size */
    .login-page-wrapper .btn-lg,
    .register-page-wrapper .btn-lg,
    .page-content .btn-lg {
        font-size: 0.85rem !important;
        padding: 0.5rem 1rem !important;
    }
    
    .login-page-wrapper .btn-lg i,
    .register-page-wrapper .btn-lg i,
    .page-content .btn-lg i {
        font-size: 0.8rem !important;
    }
    
    /* Form Check (Radio buttons) */
    .login-page-wrapper .form-check-label,
    .register-page-wrapper .form-check-label,
    .page-content .form-check-label {
        font-size: 0.85rem !important;
    }
    
    .login-page-wrapper .form-check-label i,
    .register-page-wrapper .form-check-label i,
    .page-content .form-check-label i {
        font-size: 0.75rem !important;
    }
    
    .login-page-wrapper .form-check-input,
    .register-page-wrapper .form-check-input,
    .page-content .form-check-input {
        width: 1rem !important;
        height: 1rem !important;
        margin-top: 0.15rem !important;
    }
    
    /* Small text and helper text */
    .login-page-wrapper small,
    .register-page-wrapper small,
    .page-content small {
        font-size: 0.75rem !important;
    }
    
    .login-page-wrapper .text-muted,
    .register-page-wrapper .text-muted,
    .page-content .text-muted {
        font-size: 0.8rem !important;
    }
    
    /* Links */
    .login-page-wrapper a,
    .register-page-wrapper a,
    .page-content a {
        font-size: 0.8rem !important;
    }
    
    .login-page-wrapper a i,
    .register-page-wrapper a i,
    .page-content a i {
        font-size: 0.75rem !important;
    }
    
    /* Alerts */
    .login-page-wrapper .alert,
    .register-page-wrapper .alert,
    .page-content .alert {
        font-size: 0.85rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    /* Icons in titles and sections */
    .login-page-wrapper .fa-3x,
    .register-page-wrapper .fa-3x,
    .page-content .fa-3x {
        font-size: 2rem !important;
    }
    
    /* Password requirements list */
    .login-page-wrapper ul,
    .register-page-wrapper ul,
    .page-content ul {
        font-size: 0.75rem !important;
        padding-left: 1.25rem !important;
    }
    
    /* Spacing adjustments */
    .login-page-wrapper .mb-3,
    .register-page-wrapper .mb-3,
    .page-content .mb-3 {
        margin-bottom: 1rem !important;
    }
    
    .login-page-wrapper .mb-4,
    .register-page-wrapper .mb-4,
    .page-content .mb-4 {
        margin-bottom: 1.25rem !important;
    }
    
    .login-page-wrapper .my-4,
    .register-page-wrapper .my-4,
    .page-content .my-4 {
        margin-top: 1.25rem !important;
        margin-bottom: 1.25rem !important;
    }
    
    .login-page-wrapper .my-5,
    .register-page-wrapper .my-5,
    .page-content .my-5 {
        margin-top: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Container padding */
    .login-page-wrapper .container,
    .register-page-wrapper .container,
    .page-content.container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    /* Country code select max-width */
    .login-page-wrapper .form-select[style*="max-width"],
    .register-page-wrapper .form-select[style*="max-width"],
    .page-content .form-select[style*="max-width"] {
        max-width: 150px !important;
    }
}

/* Mobile View: FAQ Section - Smaller Text */
@media (max-width: 991.98px) {
    /* FAQ Section Header */
    #faqSection .card-header h5 {
        font-size: 1.1rem !important;
    }
    
    #faqSection .card-header h5 i {
        font-size: 1rem !important;
    }
    
    /* FAQ Accordion Button */
    #faqSection .accordion-button {
        font-size: 0.85rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    /* FAQ Accordion Body */
    #faqSection .accordion-body {
        font-size: 0.8rem !important;
        padding: 0.75rem 1rem !important;
        line-height: 1.5 !important;
    }
}

/* Mobile View: Manage and Submit School Forms - Facilities, Highlights, Programmes - Two per row */
@media (max-width: 991.98px) {
    /* Force 2 columns for facilities, highlights, and programmes sections in mobile view */
    /* Target both col-6 and col-md-6.col-lg-4 to ensure compatibility */
    .row.g-2 > .col-6,
    .row.g-2 > .col-6.col-md-6.col-lg-4,
    .row.g-2 > .col-md-6.col-lg-4,
    form .row.g-2 > .col-6,
    form .row.g-2 > .col-6.col-md-6.col-lg-4,
    form .row.g-2 > .col-md-6.col-lg-4,
    .page-content form .row.g-2 > .col-6,
    .page-content form .row.g-2 > .col-6.col-md-6.col-lg-4,
    .page-content form .row.g-2 > .col-md-6.col-lg-4,
    .container form .row.g-2 > .col-6,
    .container form .row.g-2 > .col-6.col-md-6.col-lg-4,
    .container form .row.g-2 > .col-md-6.col-lg-4,
    .container.page-content form .row.g-2 > .col-6,
    .container.page-content form .row.g-2 > .col-6.col-md-6.col-lg-4,
    .container.page-content form .row.g-2 > .col-md-6.col-lg-4 {
        flex: 0 0 auto !important;
        width: 50% !important;
        max-width: 50% !important;
    }
    
    /* Specifically target facilities, highlights, and programmes sections - smaller text */
    .row.g-2 .form-check-label,
    form .row.g-2 .form-check-label {
        font-size: 0.85rem !important;
    }
    
    .row.g-2 .form-check-label i,
    form .row.g-2 .form-check-label i {
        font-size: 0.75rem !important;
    }
    
    .row.g-2 .form-check-input,
    form .row.g-2 .form-check-input {
        width: 0.9rem !important;
        height: 0.9rem !important;
        margin-top: 0.2rem !important;
    }
}

/* Mobile View: Manage School - Move Quick Info to top */
@media (max-width: 991.98px) {
    /* Target the main row containing form and quick info */
    .container.page-content > .row:first-child {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Quick Info column - move to top */
    .container.page-content > .row:first-child > .col-lg-4 {
        order: -1 !important;
        margin-bottom: 1.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    /* Form column - move to bottom */
    .container.page-content > .row:first-child > .col-lg-8 {
        order: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
}

@media (max-width: 576px) {
    .chatbot-window {
        width: 90vw;
        height: 70vh;
        right: 5vw;
    }
}

/* iPad Mini and iPad Air specific fixes (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .mobile-filter-bar {
        position: sticky;
        top: 65px;
        z-index: 1030;
        background: #ffffff;
        margin-top: -50px;
        padding: 0.5rem 0.5rem 0.6rem;
        display: flex !important;
        gap: 0.5rem;
        border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    }

    .mobile-filter-button {
        flex: 1;
        border-radius: 999px;
        border: 1px solid rgba(148, 163, 184, 0.45);
        background: #ffffff;
        font-size: 0.85rem;
        font-weight: 600;
        color: #475569;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        padding: 0.5rem 0.6rem;
    }

    .mobile-filter-button i {
        font-size: 0.9rem;
    }

    .mobile-filter-button.active {
        border-color: var(--primary-blue);
        color: var(--primary-blue);
        background: rgba(79, 163, 247, 0.12);
    }

    .mobile-filter-button .filter-indicator {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: var(--primary-blue);
        display: inline-block;
    }
    
    /* Fix homepage school level buttons shape on iPad Air */
    .level-buttons-row .d-flex {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 1rem !important;
    }
    
    .level-buttons-row .btn-level-filter {
        flex: 0 0 auto !important;
        min-width: auto !important;
        padding: 0.5rem 1.25rem !important;
        font-size: 0.9rem !important;
        border-radius: 999px !important;
        white-space: nowrap !important;
    }
    
    /* Fix back button position on school detail page */
    .page-content .row.align-items-center {
        justify-content: flex-start !important;
        text-align: left !important;
    }
    
    .page-content .row.align-items-center .col-auto {
        flex: 0 0 auto !important;
        width: auto !important;
        margin-right: auto !important;
        margin-left: 0 !important;
    }
    
    .page-content .back-link {
        justify-content: flex-start !important;
        text-align: left !important;
    }
    
    /* Fix chatbot UI on iPad Air */
    #chatbot-container {
        right: 15px !important;
        bottom: 80px !important;
    }
    
    .chatbot-button {
        width: 65px !important;
        height: 65px !important;
        font-size: 28px !important;
    }
    
    .chatbot-window {
        width: 380px !important;
        height: 550px !important;
        bottom: 85px !important;
        right: 0 !important;
    }
    
    /* Ensure school containers fill full width on iPad */
    .school-container-horizontal {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .school-container-card {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .school-list-horizontal {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 768px) {
    .mobile-filter-bar {
        position: sticky;
        top: 65px;
        z-index: 1030;
        background: #ffffff;
        margin-top: -50px;
        padding: 0.45rem 0.4rem 0.5rem;
        display: flex;
        gap: 0.5rem;
        border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    }

    .mobile-filter-button {
        flex: 1;
        border-radius: 999px;
        border: 1px solid rgba(148, 163, 184, 0.45);
        background: #ffffff;
        font-size: 0.82rem;
        font-weight: 600;
        color: #475569;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        padding: 0.45rem 0.5rem;
    }

    .mobile-filter-button i {
        font-size: 0.85rem;
    }

    .mobile-filter-button.active {
        border-color: var(--primary-blue);
        color: var(--primary-blue);
        background: rgba(79, 163, 247, 0.12);
    }

    .mobile-filter-button .filter-indicator {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: var(--primary-blue);
        display: inline-block;
    }

    .mobile-filter-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.25);
        z-index: 1040;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .mobile-filter-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-filter-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1050;
        background: #ffffff;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -18px 35px rgba(15, 23, 42, 0.2);
        max-height: 75vh;
        overflow-y: auto;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        transition: transform 0.25s ease;
    }

    .mobile-filter-panel.collapse {
        display: block;
        height: auto !important;
        transform: translateY(100%);
    }

    .mobile-filter-panel.collapse.show {
        transform: translateY(0);
    }

    .mobile-filter-panel.collapsing {
        height: auto !important;
        transform: translateY(100%);
    }

    .mobile-filter-panel.collapsing.show {
        transform: translateY(0);
    }

    .mobile-filter-panel-body {
        padding: 1.1rem 1.25rem 1.5rem;
    }

    .mobile-filter-form .form-label {
        font-size: 0.85rem;
    }

    .mobile-filter-section-title {
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }

    .mobile-filter-scroll {
        max-height: 220px;
        overflow-y: auto;
        background: #f8fafc;
        border-radius: 12px;
        border: 1px solid rgba(148, 163, 184, 0.25);
        padding: 0.5rem 0.75rem;
    }

    .mobile-filter-form .form-check {
        margin-bottom: 0.45rem;
    }

    .mobile-filter-actions {
        display: flex;
        gap: 0.75rem;
        margin-top: 1.25rem;
    }

    .mobile-filter-actions .btn {
        flex: 1;
        border-radius: 999px;
        font-weight: 600;
    }

    body.mobile-filter-open {
        overflow: hidden;
    }
}

/* ============================================
   PASSWORD TOGGLE VISIBILITY
   ============================================ */
.password-toggle-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.password-toggle-wrapper .form-control {
    padding-right: 45px !important;
    width: 100%;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-width: 0 !important;
    color: #6c757d;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-width: auto;
    min-height: auto;
    transition: color 0.2s ease;
    z-index: 10;
    box-shadow: none !important;
    outline: none !important;
    pointer-events: auto;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.password-toggle-btn:hover {
    color: #495057;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-width: 0 !important;
    box-shadow: none !important;
}

.password-toggle-btn:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    border-width: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
}

.password-toggle-btn:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    border-width: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
}

.password-toggle-btn i {
    font-size: 1rem;
    line-height: 1;
    display: block;
    color: inherit;
}

/* For form-control-lg (larger inputs) */
.password-toggle-wrapper .form-control-lg {
    padding-right: 50px !important;
}

.password-toggle-wrapper .form-control-lg ~ .password-toggle-btn {
    right: 14px;
}

.password-toggle-wrapper .form-control-lg ~ .password-toggle-btn i {
    font-size: 1rem;
}

/* For smaller inputs */
.password-toggle-wrapper .form-control-sm {
    padding-right: 40px !important;
}

.password-toggle-wrapper .form-control-sm ~ .password-toggle-btn {
    right: 10px;
}

.password-toggle-wrapper .form-control-sm ~ .password-toggle-btn i {
    font-size: 0.75rem;
}

/* Ensure icon is inside the input field visually */
.password-toggle-wrapper input[type="password"],
.password-toggle-wrapper input[type="text"] {
    padding-right: 45px !important;
}

.password-toggle-wrapper .form-control-lg {
    padding-right: 50px !important;
}

.password-toggle-wrapper .form-control-sm {
    padding-right: 40px !important;
}

/* For admin site compatibility */
.admin .password-toggle-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.admin .password-toggle-wrapper .form-control {
    padding-right: 45px !important;
    width: 100%;
}

/* Admin Compact Layout */
body.admin,
.admin {
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body.admin h1,
.admin h1 {
    font-size: clamp(1.75rem, 2.3vw + 1rem, 2.4rem);
}

body.admin h2,
.admin h2 {
    font-size: clamp(1.45rem, 1.8vw + 0.9rem, 2rem);
}

body.admin h3,
.admin h3 {
    font-size: clamp(1.2rem, 1.5vw + 0.6rem, 1.6rem);
}

body.admin .admin-content,
.admin .admin-content {
    padding: 20px;
}

body.admin .admin-sidebar,
.admin .admin-sidebar {
    padding: 16px 0;
}

body.admin .admin-sidebar .nav-link,
.admin .admin-sidebar .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin: 0.15rem 0.75rem;
    border-radius: 6px;
}

body.admin .admin-sidebar .nav-item > ul .nav-link,
.admin .admin-sidebar .nav-item > ul .nav-link {
    font-size: 0.85rem;
    padding-left: 2rem;
}

body.admin .btn,
.admin .btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.9rem;
    border-radius: 0.45rem;
}

body.admin .form-control,
.admin .form-control,
body.admin .form-select,
.admin .form-select {
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
    min-height: 2.25rem;
}

body.admin label,
.admin label {
    font-size: 0.85rem;
}

body.admin table,
.admin table {
    font-size: 0.85rem;
}

body.admin table thead th,
.admin table thead th,
body.admin table tbody td,
.admin table tbody td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
}

body.admin i,
.admin i,
body.admin .fa,
.admin .fa,
body.admin .fas,
.admin .fas,
body.admin .far,
.admin .far,
body.admin .fal,
.admin .fal,
body.admin .fab,
.admin .fab,
body.admin .fa-solid,
.admin .fa-solid,
body.admin .fa-regular,
.admin .fa-regular,
body.admin .fa-light,
.admin .fa-light,
body.admin .fa-brands,
.admin .fa-brands,
body.admin .bi,
.admin .bi,
body.admin .material-icons,
.admin .material-icons,
body.admin .material-symbols-outlined,
.admin .material-symbols-outlined {
    font-size: 0.9em;
    line-height: 1;
}

body.admin svg.icon,
.admin svg.icon,
body.admin svg[class*="icon"],
.admin svg[class*="icon"] {
    width: 0.9em;
    height: 0.9em;
}

body.admin .navbar,
.admin .navbar {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    font-size: 0.95em;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
}

body.admin .navbar .container-fluid,
.admin .navbar .container-fluid {
    padding-left: 40px !important;
    padding-right: 1.5rem !important;
    margin-left: 0 !important;
}

body.admin .navbar .navbar-brand,
.admin .navbar .navbar-brand {
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    margin-left: 0;
    padding-left: 0;
}

body.admin .navbar .navbar-brand i,
.admin .navbar .navbar-brand i {
    font-size: 1rem;
}

body.admin .navbar .btn,
.admin .navbar .btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
}

body.admin .card,
.admin .card {
    border-radius: 0.65rem;
    padding: 0.85rem;
}

body.admin .card-title,
.admin .card-title {
    font-size: 1.05rem;
    margin-bottom: 0.65rem;
}

body.admin .card-text,
.admin .card-text,
body.admin .card-body,
.admin .card-body {
    font-size: 0.9rem;
}

body.admin .badge,
.admin .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.55rem;
}

body.admin .btn-sm,
.admin .btn-sm,
body.admin .btn-group-sm > .btn,
.admin .btn-group-sm > .btn {
    padding: 0.32rem 0.58rem;
    font-size: 0.8rem;
    border-radius: 0.4rem;
}

body.admin .btn-sm i,
.admin .btn-sm i {
    font-size: 0.85em;
    margin-right: 0.35rem !important;
}

body.admin .btn-sm i:last-child,
.admin .btn-sm i:last-child {
    margin-right: 0 !important;
}

body.admin .table-responsive,
.admin .table-responsive {
    font-size: 0.9rem;
}

body.admin .action-stack,
.admin .action-stack {
    display: inline-flex;
    gap: 0.4rem;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
}

body.admin .action-stack form,
.admin .action-stack form {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

@media (max-width: 576px) {
    body.admin .action-stack,
    .admin .action-stack {
        flex-wrap: wrap;
    }
}

body.admin .btn-action,
.admin .btn-action {
    --btn-action-size: 2.3rem;
    width: var(--btn-action-size);
    height: var(--btn-action-size);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border-width: 0;
    font-size: 1rem;
    line-height: 1;
    box-shadow: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

body.admin .btn-action i,
.admin .btn-action i {
    margin: 0 !important;
    font-size: 1.05rem;
}

body.admin .btn-action:focus-visible,
.admin .btn-action:focus-visible {
    outline: 2px solid rgba(13, 110, 253, 0.4);
    outline-offset: 2px;
}

body.admin .btn-action:hover,
.admin .btn-action:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

body.admin .btn-action:active,
.admin .btn-action:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

body.admin .btn-action.btn-view,
.admin .btn-action.btn-view {
    background-color: #0d6efd;
    color: #fff;
}

body.admin .btn-action.btn-approve,
.admin .btn-action.btn-approve {
    background-color: #198754;
    color: #fff;
}

body.admin .btn-action.btn-edit,
.admin .btn-action.btn-edit {
    background-color: #ffc107;
    color: #212529;
}

body.admin .btn-action.btn-reject,
.admin .btn-action.btn-reject,
body.admin .btn-action.btn-delete,
.admin .btn-action.btn-delete {
    background-color: #dc3545;
    color: #fff;
}

body.admin .btn-action.btn-neutral,
.admin .btn-action.btn-neutral {
    background-color: #6c757d;
    color: #fff;
}

body.admin .btn-action.btn-mark-read,
.admin .btn-action.btn-mark-read {
    background-color: #198754;
    color: #fff;
}

body.admin .btn-action.btn-reply,
.admin .btn-action.btn-reply {
    background-color: #0dcaf0;
    color: #212529;
}

body.admin .badge-status,
.admin .badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.25rem 0.6rem;
    text-transform: capitalize;
}

body.admin .badge-status i,
.admin .badge-status i {
    font-size: 0.85em;
}

body.admin .badge-status-approved,
.admin .badge-status-approved {
    background-color: #198754;
    color: #fff;
}

body.admin .badge-status-pending,
.admin .badge-status-pending {
    background-color: #ffc107;
    color: #212529;
}

body.admin .badge-status-rejected,
.admin .badge-status-rejected {
    background-color: #dc3545;
    color: #fff;
}

body.admin .badge-status-review,
.admin .badge-status-review {
    background-color: #0dcaf0;
    color: #012230;
}

body.admin .badge-status-neutral,
.admin .badge-status-neutral {
    background-color: #6c757d;
    color: #fff;
}

/* Operating Hours Picker Styles */

.operating-hours-picker {
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background-color: #fff;
}

.day-selection {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.day-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    background-color: #fff;
    color: #6c757d;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.day-btn:hover {
    border-color: #4FA3F7;
    color: #4FA3F7;
    background-color: #f0f8ff;
}

.day-btn.active {
    background-color: #4FA3F7;
    border-color: #4FA3F7;
    color: #fff;
}

.time-slots-container {
    margin-top: 1rem;
}

.time-slot-row {
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

.time-slot-row .open-time,
.time-slot-row .close-time {
    font-size: 0.95rem !important;
    padding: 0.5rem 0.75rem !important;
    min-width: 140px;
}

.add-hours-btn {
    font-size: 0.875rem;
    text-decoration: none;
    margin-top: 0.5rem;
    display: inline-block;
}

.add-hours-btn:hover {
    text-decoration: underline;
}

.remove-slot-btn {
    font-size: 1rem;
    line-height: 1;
}

.remove-slot-btn:hover {
    color: #dc3545 !important;
}

.day-btn.saved {
    background-color: #e7f3ff;
    border-color: #4FA3F7;
    color: #4FA3F7;
}

.saved-schedules-list {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.saved-schedule-item {
    font-size: 0.875rem;
}

.remove-schedule-btn {
    font-size: 0.875rem;
    line-height: 1;
}

.remove-schedule-btn:hover {
    color: #dc3545 !important;
}

/* Desktop navbar alignment rebalance: left group left, right group right */
@media (min-width: 992px) {
    #mainNavbar .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    #mainNavbar #mainNavItemsList {
        margin-left: -2.2rem !important;
        margin-right: 0 !important;
        flex: 0 0 auto;
    }

    #mainNavbar #mainNavItemsList .nav-link {
        padding-left: 0.65rem !important;
        padding-right: 0.65rem !important;
    }

    #mainNavbar .navbar-right-section {
        margin-left: auto !important;
        margin-right: -1.1rem !important;
        justify-content: flex-end !important;
        flex: 0 0 auto;
    }

    #mainNavbar .navbar-right-section .navbar-search-form {
        margin-right: 0.35rem;
    }

    #mainNavbar .navbar-right-section .right-actions-inline {
        margin-left: 0.35rem !important;
        gap: 0.85rem !important;
    }

    #mainNavbar .navbar-right-section .right-actions-inline > :last-child {
        margin-right: 0 !important;
    }

    /* Override legacy spacing that leaves a right-side hole */
    #mainNavbar .right-actions-inline > button#navbarCollectionsBtn,
    #mainNavbar .right-actions-inline > .dropdown:nth-of-type(2),
    #mainNavbar .right-actions-inline > .dropdown:nth-of-type(3) {
        margin-right: 0 !important;
    }
}

/* Navbar search slim redesign (keep state dropdown look/behavior unchanged) */
#mainNavbar .navbar-right-section .navbar-search-form {
    flex: 1 1 360px;
    min-width: 260px;
    max-width: 440px;
}

#mainNavbar .navbar-search-form .input-group {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

#mainNavbar .navbar-search-form .navbar-search-input {
    flex: 1 1 auto;
    min-width: 185px;
    height: 34px;
    padding: 0.3rem 0.72rem;
    font-size: 0.83rem;
    line-height: 1.15;
    border-width: 1px;
    border-color: #dce3ea;
}

#mainNavbar .navbar-search-form .navbar-search-input::placeholder {
    color: #7f8ea1;
    opacity: 1;
}

#mainNavbar .navbar-search-form .navbar-search-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 0.12rem rgba(79, 163, 247, 0.18);
}

#mainNavbar .navbar-search-form .navbar-search-btn {
    height: 34px;
    min-width: 42px;
    padding: 0.3rem 0.72rem;
    font-size: 0.82rem;
}

@media (max-width: 1400px) {
    #mainNavbar .navbar-right-section .navbar-search-form {
        flex-basis: 330px;
        max-width: 400px;
        min-width: 240px;
    }

    #mainNavbar .navbar-search-form .navbar-search-input {
        min-width: 170px;
    }
}

@media (max-width: 1200px) {
    #mainNavbar .navbar-right-section .navbar-search-form {
        flex-basis: 300px;
        max-width: 360px;
        min-width: 220px;
    }

    #mainNavbar .navbar-search-form .navbar-search-input {
        min-width: 160px;
        font-size: 0.8rem;
    }
}

@media (max-width: 991.98px) {
    #mainNavbar .navbar-search-form-mobile .input-group {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
    }

    #mainNavbar .navbar-search-form-mobile #navbarStateDropdownMobile {
        flex-shrink: 0;
    }

    #mainNavbar .navbar-search-form-mobile .navbar-search-input-mobile {
        flex: 1 1 auto;
        min-width: 160px;
        height: 34px;
        padding: 0.28rem 0.62rem;
        font-size: 0.8rem;
        line-height: 1.15;
        border-width: 1px;
        border-color: #dce3ea;
    }

    #mainNavbar .navbar-search-form-mobile .navbar-search-input-mobile::placeholder {
        color: #7f8ea1;
        opacity: 1;
    }

    #mainNavbar .navbar-search-form-mobile .input-group .btn-primary {
        height: 34px;
        min-width: 40px;
        padding: 0.28rem 0.62rem !important;
        font-size: 0.8rem;
    }
}

