/* --- Header & Navigation --- */
.main-header {
    background-color: #ffffff;
    padding: 0 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 18px 0;
    display: block;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: #007bff;
}

/* Mobile Menu Icon (CSS Only) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 20; /* Above the mobile-nav */
}

.menu-toggle .line {
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: all 0.3s linear;
    transform-origin: left center;
}

/* Menu toggle animation */
.menu-toggle.open .line:nth-child(1) {
    transform: rotate(45deg);
    width: 120%;
}
.menu-toggle.open .line:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}
.menu-toggle.open .line:nth-child(3) {
    transform: rotate(-45deg);
    width: 120%;
}

/* Mobile Navigation Menu */
.mobile-nav {
    display: block; /* Change from none to block */
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    height: 0; /* Initial state, no height */
    overflow: hidden; /* Hide overflow */
    transition: height 0.3s ease-in-out; /* Transition for height */
    z-index: 10;
}

.mobile-nav.open {
    height: 130px; /* Adjust this value based on your content height */
}

.mobile-nav .nav-links {
    flex-direction: column;
    text-align: center;
    padding: 10px 0;
}

.mobile-nav .nav-links li {
    margin: 0;
}

.mobile-nav .nav-links a {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.mobile-nav .nav-links a:last-child {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
}