/* --- Modern Responsive Navbar & Dropdown --- */
/* Add padding to body to account for fixed navbar */

@media (max-width: 991px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin: 0 auto;
        width: 90vw;
        max-width: 340px;
        background: #fff;
        box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 1.5px 6px rgba(26,115,232,0.08);
        border-radius: 0 0 16px 16px;
        z-index: 1050;
        transition: opacity 0.3s cubic-bezier(.4,0,.2,1), transform 0.3s cubic-bezier(.4,0,.2,1);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-16px) scale(0.98);
    }
    .navbar-collapse.show {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0) scale(1);
        animation: dropdownFadeIn 0.35s cubic-bezier(.4,0,.2,1);
    }
    @keyframes dropdownFadeIn {
        0% { opacity: 0; transform: translateY(-16px) scale(0.98); }
        100% { opacity: 1; transform: translateY(0) scale(1); }
    }
    .navbar-nav {
        flex-direction: column;
        padding: 0.5rem 0.5rem 0.7rem 0.5rem;
    }
    .nav-item {
        margin: 0.2rem 0;
    }
    .nav-link {
        padding: 0.7rem 1.2rem;
        border-radius: 8px;
        transition: background 0.2s;
    }
    .nav-link:active, .nav-link:focus, .nav-link:hover {
        background: #f3f6fa;
    }
}

@media (max-width: 767px) {
    .navbar-collapse {
        left: 5vw;
        right: 5vw;
        width: 90vw;
        max-width: 98vw;
    }
}

/* Hide overlay/fullscreen menu if present */
.navbar-collapse.collapse:not(.show) {
    display: block !important;
}

/* Hide default collapse animation for custom one */
.collapsing {
    transition: none !important;
    display: none !important;
}
/* Override container padding for edge-to-edge navbar */
.navbar .container {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
}
/* General Styles */
:root {
    --container-padding: 1.5rem;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: #333;
    margin: 0;
    padding: 80px 0 0 0; /* Add top padding for fixed navbar */
    overflow-x: hidden;
    overflow-y: hidden;
    transition: overflow-y 0.3s ease;
    line-height: 1.5;
}

body.loaded {
    overflow-y: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 1rem;
}

p, a, li {
    font-family: 'Poppins', sans-serif;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preloader-animation {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
}

.snip-loader {
    width: 100%;
    height: 100%;
    animation: pulse 1.5s infinite ease-in-out;
}

.preloader-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    color: #1a73e8;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: fadeInOut 2s infinite;
    font-weight: 500;
}

.preloader.hidden .snip-loader,
.preloader.hidden .preloader-text {
    animation-play-state: paused;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.9; }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Content Container */
#content {
    opacity: 0;
    transition: opacity 0.5s ease;
}

#content.visible {
    opacity: 1;
}

/* Navbar */
.navbar {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #1a73e8 !important;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    
}

.navbar-brand img {
    height: 65px;
    margin-right: 12px;
    margin-left: 0;
    padding-left: 0;
    display: inline-block;
    vertical-align: middle;
    transition: height 0.3s ease;
}

.navbar-brand:hover {
    color: #1557b0 !important;
}

.nav-item {
    position: relative;
}

.nav-link {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: #333 !important;
    padding: 10px 15px;
    transition: color 0.3s ease;
    position: relative;
    display: inline-block;
}

.nav-link i {
    color: #1a73e8;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #1a73e8;
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link:hover, .nav-link.active {
    color: #1a73e8 !important;
}

.nav-link:hover i, .nav-link.active i {
    color: #333;
}

/* Navbar Toggler with Material Icons */
.navbar-toggler {
    border: none;
    padding: 8px;
    background-color: transparent;
    transition: background-color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.3);
}

#togglerIcon {
    font-size: 24px;
    color: #1a73e8;
    transition: color 0.3s ease, transform 0.2s ease;
}

.navbar-toggler:hover #togglerIcon {
    color: #1557b0;
    transform: scale(1.1);
}

.navbar-toggler[aria-expanded="true"] #togglerIcon {
    color: #1557b0;
}

