/* Header Component */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header .document-btn {
    background-color: #f8f9fa;
    color: var(--primary-color, #007bff);
    padding: 10px 20px;
    border-radius: 5px;
    border: 2px solid var(--primary-color, #007bff);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.header .document-btn:hover {
    background-color: var(--primary-color, #007bff);
    color: #ffffff;
}

.header .contact-btn {
    background-color: var(--primary-color, #007bff);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.header .contact-btn:hover {
    background-color: var(--primary-color-dark, #0056b3);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo a {
    font-size: 24px;
    font-weight: 700;
    color: #1a2b3c;
    text-decoration: none;
}

.logo-image {
    height: 30px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #3498db;
}

.nav-contact {
    background: #3498db;
    color: white !important;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.nav-contact:hover {
    background: #2980b9;
}

/* --- CSS Only Hamburger Menu --- */

/* Hide the checkbox */
.hamburger-toggle-checkbox {
    display: none;
}

/* Style the hamburger icon container (the label) */
.hamburger-menu {
    display: none; /* Hide by default on desktop */
    cursor: pointer;
    padding: 0;
    border: none;
    background: transparent;
    z-index: 1001;
}

/* Style the bars of the hamburger icon */
.hamburger-menu-bar {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--text-color, #333);
    margin: 6px 0;
    transition: 0.4s;
}

/* Desktop navigation container */
.nav-wrapper {
    display: flex;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* 
      IMPORTANT FIX:
      Override external stylesheet (.main.css) that forces flex-direction: column.
      By using a more specific selector, we ensure the logo and hamburger icon are
      aligned horizontally.
    */
    .header .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    /* Show the hamburger menu icon on mobile */
    .hamburger-menu {
        display: block;
    }

    /* Hide the default desktop navigation */
    .nav-wrapper {
        display: none;
    }

    /* --- Mobile Overlay Menu Styles --- */

    /* When the checkbox is checked, show the nav-wrapper as a full-screen overlay */
    .hamburger-toggle-checkbox:checked ~ .nav-wrapper {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 80px;
        
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        z-index: 1000;
        overflow-y: auto;
    }

    /* Style the links inside the mobile overlay menu */
    .hamburger-toggle-checkbox:checked ~ .nav-wrapper .main-nav .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 0;
    }

    .hamburger-toggle-checkbox:checked ~ .nav-wrapper .nav-links li {
        margin: 8px 0;
        font-size: 1.1rem;
    }

    .hamburger-toggle-checkbox:checked ~ .nav-wrapper .nav-links a {
        padding: 8px 16px;
        display: block;
    }

    /* --- Animation for Hamburger to "X" --- */

    /* Position the "X" button fixed on the top right when menu is open */
    .hamburger-toggle-checkbox:checked + .hamburger-menu {
        position: fixed;
        right: 2rem;
        top: 1rem;
    }
    
    .hamburger-toggle-checkbox:checked + .hamburger-menu .hamburger-menu-bar:nth-child(1) {
        transform: rotate(-45deg) translate(-7px, 6px);
    }
    .hamburger-toggle-checkbox:checked + .hamburger-menu .hamburger-menu-bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger-toggle-checkbox:checked + .hamburger-menu .hamburger-menu-bar:nth-child(3) {
        transform: rotate(45deg) translate(-7px, -6px);
    }
}