/* Shared Header Styles for Tendra Website */

/* Header */
header {
    background: var(--primary-color);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 40px;
    width: 40px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a,
.nav-links .dropdown-toggle {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 0.7rem;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 180px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none;
    z-index: 1001;
}

/* Invisible bridge to prevent menu from closing */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

@media (hover: hover) {
    .dropdown:hover .dropdown-menu {
        display: block;
    }
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-dark) !important;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: var(--bg-light);
    opacity: 1 !important;
}

/* Header CTA Button */
.header-cta-btn {
    background: white;
    color: var(--primary-color);
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background: rgba(255, 255, 255, 0.95);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: 0.3s;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a,
    .nav-links .dropdown-toggle {
        display: block;
        padding: 0.75rem 1rem;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.1);
        margin-top: 0.5rem;
        display: none;
    }

    .dropdown-menu a {
        color: white !important;
        padding-left: 2rem;
    }

    .dropdown-menu a:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    .header-cta-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
        margin-left: auto;
        margin-right: 0.75rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /* Show dropdown menu on click in mobile */
    .dropdown.active .dropdown-menu {
        display: block !important;
    }

    /* Add arrow indicator for dropdown */
    .dropdown-toggle {
        position: relative;
    }
}

@media (max-width: 480px) {
    .logo span {
        font-size: 1.4rem;
    }

    .logo img {
        height: 35px;
        width: 35px;
    }
}