@media (max-width: 991px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        right: 1rem;
        width: 280px;
        background: #fff;
        border-radius: 6px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
        padding: 0.5rem;
        transform-origin: top right;
        transition: transform 0.2s ease, opacity 0.2s ease;
        opacity: 0;
        transform: scale(0.98) translateY(-0.5rem);
        pointer-events: none;
    }

    .navbar-collapse.show {
        opacity: 1;
        transform: scale(1) translateY(0);
        pointer-events: auto;
    }

    .navbar-nav {
        margin: 0;
        padding: 0;
    }

    .nav-item {
        margin: 2px 0;
    }

    .nav-link {
        padding: 0.6rem 1rem;
        border-radius: 4px;
        transition: background-color 0.2s ease;
        display: block;
    }

    .nav-link:hover, .nav-link:focus {
        background-color: #f6f8fa;
    }

    .nav-link.active {
        background-color: #f0f4f8;
    }

    .nav-link::after {
        display: none;
    }
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    height: auto;
    background: linear-gradient(45deg, #1a73e8, #4a90e2, #50e3c2, #1557b0);
    background-size: 200% 200%;
    animation: gradientAnimation 15s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 7rem 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
    line-height: 1.2;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Sections */
.section {
    padding: clamp(3rem, 8vw, 5rem) 0;
}

/* Ensure first section starts below fixed navbar */
#contact.section:first-of-type {
    padding-top: calc(clamp(3rem, 8vw, 5rem) + 20px);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: clamp(2rem, 6vw, 3rem);
    color: #1a73e8;
    line-height: 1.2;
}

/* Grid system for responsive layouts */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(var(--container-padding) * -1);
}

.col {
    flex: 1;
    padding: 0 var(--container-padding);
    min-width: 0;
    margin-bottom: 2rem;
}

@media (max-width: 767px) {
    .col {
        flex: 0 0 100%;
    }
}

/* Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: clamp(1.5rem, 4vw, 2rem);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Achievements Counter */
.counter {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a73e8;
}

