/* Shared Header and Footer Styles */

/*
 * IMPORTANT: For all HTML pages in this project, include the following favicon link in the <head> section:
 * <link rel="icon" type="image/jpeg" href="logo/RM ICON RGB.jpg">
 * This ensures consistent branding across all pages.
 */

/* Header Styles */
.header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 2px 20px rgba(0, 55, 80, 0.1);
    border-bottom: 1px solid rgba(0, 55, 80, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.logo img {
    height: 35px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #003750;
    white-space: nowrap;
    line-height: 1.2;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
    display: block;
    padding: 10px 0;
    white-space: nowrap;
}

.nav-menu li a:hover {
    color: #003750;
}

.nav-menu li a.active {
    color: #003750;
}

.nav-menu li a.active::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #003750;
}

/* Dropdown Styles */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    min-width: 280px;
    box-shadow: 0 15px 35px rgba(0, 55, 80, 0.12), 0 5px 15px rgba(0, 0, 0, 0.07);
    border-radius: 12px;
    border: 1px solid rgba(0, 55, 80, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    padding: 8px 0;
    backdrop-filter: blur(10px);
}

.nav-menu li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    position: relative;
    margin: 2px 8px;
    border-radius: 8px;
}

.dropdown-item::before {
    content: '▶';
    font-size: 0.7rem;
    color: #5A9DB9;
    margin-right: 12px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-5px);
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    color: #003750;
    border-left-color: #5A9DB9;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(90, 157, 185, 0.15);
}

.dropdown-item:hover::before {
    opacity: 1;
    transform: translateX(0);
    color: #5A9DB9;
}

.dropdown-item:first-child {
    margin-top: 6px;
}

.dropdown-item:last-child {
    margin-bottom: 6px;
}

/* Mobile nav toggle button (hidden on desktop) */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(0, 55, 80, 0.25);
    color: #003750;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    font-weight: 600;
}
.nav-toggle:focus { outline: 2px solid #5A9DB9; outline-offset: 2px; }

/* Footer Styles */
.footer {
    background: #003750;
    color: white;
    text-align: center;
    padding: 40px 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
    text-align: left;
}

.footer-section h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.6;
    margin: 0;
}

.footer-section ul {
    list-style: none;
    opacity: 0.8;
    line-height: 1.8;
    margin: 0;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 5px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    opacity: 0.8;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
        gap: 15px;
    }
    
    .logo {
        justify-content: center;
    }
    
    /* Show hamburger, hide menu by default on mobile */
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        padding-bottom: 8px;
    }
    .header.menu-open .nav-menu { display: flex; }
    
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        min-width: auto;
        padding: 0;
        margin-top: 10px;
    }
    
    .dropdown-item {
        padding: 8px 0;
        margin: 0;
        border-left: none;
        background: transparent;
    }
    
    .dropdown-item:hover {
        background: transparent;
        transform: none;
        box-shadow: none;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 10px 15px;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    .nav-menu {
        gap: 15px;
    }
    
    .nav-menu li a {
        font-size: 0.9rem;
    }
    
    .footer {
        padding: 30px 0;
    }
    
    .footer-content {
        padding: 0 15px;
    }
}
