/* CSB Seed Act Portal — Silk Luxury Theme
   Visual language inspired by silk saree craftsmanship:
   Deep navy + mulberry + gold zari + warm ivory
   Fonts: Playfair Display (display) + Exo (UI) + Roboto (body)
*/

/* ===== CSS Custom Properties ===== */
:root {
    --silk-deep: #0B1930;
    --silk-navy: #152238;
    --navy: #223a66;
    --navy-dark: #1a2d50;
    --navy-light: #2e4d8a;
    --mulberry: #6B2D5B;
    --mulberry-deep: #4A1942;
    --pink: #e12454;
    --pink-dark: #c91e49;
    --govt-green: #305534;
    --govt-green-light: #3a6640;
    --gold: #C9A84C;
    --gold-light: #D4AF37;
    --gold-dark: #A8893A;
    --gold-pale: #E8D5A0;
    --ivory: #FDF8F0;
    --ivory-mid: #F5EDE0;
    --ivory-dark: #EDE3D0;
    --silk-sheen: linear-gradient(
        120deg,
        rgba(255,255,255,0) 30%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0) 70%
    );
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(201, 168, 76, 0.2);
    --glass-shadow: 0 8px 32px rgba(11, 25, 48, 0.08);
    --card-shadow: 0 4px 20px rgba(11, 25, 48, 0.06);
    --card-shadow-hover: 0 12px 40px rgba(11, 25, 48, 0.12);
    --body-text: #5A6B7D;
    --heading-text: #1A1A2E;
    --zari-border: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold), var(--gold-light), var(--gold-dark));
}

/* ===== Typography ===== */
body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #3A3A4A;
    line-height: 1.7;
    background: var(--ivory);
}

h1, h2, h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: var(--heading-text);
    letter-spacing: -0.01em;
}

h4, h5, h6,
.navbar-brand, .card-title {
    font-family: 'Exo', 'Roboto', sans-serif;
    font-weight: 700;
    color: var(--heading-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; line-height: 1.5; }
h5 { font-size: 1.15rem; }
h6 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; }

p { line-height: 1.8; }

/* ===== Top Contact Bar — Dark Silk ===== */
.top-contact-bar {
    background: linear-gradient(135deg, var(--silk-deep) 0%, var(--navy-dark) 100%);
    border-bottom: 2px solid var(--gold);
}

.header-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.header-info-list li {
    display: inline-block;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 500;
    margin-right: 15px;
    padding: 11px 15px 10px 0;
    border-right: 1px solid rgba(201, 168, 76, 0.3);
    letter-spacing: 0.02em;
}

.header-info-list li:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: 0;
}

.header-info-list li i {
    color: var(--gold);
}

/* ===== Navbar — Frosted Glass ===== */
.navbar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border) !important;
    box-shadow: 0 1px 30px rgba(11, 25, 48, 0.06);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700 !important;
}

.silk-nav .nav-link {
    font-weight: 600;
    font-size: 15px;
    padding: 12px 20px !important;
    color: var(--heading-text);
    font-family: 'Exo', sans-serif;
    text-transform: capitalize;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 2px;
}

.silk-nav .nav-link:hover {
    color: var(--mulberry) !important;
    background: rgba(107, 45, 91, 0.06);
}

.silk-nav .nav-link.active {
    background: linear-gradient(135deg, var(--navy), var(--mulberry));
    color: #fff !important;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(34, 58, 102, 0.25);
    position: relative;
    overflow: hidden;
}

/* Silk sheen sweep on active nav */
.silk-nav .nav-link.active::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: var(--silk-sheen);
    animation: silkShimmer 2s ease 0.5s forwards;
    pointer-events: none;
}

.dropdown-item:hover {
    background: rgba(201, 168, 76, 0.08);
    color: var(--navy);
}

/* ===== Button Overrides — Gradient Silk ===== */
.btn {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.75rem 2rem;
    font-family: 'Exo', sans-serif;
    text-transform: uppercase;
    border-radius: 10px;
    border: none;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

/* Silk shimmer sweep on hover */
.btn-primary::after, .btn-main::after, .btn-main-2::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: var(--silk-sheen);
    transition: none;
    pointer-events: none;
}