/* Parallax Section */
.parallax-section {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.facility-box {
    background: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Timeline */
.timeline {
    position: relative;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: #1a73e8;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 1rem;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-content {
    background: #fff;
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content::after,
.timeline-item:nth-child(even) .timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-content::after {
    right: -20px;
    border-left-color: #fff;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -20px;
    border-right-color: #fff;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: #1a73e8;
    border-radius: 50%;
    transform: translateY(-50%);
}

.timeline-item:nth-child(odd)::before {
    right: -10px;
}

.timeline-item:nth-child(even)::before {
    left: -10px;
}

/* Email Sent Overlay */
.email-sent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.email-sent-overlay.active {
    display: flex;
}

/* Email Sending Overlay */
.email-sending-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.email-sending-container {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.email-sending-container p {
    margin-top: 1rem;
    font-family: 'Poppins', sans-serif;
    color: #333;
}

/* Star Rating */
.star-rating .fa-star {
    color: #ddd;
}

.star-rating .fa-star.checked {
    color: #f4c430;
}

/* Footer */
.footer {
    background: #1a2526;
    color: #fff;
    padding: 3rem 0;
}

.footer h4 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #1a73e8;
    text-decoration: underline;
}

/* Flash Messages - Positioned below navbar on desktop, bottom on mobile */
/* Flash messages: pinned to bottom by default (consistent) */
#flash-messages-container {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 1060;
    width: auto;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    /* Prevent flashes from overflowing tall stacks on small screens */
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.alert {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 12px;
    min-width: 320px;
    max-width: 500px;
    padding: 15px 20px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    animation: slideFromBottom 0.45s ease-out;
    border-left: 5px solid;
    transform-origin: center;
}

/* Progress bar for auto-dismiss */
.alert::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: progressBar 5s linear forwards;
}

/* Alert color variations with modern gradients */
.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left-color: #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f1b0b7 100%);
    color: #721c24;
    border-left-color: #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-left-color: #ffc107;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #b8e2e8 100%);
    color: #0c5460;
    border-left-color: #17a2b8;
}

.alert-primary {
    background: linear-gradient(135deg, #cce7ff 0%, #b3d9ff 100%);
    color: #004085;
    border-left-color: #007bff;
}

/* Close button styling */
.alert .btn-close {
    padding: 0.75rem;
    background-size: 0.8rem;
    opacity: 0.7;
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
}

.alert .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Desktop animation: slide in from above (since container is below the navbar) */
@keyframes slideFromBottom {
    0% {
        transform: translate(-50%, 40px) scale(0.98);
        opacity: 0;
    }
    60% {
        transform: translate(-50%, -6px) scale(1.02);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, 0) scale(1);
        opacity: 1;
    }
}

@keyframes progressBar {
    0% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

/* Exit animation */
.alert.fade-out {
    animation: slideDownFade 0.5s ease-in forwards;
}

@keyframes slideDownFade {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
        scale: 1;
    }
    100% {
        transform: translate(-50%, 100px);
        opacity: 0;
        scale: 0.8;
    }
}

/* Hover effects */
.alert:hover {
    transform: translate(-50%, -2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Ensure alerts look good on mobile */
@media (max-width: 768px) {
    /* On mobile, show flashes at the bottom */
    #flash-messages-container {
        width: 95%;
        bottom: 15px;
        top: auto; /* remove top so bottom takes effect */
        left: 50%;
        transform: translateX(-50%);
    }
    
    .alert {
        min-width: unset;
        max-width: unset;
        width: 100%;
        font-size: 0.9rem;
        padding: 12px 16px;
        animation: slideFromBottom 0.6s ease-out;
    }

    @keyframes slideFromBottom {
        0% {
            transform: translate(-50%, 60px) scale(0.95);
            opacity: 0;
        }
        60% {
            transform: translate(-50%, -6px) scale(1.02);
            opacity: 1;
        }
        100% {
            transform: translate(-50%, 0) scale(1);
            opacity: 1;
        }
    }
}

/* For very small screens */
@media (max-width: 480px) {
    #flash-messages-container {
        width: 98%;
        bottom: 10px;
    }
    
    .alert {
        font-size: 0.85rem;
        padding: 10px 14px;
    }
}

/* Responsive Design */
/* Tablet breakpoint */
@media (max-width: 991px) {
    :root {
        --container-padding: 1.25rem;
    }

    body {
        font-size: 15px;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .navbar-brand img {
        height: clamp(25px, 4vw, 30px);
    }

    /* Form elements */
    input, select, textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.75rem;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding-left: 40px;
    }

    .timeline-item::before {
        left: 10px !important;
        right: auto !important;
    }

    .timeline-content::before, .timeline-content::after {
        display: none;
    }

    .preloader-animation {
        width: 100px;
        height: 100px;
    }

    .preloader-text {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    /* Disable underline animation on mobile */
    .nav-link::after {
        display: none;
    }
}

/* Mobile breakpoint */
@media (max-width: 767px) {
    :root {
        --container-padding: 1rem;
    }

    body {
        font-size: 14px;
    }

    .section-title {
        font-size: clamp(1.75rem, 5vw, 2rem);
        margin-bottom: 2rem;
    }

    .counter {
        font-size: clamp(1.75rem, 5vw, 2rem);
    }

    .navbar-brand {
        font-size: 1rem;
    }

    .navbar-brand img {
        height: clamp(20px, 3.5vw, 25px);
    }

    /* Stack grid columns on mobile */
    .row {
        margin: 0 calc(var(--container-padding) * -0.5);
    }

    .col {
        padding: 0 calc(var(--container-padding) * 0.5);
    }

    /* Full-width buttons on mobile */
    .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }

    /* Adjust spacing */
    .section {
        padding: clamp(2.5rem, 6vw, 3rem) 0;
    }

    .preloader-animation {
        width: 80px;
        height: 80px;
    }

    .preloader-text {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }
}

/* ============================================= */
/* REDESIGNED CHATBOT - Modern & Professional */
/* ============================================= */

.chatbot {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
}

.chatbot-toggle {
    background: linear-gradient(135deg, #1a73e8, #34d399);
    border: none;
    border-radius: 50%;
    width: 65px;
    height: 65px;
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.chatbot-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.chatbot-toggle:hover::before {
    left: 100%;
}

.chatbot-toggle:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 25px rgba(26, 115, 232, 0.4);
}

.chatbot-box {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 380px;
    height: 520px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e8f0fe;
    transform-origin: bottom right;
    animation: chatboxAppear 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes chatboxAppear {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.chatbot-box.show {
    display: flex !important;
}

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, #1a73e8, #2d87ff);
    color: white;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.chatbot-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #34d399, #1a73e8, #34d399);
    background-size: 200% 100%;
    animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.chatbot-avatar {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.chatbot-info {
    flex: 1;
}

.chatbot-info h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.chatbot-info p {
    margin: 2px 0 0 0;
    font-size: 0.8rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: #34d399;
    border-radius: 50%;
    display: inline-block;
    animation: pulseStatus 2s infinite;
}

@keyframes pulseStatus {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Body */
.chatbot-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: linear-gradient(135deg, #f8faff 0%, #f0f7ff 100%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 0;
}

/* Welcome Message */
.welcome-message {
    background: white !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    box-shadow: none !important;
}

.welcome-content {
    text-align: center;
    padding: 10px 0;
}

.welcome-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.welcome-content h4 {
    color: #1a73e8;
    margin-bottom: 15px;
    font-weight: 600;
}

.help-topics {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.help-topics li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #555;
}

.help-topics li:last-child {
    border-bottom: none;
}

.topic-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.suggested-actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e8f0fe;
}

.suggested-actions h5 {
    color: #1a73e8;
    margin-bottom: 15px;
    font-size: 1rem;
}

.quick-questions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.quick-question {
    background: white;
    border: 1px solid #e1e8ff;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    color: #1a73e8;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.08);
}

.quick-question:hover {
    background: #1a73e8;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.2);
}

/* Footer - Redesigned Input Section */
.chatbot-footer {
    padding: 20px;
    border-top: 1px solid #e8f0fe;
    background: white;
    flex-shrink: 0;
    position: relative;
}

.input-prompt {
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #1a73e8;
    font-weight: 600;
    text-align: center;
    background: linear-gradient(135deg, #f0f7ff, #e8f0fe);
    border-radius: 15px;
    padding: 12px 20px;
    border: 1px solid #d1e3ff;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.1);
    position: relative;
    overflow: hidden;
}

.input-prompt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1a73e8, #34d399, #1a73e8);
    background-size: 200% 100%;
    animation: promptShimmer 3s infinite linear;
}

@keyframes promptShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.chat-input-container {
    display: flex;
    gap: 12px;
    align-items: center;
    background: white;
    border: 2px solid #e8f0fe;
    border-radius: 20px;
    padding: 8px 8px 8px 20px;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.chat-input-container:focus-within {
    border-color: #1a73e8;
    box-shadow: 0 6px 18px rgba(26, 115, 232, 0.15);
    transform: translateY(-2px);
}

.input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
}

.input-prefix {
    color: #1a73e8;
    margin-right: 12px;
    font-weight: bold;
    font-size: 1.2rem;
}

#chatbotInput {
    flex: 1;
    border: none;
    padding: 12px 0;
    outline: none;
    font-size: 0.9rem;
    background: transparent;
    font-family: 'Poppins', sans-serif;
    color: #333;
}

#chatbotInput::placeholder {
    color: #a0aec0;
    font-style: italic;
}

#chatbotSend {
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: linear-gradient(135deg, #1a73e8, #2d87ff);
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
    flex-shrink: 0;
}

#chatbotSend:hover {
    background: linear-gradient(135deg, #1557b0, #1a73e8);
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 6px 16px rgba(26, 115, 232, 0.4);
}

/* Chat Messages */
.chat-message {
    margin-bottom: 0;
    padding: 14px 18px;
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.5;
    position: relative;
    animation: messageAppear 0.3s ease-out;
}

@keyframes messageAppear {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    background: white;
    border: 1px solid #e8f0fe;
    margin-right: auto;
    margin-left: 0;
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 10px rgba(26, 115, 232, 0.08);
}

.user-message {
    background: linear-gradient(135deg, #1a73e8, #2d87ff);
    color: white;
    margin-left: auto;
    margin-right: 0;
    border-bottom-right-radius: 6px;
    box-shadow: 0 2px 10px rgba(26, 115, 232, 0.2);
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: white;
    border: 1px solid #e8f0fe;
    border-radius: 18px;
    margin-right: auto;
    margin-left: 0;
    max-width: 200px;
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 10px rgba(26, 115, 232, 0.08);
}

.typing-content {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.typing-dots {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1a73e8;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

.typing-text {
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
    font-family: 'Poppins', sans-serif;
}

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Scrollbar styling */
.chatbot-body::-webkit-scrollbar {
    width: 6px;
}

.chatbot-body::-webkit-scrollbar-track {
    background: #f1f5ff;
    border-radius: 3px;
}

.chatbot-body::-webkit-scrollbar-thumb {
    background: #c7d2fe;
    border-radius: 3px;
}

.chatbot-body::-webkit-scrollbar-thumb:hover {
    background: #1a73e8;
}

/* Responsive chatbot */
@media (max-width: 768px) {
    .chatbot {
        bottom: 15px;
        right: 15px;
    }
    
    .chatbot-toggle {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .chatbot-box {
        width: 350px;
        height: 480px;
        right: 15px;
        bottom: 85px;
    }
}

@media (max-width: 480px) {
    .chatbot {
        bottom: 10px;
        right: 10px;
    }
    
    .chatbot-toggle {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
    }
    
    .chatbot-box {
        width: 320px;
        height: 450px;
        right: 10px;
        bottom: 75px;
    }
    
    .quick-questions {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .chatbot-body {
        padding: 15px;
    }
    
    .chatbot-footer {
        padding: 15px;
    }
}

/* Final unified flash message styling (cleaned duplicates)
   - Pinned to bottom by default
   - Uses slideFromBottom entrance and slideDownFade exit
   - Responsive widths for small phones to avoid overflow
*/
#flash-messages-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1060;
    width: auto;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.alert {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 12px;
    min-width: 0; /* allow proper shrinking on very small screens */
    max-width: 500px;
    width: 100%;
    padding: 12px 16px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    animation: slideFromBottom 0.45s ease-out;
    border-left: 5px solid;
}

@keyframes slideFromBottom {
    0% {
        transform: translate(-50%, 60px) scale(0.95);
        opacity: 0;
    }
    60% {
        transform: translate(-50%, -6px) scale(1.02);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, 0) scale(1);
        opacity: 1;
    }
}

@keyframes progressBar {
    0% { width: 100%; }
    100% { width: 0%; }
}

/* Exit animation */
.alert.fade-out {
    animation: slideDownFade 0.5s ease-in forwards;
}

@keyframes slideDownFade {
    0% { transform: translate(-50%, 0); opacity: 1; scale: 1; }
    100% { transform: translate(-50%, 100px); opacity: 0; scale: 0.8; }
}

/* Mobile tweaks */
@media (max-width: 768px) {
    #flash-messages-container { width: 95%; bottom: calc(15px + env(safe-area-inset-bottom, 0px)); }
    .alert { max-width: none; width: 100%; font-size: 0.95rem; padding: 12px 14px; }
}

@media (max-width: 480px) {
    #flash-messages-container { width: 98%; bottom: 10px; }
    .alert { font-size: 0.85rem; padding: 10px 12px; }
}

/* Enhanced Navbar Styling for Contact Positioning */
.navbar-nav {
    display: flex;
    align-items: center;
    width: 100%;
}

.contact-item {
    margin-left: auto !important;
}

.contact-link {
    background: linear-gradient(135deg, #1a73e8, #34d399);
    color: white !important;
    border-radius: 25px;
    padding: 8px 20px !important;
    margin: 0 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.contact-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.contact-link:hover::before {
    left: 100%;
}

.contact-link:hover {
    background: linear-gradient(135deg, #1557b0, #2da67c);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 115, 232, 0.3);
    color: white !important;
}

.contact-link.active {
    background: linear-gradient(135deg, #1557b0, #2da67c);
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.2);
}

.contact-link i {
    font-size: 0.9em;
}

/* Mobile responsiveness for contact button */
@media (max-width: 991px) {
    .contact-item {
        margin-left: 0 !important;
        margin-top: 10px;
        width: 100%;
    }
    
    .contact-link {
        text-align: center;
        width: 100%;
        margin: 5px 0;
        border-radius: 12px;
        justify-content: center;
        display: flex;
        align-items: center;
    }
    
    .navbar-nav {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Enhanced navbar brand styling */
.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #1a73e8 !important;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.navbar-brand img {
    height: 65px;
    margin-right: 12px;
    transition: height 0.3s ease;
}

/* Improved nav link spacing */
.navbar-nav .nav-item {
    margin: 0 0.3rem;
}

.navbar-nav .nav-link {
    padding: 10px 16px !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Desktop specific enhancements */
@media (min-width: 992px) {
    .navbar-nav {
        justify-content: flex-end;
    }
    
    .navbar-nav .nav-item:not(.contact-item) {
        margin: 0 0.2rem;
    }
    
    .contact-item {
        margin-left: 2rem !important;
    }
}

/* Tablet adjustments */
@media (max-width: 1199px) and (min-width: 992px) {
    .navbar-brand {
        font-size: 1.3rem;
    }

    .navbar-brand img {
        height: 55px;
    }

    .nav-link {
        font-size: 0.95rem;
        padding: 8px 14px !important;
    }
}

/* Community Page Layout Fixes */
html {
    height: 100%;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

#content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.footer {
    flex-shrink: 0;
    margin-top: auto;
}

#main-content {
    flex: 1;
}
/* Custom styles from school-life for consistency across pages */
/* Custom styles from school-life for consistency across pages */
#school-life-hero {
    background-image: url('/static/assets/sports.JPG');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

.section-title {
    color: #1a73e8;
    margin-bottom: 2rem;
    text-align: center;
}

.facility-box {
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
    transition: transform 0.3s ease;
    margin-bottom: 1.5rem;
}

.facility-box:hover {
    transform: translateY(-5px);
}

.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table th {
    background-color: #1a73e8;
    color: white;
    padding: 1rem;
}

.table td {
    padding: 0.75rem;
}

.glass-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #1a73e8, #2d87ff);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 115, 232, 0.4);
}

.section {
    padding: 4rem 0;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.bg-white {
    background-color: #ffffff !important;
}