/* ==========================================================
 * Sona College of Nursing - Public Website Styles
 * Location: Tatisilwai, Ranchi, Jharkhand, India
 * ========================================================== */

:root {
    --primary: #0284c7;        /* Medical Cyan / Blue */
    --primary-dark: #0369a1;
    --primary-light: #e0f2fe;
    --danger-red: #dc2626;     /* Emergency Red */
    --danger-dark: #b91c1c;
    --dark-navy: #0b192c;
    --dark-slate: #1e293b;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --transition: all 0.25s ease-in-out;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-main);
    background-color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 1. Emergency Top Strip */
.top-emergency-strip {
    background: linear-gradient(90deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    font-size: 0.84rem;
    padding: 7px 0;
    font-weight: 600;
}

.top-emergency-strip a {
    color: #ffffff;
    text-decoration: none;
}

.top-emergency-strip a:hover {
    text-decoration: underline;
}

/* 2. Public Navbar */
.public-navbar {
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.clinic-brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 3px 8px rgba(2, 132, 199, 0.3);
}

.nav-link {
    color: #334155 !important;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 8px 14px !important;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
}

/* 3. Hero Section */
.hero-banner {
    background: linear-gradient(135deg, #0b192c 0%, #075985 100%);
    color: #ffffff;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.page-header-banner {
    background: linear-gradient(135deg, #0b192c 0%, #0369a1 100%);
    color: #ffffff;
    padding: 55px 0 45px 0;
}

/* 4. Cards & Badges */
.card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.feature-box {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

.feature-box:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.doctor-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.doctor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.doctor-card-img {
    height: 220px;
    object-fit: cover;
    width: 100%;
    background: #e0f2fe;
}

/* 5. Buttons */
.btn {
    border-radius: var(--radius-sm);
    padding: 9px 18px;
    font-weight: 600;
    font-size: 0.88rem;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-danger {
    background-color: var(--danger-red);
    border-color: var(--danger-red);
}

.btn-danger:hover {
    background-color: var(--danger-dark);
    border-color: var(--danger-dark);
}

/* 6. Footer */
.public-footer {
    background: #0b192c;
    color: #cbd5e1;
    padding: 60px 0 25px 0;
}

.public-footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.public-footer a:hover {
    color: #ffffff;
}

.tva-link {
    color: #38bdf8 !important;
    text-decoration: none !important;
    font-weight: 600;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.tva-link:hover,
.tva-link:focus {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* ==========================================================
 * 7. Admin Panel & Sidebar Styles (Healthcare UI System)
 * Theme: Top Blue Header (#0284c7) | White Sidebar | Light Grey BG (#f8fafc)
 * ========================================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
    background-color: #f8fafc;
}

/* A. Top Blue Header (Section 34) */
.app-topbar {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
    height: 62px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.15) !important;
}

.app-topbar a {
    color: #ffffff;
}

.app-topbar .form-control {
    background: #ffffff !important;
    border: none;
    color: #1e293b;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.app-topbar .form-control:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.app-topbar .input-group-text {
    border: none;
    background: #ffffff;
}

/* B. White Sidebar */
.app-sidebar {
    width: 270px;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1040;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.sidebar-header {
    height: 62px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 14px;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 5px;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.sidebar-heading {
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.5px;
    padding: 10px 14px 4px 14px;
}

.sidebar-nav .nav-item {
    margin-bottom: 3px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-radius: 10px;
    color: #334155 !important;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

.sidebar-nav .nav-link:hover {
    background-color: #f0f9ff;
    color: #0284c7 !important;
    transform: translateX(2px);
}

.sidebar-nav .nav-link.active {
    background-color: #e0f2fe;
    color: #0284c7 !important;
    font-weight: 700;
    border-left: 3px solid #0284c7;
}

.sidebar-nav .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.sidebar-nav .arrow-icon {
    font-size: 0.72rem;
    color: #94a3b8;
    transition: transform 0.25s ease;
}

.sidebar-nav .has-submenu.open > .nav-link .arrow-icon,
.sidebar-nav .nav-link[aria-expanded="true"] .arrow-icon {
    transform: rotate(180deg);
    color: #0284c7;
}

.sidebar-nav .submenu {
    padding-left: 24px;
    margin-top: 2px;
    margin-bottom: 4px;
    border-left: 2px solid #e2e8f0;
    margin-left: 22px;
}

.sidebar-nav .submenu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.sidebar-nav .submenu-link:hover {
    color: #0284c7;
    background-color: #f8fafc;
    transform: translateX(2px);
}

.sidebar-nav .submenu-link.active {
    color: #0284c7;
    font-weight: 700;
    background-color: #f0f9ff;
}

.sidebar-nav .dot-icon {
    font-size: 0.45rem;
    opacity: 0.7;
}

.sidebar-nav .emergency-nav-link {
    background-color: #fef2f2;
    color: #dc2626 !important;
    font-weight: 700;
    border: 1px solid #fee2e2;
}

.sidebar-nav .emergency-nav-link:hover {
    background-color: #fee2e2;
    color: #b91c1c !important;
}

/* C. Breadcrumbs */
.breadcrumb {
    margin-bottom: 0;
}
.breadcrumb-item a {
    color: #0284c7;
    text-decoration: none;
}
.breadcrumb-item a:hover {
    text-decoration: underline;
}
.breadcrumb-item.active {
    color: #64748b;
    font-weight: 500;
}

/* D. Clean Tables & Pagination */
.table {
    margin-bottom: 0;
    vertical-align: middle;
}

.table thead th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 14px;
    white-space: nowrap;
}

.table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.88rem;
    color: #1e293b;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* E. Rounded Cards & Soft Shadows */
.card {
    border-radius: 14px !important;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03), 0 6px 16px rgba(0,0,0,0.02);
    background-color: #ffffff;
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 16px 20px;
    border-top-left-radius: 14px !important;
    border-top-right-radius: 14px !important;
}

.card-body {
    padding: 20px;
}

/* ==========================================================
 * 8. Responsive Design Engine (Section 33)
 * Desktop, Laptop, Tablet, Mobile Breakpoints
 * ========================================================== */

/* A. General Fluid & Mobile Helpers */
.w-mobile-100 {
    width: auto;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* B. Responsive Admin Topbar & Search */
.app-topbar {
    height: 60px;
    z-index: 1035;
}

.topbar-search-container input {
    font-size: 0.88rem;
}

/* C. Responsive Drawer & Sidebar (Tablet & Mobile < 992px) */
@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        left: -290px;
        top: 0;
        bottom: 0;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }

    .app-sidebar.show {
        left: 0;
        box-shadow: 0 0 50px rgba(15, 23, 42, 0.4);
    }

    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.55);
        backdrop-filter: blur(3px);
        z-index: 1040;
        display: none;
        opacity: 0;
        transition: opacity 0.25s ease-in-out;
    }

    .sidebar-backdrop.show {
        display: block;
        opacity: 1;
    }

    .app-main {
        width: 100% !important;
        margin-left: 0 !important;
    }

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

/* D. Mobile Forms & Cards Breakpoint (Mobile < 768px) */
@media (max-width: 767.98px) {
    /* 1. Forms: Single column layout on mobile */
    .form-row,
    .row.g-3,
    .row.g-4,
    .row.g-2 {
        row-gap: 1rem !important;
    }

    .form-control,
    .form-select {
        font-size: 16px !important; /* Prevents auto-zoom on iOS devices */
        min-height: 44px; /* Touch-friendly tap target */
    }

    .btn {
        min-height: 42px;
    }

    .w-mobile-100,
    .btn-mobile-block {
        width: 100% !important;
        display: block;
    }

    /* 2. Responsive Tables -> Card Layout on Mobile if enabled */
    .table-mobile-cards thead {
        display: none;
    }

    .table-mobile-cards tr {
        display: block;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: var(--radius-md);
        margin-bottom: 12px;
        padding: 12px;
        box-shadow: var(--shadow-sm);
    }

    .table-mobile-cards td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid #f1f5f9;
        font-size: 0.88rem;
    }

    .table-mobile-cards td:last-child {
        border-bottom: none;
        padding-top: 10px;
    }

    .table-mobile-cards td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #64748b;
        font-size: 0.8rem;
        text-transform: uppercase;
        margin-right: 12px;
    }

    /* 3. Hero & Header Typography Scaling */
    .hero-banner {
        padding: 50px 0 40px 0;
        text-align: center;
    }

    .hero-banner h1 {
        font-size: 1.85rem !important;
        line-height: 1.25;
    }

    .page-header-banner {
        padding: 35px 0 30px 0;
        text-align: center;
    }

    .page-header-banner h2 {
        font-size: 1.65rem;
    }

    /* 4. Public Navbar */
    .public-navbar .navbar-brand,
    .clinic-brand-logo h5 {
        font-size: 1.1rem;
    }

    /* 5. Filter Toolbar Stack */
    .filter-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .filter-toolbar .input-group,
    .filter-toolbar .form-select,
    .filter-toolbar .btn {
        width: 100% !important;
    }

    /* 6. Top Emergency Strip */
    .top-emergency-strip {
        font-size: 0.76rem;
        text-align: center;
    }
}

/* E. High-DPI / Desktop Enhancements (>= 1200px) */
@media (min-width: 1200px) {
    .app-sidebar {
        width: 270px;
    }
    .app-main {
        flex: 1;
        min-width: 0;
    }
}

/* ==========================================================
 * 9. Form UX & Interactive Feedback (Section 35)
 * ========================================================== */
.required-indicator,
.form-label.required::after,
label.required::after {
    content: " *";
    color: #dc2626;
    font-weight: 700;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary);
    font-weight: 600;
}

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1090;
    max-width: 380px;
}

.app-toast {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================
 * Reusable Interactive Components & Image Performance
 * ========================================================== */
.gallery-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12) !important;
}
.gallery-card .transition-zoom {
    transition: transform 0.4s ease;
}
.gallery-card:hover .transition-zoom {
    transform: scale(1.05);
}
.transition-fade {
    transition: opacity 0.3s ease;
}
.gallery-card:hover .gallery-overlay {
    opacity: 1 !important;
}
.img-lazy {
    content-visibility: auto;
}

/* ==========================================================
 * ACCESSIBILITY & WCAG 2.1 AA ENHANCEMENTS (Section 45)
 * ========================================================== */

/* 1. Skip to Content Link (Keyboard Navigation) */
.skip-to-content {
    position: absolute;
    top: -9999px;
    left: 16px;
    z-index: 999999;
    padding: 12px 20px;
    background: #0284c7;
    color: #ffffff !important;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    outline: 3px solid #facc15;
    outline-offset: 2px;
    transition: top 0.2s ease-in-out;
}
.skip-to-content:focus {
    top: 0;
}

/* 2. Distinct, Unambiguous Focus Rings for Keyboard Navigation */
:focus-visible {
    outline: 3px solid #0284c7 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.25) !important;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #0284c7 !important;
    outline-offset: 2px !important;
}

/* 3. High Contrast Accessible Form Controls */
.form-label {
    color: #0f172a;
    font-weight: 600;
}

.form-label .text-danger {
    color: #dc2626 !important;
    font-weight: 700;
}

.form-control:focus,
.form-select:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 0.25rem rgba(2, 132, 199, 0.25) !important;
}

