/* ============================================
   AMAI MANABILANG MUNICIPAL E-GOVERNMENT PORTAL
   Main Stylesheet
   ============================================ */

:root {
    --primary-blue: #0a2463;
    --secondary-blue: #1e3a8a;
    --accent-gold: #c9a84c;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --dark: #1a1a2e;
    --text-muted: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    overflow-x: hidden;
}

/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
    background: var(--primary-blue);
    color: white;
    padding: 5px 0;
    font-size: 13px;
}

.top-bar a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    margin: 0 10px;
    transition: 0.3s;
}

.top-bar a:hover {
    color: white;
}

/* ============================================
   MAIN NAVIGATION
   ============================================ */
.main-nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px 0;
}

.main-nav .navbar-brand {
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 1.4rem;
}

.main-nav .navbar-brand img {
    height: 60px;
    margin-right: 10px;
}

.main-nav .nav-link {
    color: var(--dark);
    font-weight: 500;
    padding: 10px 20px;
    transition: 0.3s;
    position: relative;
}

.main-nav .nav-link:hover {
    color: var(--primary-blue);
}

.main-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--accent-gold);
    transition: 0.3s;
    transform: translateX(-50%);
}

.main-nav .nav-link:hover::after,
.main-nav .nav-link.active::after {
    width: 60%;
}

.main-nav .nav-link.active {
    color: var(--primary-blue);
}

.btn-apply {
    background: var(--accent-gold);
    color: white;
    border-radius: 50px;
    padding: 10px 30px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-apply:hover {
    background: #b8963a;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 168, 76, 0.3);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-title span {
    color: var(--accent-gold);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.hero-stats .stat-item {
    text-align: center;
}

.hero-stats .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.hero-stats .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ============================================
   QUICK LINKS
   ============================================ */
.quick-links {
    padding: 60px 0;
    background: white;
}

.quick-link-card {
    background: var(--light-bg);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: 0.3s;
    cursor: pointer;
    height: 100%;
    border: 2px solid transparent;
}

.quick-link-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.quick-link-card i {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
}

.quick-link-card h5 {
    font-weight: 600;
    color: var(--dark);
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
    margin-bottom: 40px;
}

.section-header h2 {
    font-weight: 700;
    color: var(--primary-blue);
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-gold);
    border-radius: 2px;
}

/* ============================================
   ANNOUNCEMENTS
   ============================================ */
.announcement-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid var(--accent-gold);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.announcement-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.announcement-item .badge {
    background: var(--primary-blue);
    color: white;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 40px 0;
}

.page-header h1 {
    font-weight: 700;
}

.page-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 10px 0 0;
}

.page-header .breadcrumb-item a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.page-header .breadcrumb-item.active {
    color: var(--accent-gold);
}

/* ============================================
   APPLICATION FORM STEPS
   ============================================ */
.form-step {
    display: none;
    animation: fadeIn 0.5s;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ddd;
    z-index: 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ddd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 10px;
    transition: 0.3s;
}

.step-item.active .step-number {
    background: var(--primary-blue);
}

.step-item.completed .step-number {
    background: #28a745;
}

.step-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #888;
}

.step-item.active .step-label {
    color: var(--primary-blue);
}

/* ============================================
   TRACKING
   ============================================ */
.tracking-section {
    padding: 60px 0;
    background: var(--light-bg);
}

.tracking-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.tracking-status {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    position: relative;
}

.tracking-status::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: #ddd;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.status-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #ddd;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.status-item.completed .status-dot {
    background: #28a745;
    box-shadow: 0 0 0 2px #28a745;
}

.status-item.active .status-dot {
    background: var(--primary-blue);
    box-shadow: 0 0 0 2px var(--primary-blue);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ============================================
   DEPARTMENTS
   ============================================ */
.department-card {
    transition: 0.3s;
}

.department-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.department-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.department-icon i {
    font-size: 2.5rem;
    color: var(--primary-blue);
}

/* ============================================
   OFFICIALS
   ============================================ */
.official-card {
    transition: 0.3s;
    overflow: hidden;
}

.official-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.official-image {
    overflow: hidden;
    height: 250px;
}

.official-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   NEWS
   ============================================ */
.news-card {
    transition: 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.news-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.news-item:last-child {
    border-bottom: none;
}

/* ============================================
   FORMS
   ============================================ */
.form-card {
    transition: 0.3s;
    cursor: pointer;
}

.form-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.form-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* ============================================
   CONTACT
   ============================================ */
.contact-card {
    transition: 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.contact-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.8rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--primary-blue);
    color: white;
    padding: 60px 0 30px;
}

.footer h5 {
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: 20px;
}

.footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: 0.3s;
    display: block;
    margin-bottom: 10px;
}

.footer a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 40px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

.text-gold {
    color: var(--accent-gold);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-stats .stat-number {
        font-size: 2rem;
    }
    
    .step-indicator {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .step-indicator::before {
        display: none;
    }
    
    .tracking-status {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .tracking-status::before {
        display: none;
    }
    
    .top-bar .col-md-6 {
        text-align: center !important;
    }
    
    .top-bar .col-md-6:last-child {
        margin-top: 5px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .quick-link-card {
        padding: 20px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-blue);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gold {
    color: var(--accent-gold);
}

.bg-gold {
    background: var(--accent-gold);
}

.btn-gold {
    background: var(--accent-gold);
    color: white;
    border: none;
}

.btn-gold:hover {
    background: #b8963a;
    color: white;
}

.shadow-hover {
    transition: 0.3s;
}

.shadow-hover:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}


/* Mobile Dropdown Fix */
@media (max-width: 991.98px) {
    .navbar-nav .dropdown-menu {
        background: #f8f9fa;
        border: none;
        padding-left: 20px;
    }
    
    .navbar-nav .dropdown-item {
        padding: 8px 15px;
        color: #333;
        border-radius: 5px;
    }
    
    .navbar-nav .dropdown-item:hover {
        background: #e9ecef;
    }
    
    .navbar-nav .dropdown-item:active {
        background: #dee2e6;
    }
    
    /* Ensure dropdown toggle works on mobile */
    .navbar-nav .dropdown-toggle::after {
        float: right;
        margin-top: 8px;
    }
}

/* For all devices - ensure dropdown works */
.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}