.btn-primary:hover::after, .btn-main:hover::after, .btn-main-2:hover::after {
    animation: silkShimmer 0.6s ease forwards;
}

@keyframes silkShimmer {
    from { left: -100%; }
    to   { left: 100%; }
}

.btn-round-full {
    border-radius: 50px;
}

.btn-primary, .btn-main {
    background: linear-gradient(135deg, var(--navy) 0%, var(--mulberry) 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(34, 58, 102, 0.25);
}

.btn-primary:hover, .btn-primary:focus,
.btn-main:hover {
    background: linear-gradient(135deg, var(--mulberry) 0%, var(--pink) 100%);
    color: #fff;
    box-shadow: 0 6px 25px rgba(107, 45, 91, 0.35);
    transform: translateY(-2px);
}

.btn-primary:active, .btn-main:active {
    background: linear-gradient(135deg, var(--mulberry-deep), var(--pink-dark));
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(107, 45, 91, 0.3);
}

/* Silk ripple on click */
.btn-primary:active::after, .btn-main:active::after, .btn-main-2:active::after {
    animation: silkRipple 0.4s ease-out;
}

@keyframes silkRipple {
    0%   { left: 0; background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 60%); transform: scale(0.3); opacity: 1; }
    100% { left: 0; background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 60%); transform: scale(2.5); opacity: 0; }
}

.btn-main-2 {
    background: linear-gradient(135deg, var(--pink) 0%, var(--mulberry) 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(225, 36, 84, 0.2);
}

.btn-main-2:hover {
    background: linear-gradient(135deg, var(--navy), var(--mulberry));
    color: #fff;
    transform: translateY(-2px);
}

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

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--navy), var(--mulberry));
    border-color: transparent;
    color: #fff;
}

/* ===== Card Overrides — Glass Morphism ===== */
.card {
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    border-radius: 16px 16px 0 0 !important;
    font-weight: 600;
    background: rgba(201, 168, 76, 0.06);
    border-bottom: 1px solid var(--glass-border);
}

a.card, .card-clickable {
    text-decoration: none;
    cursor: pointer;
}

a.card:hover, .card-clickable:hover {
    transform: perspective(600px) rotateX(1.5deg) translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

/* ===== Form Overrides — Gold Focus ===== */
.form-control, .form-select {
    border-radius: 10px;
    border: 1.5px solid #d8dce5;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.25s ease;
}

.form-control-lg, .form-select-lg {
    min-height: 48px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.12);
    background: #fff;
}

input[type=email],
input[type=password],
input[type=text],
input[type=tel] {
    box-shadow: none;
    height: 48px;
    outline: none;
    font-size: 15px;
}

.form-select {
    height: 48px !important;
}

.form-check-input[type="radio"] {
    border-radius: 50% !important;
    width: 1.375em;
    height: 1.375em;
    background-color: #eaedf5;
}

.form-check-input:checked {
    background-color: var(--gold);
    border-color: var(--gold);
}

.form-control::file-selector-button {
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(201,168,76,0.08), rgba(201,168,76,0.15));
    color: var(--navy);
    border: none;
    border-radius: 8px 0 0 8px;
    font-weight: 500;
}

form label, .form-label {
    font-weight: 600;
    color: var(--heading-text);
    margin-bottom: 6px;
    font-size: 14px;
    letter-spacing: 0.01em;
}

/* ===== Tables ===== */
.table thead.table-dark th {
    background: linear-gradient(135deg, var(--silk-deep), var(--navy));
    border-color: var(--navy-dark);
}

/* ===== Page Title (Form Pages) — Rich Gradient ===== */
.page-title {
    position: relative;
    padding: 50px 0;
    background: linear-gradient(135deg, var(--silk-deep) 0%, var(--navy) 40%, var(--mulberry) 100%);
    overflow: hidden;
}

.page-title::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 40px,
        rgba(201, 168, 76, 0.03) 40px,
        rgba(201, 168, 76, 0.03) 41px
    );
    pointer-events: none;
}

/* Zari border on page title bottom */
.page-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 3px;
    background: var(--zari-border);
}

.page-title .overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: transparent;
}

