/* 
 * common.css - Shared styles for header and footer
 * Include this in all your pages along with your main CSS
 */

/* ===== GLOBAL COLOR VARIABLES ===== */
:root {
    --primary: #004D7F;
    --secondary: #0078C2;
    --accent: #00ADB5;
    --dark-blue: #002A47;
    --medium-blue: #003A61;
    --light-blue: #E1F5FF;
    --teal: #00ADB5;
    --yellow: #FFC107;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
}

/* ===== HEADER STYLES ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 150px;
    gap: 20px;
    max-width: 1200px;
    margin-right: 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 70px;
    margin-right: 10px;
    transition: transform 0.3s cubic-bezier(.4,2,.6,1), box-shadow 0.3s;
}

.logo-image:hover {
    transform: scale(1.1);
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.highlight {
    color: var(--teal);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: var(--gray-800);
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--accent);
}

.nav-button {
    background-color: var(--teal);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-button:hover {
    background-color: var(--primary);
    transform: translateY(-2px);
    color: var(--white);
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary);
    width: 300px;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
}

.dropdown-toggle i {
    margin-left: 5px;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

/* Mega dropdown menu - horizontal layout */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%; /* Center horizontally */
    transform: translateX(-50%) translateY(10px); /* Fine-tune centering */
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 20px;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    width: auto;
}

/* Center the menu and handle edge cases */
.dropdown:first-child .dropdown-menu {
    left: 0;
    transform: translateY(10px);
}

.dropdown:last-child .dropdown-menu {
    right: 0;
    left: auto;
    transform: translateY(10px);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown:first-child:hover .dropdown-menu {
    transform: translateY(0);
}

.dropdown:last-child:hover .dropdown-menu {
    transform: translateY(0);
}

/* Horizontal layout for menu items */
.dropdown-menu li {
    margin: 0;
    padding: 0;
    width: calc(25% - 15px); /* Four columns with spacing */
    list-style: none;
}

/* Card-style menu items */
.dropdown-menu a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--gray-700);
    padding: 5px 0;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.334);
    border: 1px solid var(--gray-200);
}

.dropdown-menu a:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.274);
}

/* Large image thumbnail */
.dropdown-img-container {
    width: 170px;
    height: 170px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0;
}

.dropdown-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.dropdown-menu a:hover .dropdown-img {
    transform: scale(1.1);
}

/* Text container below image */
.dropdown-text {
    padding: 12px 10px;
    width: 100%;
    background-color: var(--white);
    font-weight: 500;
    position: relative;
    z-index: 2;
    border-top: 3px solid var(--teal);
    transition: all 0.3s ease;
}

.dropdown-menu a:hover .dropdown-text {
    color: var(--primary);
    background-color: var(--light-blue);
}

/* ===== FOOTER STYLES ===== */
.footer {
    background-color: var(--dark-blue);
    color: var(--gray-300);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 80px;
    margin-right: 10px;
}

.footer-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
}

.footer-about {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s;
}

.social-link:hover {
    background-color: var(--teal);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--teal);
    display: inline-block;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--gray-300);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--teal);
}

.footer-contact li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.footer-contact i {
    min-width: 20px;
    color: var(--teal);
    margin-right: 10px;
    margin-top: 5px;
}

.footer-contact span {
    font-size: 14px;
    line-height: 1.6;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 992px) {
    .header-container {
        margin-left: 20px;
    }
    
    .dropdown-menu {
        width: 90vw;
        max-width: 600px;
        flex-wrap: wrap;
    }
    
    .dropdown-menu li {
        width: calc(50% - 10px); /* Two columns on medium screens */
        margin-bottom: 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white);
        padding: 20px;
        transition: all 0.3s;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 15px 0;
    }
    
    .dropdown-menu {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none !important;
        box-shadow: none;
        background-color: var(--gray-100);
        padding: 10px;
        display: none;
        flex-direction: column; /* Vertical on mobile */
    }
    
    .dropdown.active .dropdown-menu {
        display: flex;
    }
    
    .dropdown-menu li {
        width: 100%; /* Full width on mobile */
        margin-bottom: 15px;
    }
    
    .dropdown-img-container {
        height: 120px;
    }
    
    .dropdown-text {
        padding: 8px;
    }
    
    /* Mobile footer adjustments */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-grid.mobile-footer {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .header-container {
        margin-left: 10px;
        margin-right: 10px;
    }
}