/* ==========================================================================
   NCSC Region 12 - Master Stylesheet
   ========================================================================== */

:root {
    --ncsc-site-blue: #0b1847;
    --ncsc-site-red: #820309;
    --ncsc-site-white: #ffffff;
}

html {
    scroll-behavior: smooth;
}

/* --- Global Body Styles (Main Portal & Development) --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)), url('National-Commission-of-Senior-Citizens.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #212529;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Specific Body Overrides --- */
/* For the Security Gatekeeper Page */
body.gatekeeper-body {
    background: linear-gradient(rgba(11, 24, 71, 0.9), rgba(11, 24, 71, 0.9)), url('National-Commission-of-Senior-Citizens.jpg') no-repeat center center fixed;
    background-size: cover;
    align-items: center;
    justify-content: center;
    margin: 0;
}

/* For the Announcements Admin Page */
body.admin-body {
    background-color: #f1f5f9;
    background-image: none;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Hero Banner & Header
   ========================================================================== */
.hero-banner {
    background: var(--ncsc-site-blue);
    border-bottom: 4px solid var(--ncsc-site-red);
    padding: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.hero-title {
    color: var(--ncsc-site-white);
    font-weight: 800;
    text-transform: uppercase;
}

.brand-logo {
    width: 65px;
    height: 65px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav-bar-custom {
    background-color: var(--ncsc-site-white);
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.nav-bar-custom .btn {
    font-weight: 600;
    color: var(--ncsc-site-blue);
    background-color: transparent;
    border: 2px solid var(--ncsc-site-blue);
    transition: all 0.3s ease;
    margin: 5px;
}

.nav-bar-custom .btn:hover {
    background-color: var(--ncsc-site-blue);
    color: var(--ncsc-site-white);
    border-color: var(--ncsc-site-blue);
}

/* ==========================================================================
   Cards & Content Containers
   ========================================================================== */
/* Gatekeeper Card */
.verify-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

/* Main Content Card */
.content-card {
    background: var(--ncsc-site-white);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    border-top: 6px solid var(--ncsc-site-blue);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    color: #212529;
    scroll-margin-top: 100px;
}

/* Admin & Login Cards (Announcements) */
.login-card, .admin-card {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-top: 6px solid var(--ncsc-site-blue);
    padding: 35px;
}

/* Development Notice Card */
.notice-card {
    background: var(--ncsc-site-white);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    border-top: 6px solid var(--ncsc-site-red);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 0 auto;
}

/* Feature Cards (Digital Services) */
.feature-card {
    background: var(--ncsc-site-white);
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--ncsc-site-red);
    border-radius: 6px;
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    color: #212529;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.feature-card h5 {
    color: var(--ncsc-site-blue);
    font-weight: 700;
}

.feature-card p {
    color: #64748b !important;
}

/* ==========================================================================
   Announcements Section
   ========================================================================== */
.announcement-wrapper {
    background: var(--ncsc-site-white);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 30px;
    scroll-margin-top: 100px;
}

.announcement-header {
    background: linear-gradient(135deg, var(--ncsc-site-red), #a01a21);
    color: var(--ncsc-site-white);
    padding: 12px 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.announcement-body {
    padding: 20px;
    color: #334155;
    line-height: 1.6;
    font-size: 0.95rem;
}

.announcement-body h1 { font-size: 2rem !important; font-weight: bold; }
.announcement-body h2 { font-size: 1.5rem !important; font-weight: bold; }
.announcement-body h3 { font-size: 1.25rem !important; font-weight: bold; }
.announcement-body ul { padding-left: 20px; list-style-type: disc; }
.announcement-body ol { padding-left: 20px; list-style-type: decimal; }
.announcement-body p { margin-bottom: 0.75rem; }

.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: #22c55e;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 rgba(34, 197, 94, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ==========================================================================
   Typography & Badges
   ========================================================================== */
.ra-title {
    color: var(--ncsc-site-blue);
    font-weight: 800;
    letter-spacing: 1px;
}

.ra-subtitle {
    color: var(--ncsc-site-red);
    font-weight: 700;
}

.section-header {
    background-color: var(--ncsc-site-red);
    color: var(--ncsc-site-white);
    border-radius: 8px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(130, 3, 9, 0.25);
}

.province-badge {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--ncsc-site-blue);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.province-badge h6 {
    color: var(--ncsc-site-blue);
    font-weight: 700;
}

.province-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.province-card-link:hover .province-badge {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--ncsc-site-blue);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-custom-back {
    background-color: var(--ncsc-site-blue);
    color: #ffffff;
    font-weight: 600;
    border: none;
    transition: background 0.2s;
}

.btn-custom-back:hover {
    background-color: var(--ncsc-site-red);
    color: #ffffff;
}

/* ==========================================================================
   Quill Editor (Announcements Admin)
   ========================================================================== */
#editor-container {
    height: 250px;
    background: #fff;
    font-size: 1rem;
}
.ql-toolbar.ql-snow {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    background-color: #f8fafc;
}
.ql-container.ql-snow {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: auto; /* Pushes footer to bottom if content is short */
}

/* ==========================================================================
   Responsive Media Queries (Phones, Tablets, Laptops)
   ========================================================================== */

/* Tablet & Large Phones (768px and down) */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.25rem !important;
    }
    .brand-logo {
        width: 50px;
        height: 50px;
    }
    .nav-bar-custom .btn {
        width: 100%;
        margin: 5px 0;
    }
    .rd, .admin-card, .login-card, .notice-card {
        padding: 20px !important;
    }
    .ra-title {
        font-size: 1.5rem !important;
    }
    .display-5 {
        font-size: 2rem;
    }
}

/* Small Phones (576px and down) */
@media (max-width: 576px) {
    .verify-card {
        padding: 1.5rem;
    }
    .hero-banner .d-flex {
        flex-direction: column;
        text-align: center !important;
    }
    .hero-banner .me-3 {
        margin-right: 0 !important;
        margin-bottom: 10px;
    }
    .hero-banner .text-md-end {
        margin-top: 15px;
        text-align: center !important;
    }
    .quick-nav-container .btn {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* Offset for sticky navigation bar anchor links */
#announcements, #coverage, #ra11982, #services {
    scroll-margin-top: 100px; 
}