.page-title h1,
.page-title h2 {
    color: #fff;
    font-family: 'Playfair Display', serif;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

/* ===== Banner / Hero Section ===== */
.banner-section {
    line-height: 0;
    position: relative;
    overflow: hidden;
}

.banner-section img {
    display: block;
    width: 100%;
    height: auto;
}

/* Cinematic gradient overlay on banner bottom */
.banner-section::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 45%;
    background: linear-gradient(to top,
        rgba(11, 25, 48, 0.5) 0%,
        rgba(11, 25, 48, 0.1) 60%,
        transparent 100%
    );
    pointer-events: none;
}

/* Warm gold tint overlay */
.banner-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* ===== Announcement Bar — Gold Tint ===== */
.announcement-bar {
    background: linear-gradient(90deg,
        rgba(201, 168, 76, 0.06),
        rgba(201, 168, 76, 0.12),
        rgba(201, 168, 76, 0.06)
    );
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
    padding: 12px 0;
}

.announcement-bar .announcement-label {
    font-weight: 700;
    font-size: 15px;
    color: var(--mulberry);
}

.announcement-bar marquee {
    font-size: 16px;
    font-weight: 500;
    color: #3A3A4A;
}

.announcement-bar marquee a {
    color: var(--navy);
    text-decoration: none;
    font-weight: 600;
}

.announcement-bar marquee a:hover {
    color: var(--mulberry);
    text-decoration: underline;
}

/* ===== Divider — Zari Accent ===== */
.divider-red {
    width: 50px;
    height: 3px;
    background: var(--zari-border);
    margin-bottom: 18px;
    border-radius: 2px;
    position: relative;
}

/* ===== Note Section — Card Style ===== */
.note-section {
    padding: 55px 0 40px;
}

.note-section h3 {
    font-size: 1.8rem;
    color: var(--heading-text);
    margin-bottom: 8px;
}

.note-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.note-list li {
    font-size: 15px;
    font-weight: 500;
    color: #3A3A4A;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    border-left: 3px solid var(--gold);
    box-shadow: 0 2px 12px rgba(11, 25, 48, 0.04);
    transition: all 0.3s ease;
}

.note-list li:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(11, 25, 48, 0.08);
    border-left-color: var(--mulberry);
}

.note-list li i {
    color: var(--gold);
    font-size: 20px;
    margin-right: 14px;
    margin-top: 1px;
    flex-shrink: 0;
}

.note-green {
    color: var(--govt-green) !important;
    font-weight: 600;
    text-align: justify;
}

/* ===== Guidelines Section — Warm Silk ===== */
.guidelines-section {
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 40px,
            rgba(201, 168, 76, 0.02) 40px,
            rgba(201, 168, 76, 0.02) 41px
        ),
        linear-gradient(170deg, var(--ivory-mid) 0%, var(--ivory) 40%, var(--ivory-dark) 100%);
    padding: 70px 0 60px;
    position: relative;
}

/* Silk wave divider at top */
.guidelines-section::before {
    content: '';
    position: absolute;
    top: -1px; left: 0;
    width: 100%; height: 40px;
    background: var(--ivory);
    clip-path: ellipse(55% 100% at 50% 0%);
    z-index: 1;
}

.guidelines-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--heading-text);
    font-family: 'Playfair Display', serif;
}

.guidelines-section .accordion-item {
    border: 1px solid var(--glass-border);
    border-radius: 12px !important;
    margin-bottom: 10px;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.guidelines-section .accordion-button {
    font-family: 'Exo', sans-serif;
    font-weight: 600;
    font-size: 15px;
    padding: 18px 24px;
    border-radius: 12px !important;
}

.guidelines-section .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, rgba(34, 58, 102, 0.06), rgba(107, 45, 91, 0.04));
    color: var(--navy);
    box-shadow: none;
}

.guidelines-section .accordion-button::after {
    background-size: 1rem;
}

.guidelines-section .hindi-text {
    color: var(--mulberry);
}

.guidelines-section ol {
    padding-left: 20px;
}

.guidelines-section ol li {
    margin-bottom: 10px;
    line-height: 1.8;
}

/* ===== Quarterly Reports ===== */
.quarterly-reports {
    padding: 35px 0;
}