/* 4. High-contrast helper text */
.form-text,
.text-muted {
    color: #475569 !important; /* WCAG AA 4.5:1 ratio against #ffffff */
}

/* 5. Reduced Motion for Users with Vestibular Disorders */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================
 * 6. Institution Brand Logo Styles (Sona College of Nursing)
 * Preserves original aspect ratio with object-fit: contain
 * Responsive across Desktop, Tablet and Mobile
 * ========================================================== */
.brand-logo-img {
    height: 52px;
    width: auto;
    max-width: 65px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.2s ease;
}
.brand-logo-img:hover {
    transform: scale(1.03);
}

.sidebar-logo-img {
    height: 40px;
    width: auto;
    max-width: 50px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.footer-logo-img {
    height: 48px;
    width: auto;
    max-width: 60px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.hero-logo-img {
    height: 64px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    display: inline-block;
}

.login-logo-img {
    max-height: 85px;
    max-width: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: inline-block;
}

@media (max-width: 991px) {
    .brand-logo-img {
        height: 46px;
        max-width: 58px;
    }
}

@media (max-width: 768px) {
    .brand-logo-img {
        height: 42px;
        max-width: 52px;
    }
    .brand-title {
        font-size: 1.05rem !important;
    }
    .hero-logo-img {
        height: 52px;
        max-width: 68px;
    }
    .login-logo-img {
        max-height: 72px;
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .brand-logo-img {
        height: 38px;
        max-width: 46px;
    }
    .brand-title {
        font-size: 0.95rem !important;
    }
}

/* Floating WhatsApp Button */
.floating-whatsapp-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #ffffff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1050;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.floating-whatsapp-btn:hover {
    background-color: #20ba5a;
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
    color: #ffffff !important;
}

.floating-whatsapp-btn:active {
    transform: scale(0.96);
}

.floating-whatsapp-tooltip {
    position: absolute;
    right: 70px;
    background: #1e293b;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateX(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.floating-whatsapp-btn:hover .floating-whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .floating-whatsapp-btn {
        bottom: 20px;
        right: 18px;
        width: 52px;
        height: 52px;
        font-size: 28px;
    }
    .floating-whatsapp-tooltip {
        display: none;
    }
}

/* ==========================================================
 * 7. Contact Us & Admission Enquiry Page Layout
 * Full-width responsive centered container (1100–1200px max)
 * ========================================================== */
.contact-container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
}

.contact-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08) !important;
}

.map-embed-wrapper {
    position: relative;
    width: 100%;
    min-height: 250px;
    border-radius: var(--radius-lg, 16px);
    overflow: hidden;
}

.map-embed-wrapper iframe {
    width: 100%;
    height: 100%;
    min-height: 250px;
    border: 0;
    display: block;
}