.quarterly-reports blockquote {
    font-size: 15px;
    color: #3A3A4A;
    padding: 24px 28px;
    border-left: 4px solid var(--gold);
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border-radius: 0 14px 14px 0;
    box-shadow: 0 2px 15px rgba(11, 25, 48, 0.04);
}

.quarterly-reports blockquote a {
    color: var(--mulberry);
    font-size: 16px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.quarterly-reports blockquote a:hover {
    color: var(--pink);
}

/* ===== Footer — Dark Elegant ===== */
footer.site-footer {
    background: linear-gradient(150deg, var(--silk-deep) 0%, #0F1D35 50%, var(--mulberry-deep) 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: 40px 35px 15px 35px;
    font-size: 0.9rem;
    position: relative;
}

/* Gold zari border at top of footer */
footer.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: var(--zari-border);
}

footer.site-footer h6 {
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    font-family: 'Exo', sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.footer-divider {
    width: 42px;
    height: 3px;
    background: var(--zari-border);
    margin-bottom: 16px;
    border-radius: 2px;
}

.footer-logo {
    max-height: 60px;
    border-radius: 6px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 2.2;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: all 0.25s ease;
    font-size: 0.88rem;
}

.footer-links a:hover {
    color: var(--gold-light);
    padding-left: 6px;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 2.2;
    transition: all 0.25s ease;
}

.footer-menu li a:hover {
    color: var(--gold-light);
}

.footer-contact-block {
    font-size: 0.85rem;
}

.footer-contact-block strong {
    color: var(--gold);
    display: block;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.footer-contact-block p {
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
}

.footer-contact-block i {
    color: var(--gold-pale);
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid rgba(201, 168, 76, 0.4);
    color: var(--gold);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--silk-deep);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(201, 168, 76, 0.3);
}

/* APK download links — gold shimmer text */
.apk-link {
    background: linear-gradient(-45deg, var(--gold-dark), var(--gold-light), var(--gold-pale), var(--gold-light));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: apkGradient 3s ease infinite;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 4px;
}

@keyframes apkGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

footer .footer-bottom {
    border-top: 1px solid rgba(201, 168, 76, 0.15);
    padding-top: 15px;
    margin-top: 25px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ===== Back to Top — Gold Accent ===== */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--navy), var(--mulberry));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(11, 25, 48, 0.2);
    border: 1px solid rgba(201, 168, 76, 0.2);
}

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

.back-to-top:hover {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
    color: var(--silk-deep);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.3);
}

/* ===== HTMX Indicators ===== */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-block;
}

.htmx-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Thread-pull loading line for HTMX requests */
.htmx-request {
    position: relative;
}

.htmx-request::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-light), var(--gold), var(--gold-light), transparent);
    animation: threadPull 1s ease-in-out infinite;
    border-radius: 2px;
}

@keyframes threadPull {
    0%   { left: 0;   width: 0; }
    50%  { left: 0;   width: 100%; }
    100% { left: 100%; width: 0; }
}

/* ===== Admin Sidebar Active ===== */
.sidebar .nav-link.active {
    background: linear-gradient(135deg, rgba(201,168,76,0.15), rgba(201,168,76,0.08));
    border-radius: 8px;
    color: #fff !important;
    border-left: 3px solid var(--gold);
}

/* ===== Admin Navbar Override ===== */
.navbar.bg-primary {
    background: linear-gradient(135deg, var(--silk-deep), var(--navy)) !important;
}

/* ===== Badges ===== */
.badge {
    font-weight: 600;
    font-size: 0.78rem;
    border-radius: 8px;
    letter-spacing: 0.02em;
}

/* ===== Accordion (admin detail) ===== */
.accordion-item {
    border-radius: 12px !important;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.accordion-button {
    border-radius: 12px !important;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, rgba(34, 58, 102, 0.04), rgba(107, 45, 91, 0.03));
    color: var(--navy);
    box-shadow: none;
}

/* Saree fold/unfold — 3D fabric drape on accordion expand */
.accordion-collapse {
    transform-origin: top center;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.accordion-collapse:not(.show) {
    transform: perspective(800px) rotateX(-6deg);
    opacity: 0.7;
}

.accordion-collapse.show,
.accordion-collapse.collapsing {
    transform: perspective(800px) rotateX(0deg);
    opacity: 1;
}

/* ===== Alerts — Refined ===== */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* ===== Accessibility: Respect reduced motion preference ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ===== Responsive: Mobile ===== */
/* ===== Tablet ===== */
@media (max-width: 991px) {
    /* Navbar collapse: stack links vertically */
    .silk-nav .nav-link {
        padding: 12px 16px !important;
        margin: 2px 0;
        border-radius: 8px;
    }

    .silk-nav .nav-link.active {
        border-radius: 8px;
    }

    .navbar-collapse {
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 0 0 16px 16px;
        padding: 8px 12px;
        margin-top: 8px;
        border: 1px solid var(--glass-border);
        box-shadow: 0 8px 30px rgba(11, 25, 48, 0.1);
    }

    /* Announcement bar — stack label above marquee */
    .announcement-bar .row {
        flex-direction: column;
    }

    .announcement-bar .col-lg-2,
    .announcement-bar .col-md-3 {
        width: 100%;
        margin-bottom: 4px;
    }

    .announcement-bar .col-lg-10,
    .announcement-bar .col-md-9 {
        width: 100%;
    }
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .btn, .form-control, .form-select, .nav-link {
        min-height: 48px;
    }

    .btn {
        font-size: 0.95rem;
        padding: 0.6rem 1rem;
    }

    h1 { font-size: 1.5rem; }
    h2, .h2 { font-size: 1.3rem; line-height: 1.4; }
    h3 { font-size: 1.15rem; }

    /* Banner: maintain aspect on narrow screens */
    .banner-section img {
        min-height: 180px;
        object-fit: cover;
    }

    /* Banner overlay: less dramatic on mobile */
    .banner-section::after {
        height: 35%;
    }

    /* Note section */
    .note-section {
        padding: 35px 0 25px;
    }

    .note-section h3 {
        font-size: 1.4rem;
    }

    .note-list li {
        padding: 14px 16px;
        margin-bottom: 10px;
        font-size: 14px;
    }

    .note-list li i {
        font-size: 18px;
        margin-right: 10px;
    }

    /* Guidelines */
    .guidelines-section {
        padding: 45px 0 35px;
    }

    .guidelines-section::before {
        height: 22px;
    }

    .guidelines-heading {
        font-size: 1.2rem;
    }

    .guidelines-section .accordion-button {
        font-size: 14px;
        padding: 14px 16px;
    }

    .guidelines-section ol li {
        font-size: 14px;
        line-height: 1.7;
    }

    /* Quarterly reports */
    .quarterly-reports blockquote {
        padding: 16px 18px;
        font-size: 14px;
    }

    /* Page title (form pages) */
    .page-title {
        padding: 30px 0;
    }

    .page-title h1,
    .page-title h2 {
        font-size: 1.1rem !important;
    }

    /* Footer: stack columns, left-align */
    footer.site-footer {
        padding: 30px 20px 15px;
    }

    footer.site-footer .row > div {
        text-align: left;
        margin-bottom: 1.5rem;
    }

    .footer-socials {
        justify-content: flex-start;
    }

    .footer-logo {
        max-height: 50px;
    }

    .footer-contact-block {
        font-size: 0.8rem;
    }

    footer .footer-bottom {
        text-align: center;
    }

    footer .footer-bottom .d-flex {
        flex-direction: column;
        gap: 4px;
    }

    /* Contact bar */
    .header-info-list li {
        font-size: 11px;
        margin-right: 6px;
        padding: 6px 6px 6px 0;
    }

    /* Cards: reduce glass intensity on low-end devices */
    .card, .note-list li, .guidelines-section .accordion-item {
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    /* Back to top: smaller on mobile */
    .back-to-top {
        width: 42px;
        height: 42px;
        bottom: 20px;
        right: 20px;
        border-radius: 12px;
    }
}

/* ===== Small phones ===== */
@media (max-width: 480px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .note-list li {
        padding: 12px 14px;
    }

    .guidelines-section .accordion-button {
        font-size: 13px;
        padding: 12px 14px;
    }

    .announcement-bar marquee {
        font-size: 14px;
    }

    footer.site-footer h6 {
        font-size: 0.85rem;
    }
}
