/* ===========================
   MAAMATURANI PHARMACY HEADER
   RESPONSIVE ALL DEVICES
=========================== */

* {
    box-sizing: border-box;
}

:root {
    --header-primary: #075e54;
    --header-secondary: #0e9482;
    --header-dark: #080b3e;
    /* --header-accent: #f0a42c; */
    --header-white: #ffffff;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

/* ================= TOP HEADER ================= */

.top-header {
    width: 100%;
    background: var(--header-dark);
    color: #fff;
    padding: 12px 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    border-bottom: 3px solid var(--header-accent);
}

.web-text {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 22px;
}

.web-text p {
    margin: 0;
    font-size: 12px;
    color: white;
}

.web-text a,
.right-text a {
    color: #ffd15c;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: 0.3s;
}

.web-text a:hover,
.right-text a:hover {
    color: #ffffff;
}

.highlight-link {
    font-weight: 600;
}

.right-text {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 18px;
}

/* ================= MAIN HEADER ================= */

.main-header {
    width: 100%;
    background: #fff;
    position: relative;
    z-index: 1000;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.navbar-line {
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--header-primary),
        var(--header-secondary),
        var(--header-accent)
    );
}

.nav {
    width: 94%;
    max-width: 1400px;
    margin: auto;
    min-height: 95px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* LOGO */

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

.logo img {
    display: block;
    width: 270px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* DESKTOP MENU */

.menu {
    display: flex;
    align-items: center;
}

.lowerNav {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0;
    margin: 0;
}

.lowerNav > li {
    position: relative;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 13px 12px;
    border-radius: 6px;
    color: #18332e;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: 0.3s;
}

.menu-link i {
    font-size: 13px;
}

.menu-link:hover {
    background: #e8f6f2;
    color: var(--header-secondary);
}

/* DROPDOWN */

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 8px;
    display: none;
    z-index: 2000;
}

.dropdown-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-menu li a {
    display: block;
    color: #333;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 5px;
    font-size: 13px;
    transition: 0.3s;
}

.dropdown-menu li a:hover {
    background: #e8f6f2;
    color: var(--header-primary);
}

.dropdown:hover > .dropdown-menu {
    display: block;
}

/* ERP BUTTON */

.erp-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--header-primary);
    color: white !important;
    text-decoration: none;
    padding: 11px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    transition: 0.3s;
}

.erp-btn:hover {
    background: var(--header-secondary);
    transform: translateY(-2px);
}

/* HAMBURGER */

.hamburger {
    display: none;
    width: 48px;
    height: 45px;
    cursor: pointer;
    border: none;
    background: #fff4e4;
    border-radius: 12px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--header-accent);
    border-radius: 5px;
    transition: 0.3s;
}

/* ================= MOBILE MENU ================= */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 85%;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    background: #ffffff;
    z-index: 9999;
    padding: 70px 20px 30px;
    box-shadow: -5px 0 25px rgba(0,0,0,0.2);
    transition: right 0.35s ease;
}

.mobile-menu-overlay.active,
.mobile-menu-overlay.show {
    right: 0;
}

.close-menu {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #fff0df;
    color: var(--header-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-list > li {
    border-bottom: 1px solid #eeeeee;
}

.mobile-nav-list > li > a,
.dropdown-toggle-mobile > a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #18332e;
    text-decoration: none;
    padding: 15px 12px;
    font-size: 14px;
    font-weight: 500;
}

.mobile-nav-list a i {
    width: 20px;
    color: var(--header-primary);
}

.mobile-nav-list > li > a:hover,
.dropdown-toggle-mobile > a:hover {
    background: #e8f6f2;
}

/* MOBILE DROPDOWN */

.dropdown-toggle-mobile {
    cursor: pointer;
}

.dropdown-toggle-mobile > a {
    justify-content: space-between;
}

.mobile-dropdown-menu {
    display: none;
    background: #f5f9f8;
    padding: 5px 0 8px 20px;
}

.mobile-dropdown-menu.show {
    display: block;
}

.mobile-dropdown-menu a {
    display: block;
    padding: 12px 15px;
    color: #444;
    font-size: 13px;
    text-decoration: none;
}

.mobile-dropdown-menu a:hover {
    color: var(--header-primary);
    background: #e5f2ef;
}

/* MOBILE ERP */

.mobile-erp-btn {
    background: var(--header-primary) !important;
    color: white !important;
    margin: 15px 0;
    border-radius: 7px;
    justify-content: center;
}

.mobile-erp-btn i {
    color: white !important;
}

/* BACKGROUND OVERLAY */

.screen-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9998;
}

.screen-overlay.active,
.screen-overlay.show {
    display: block;
}

/* ================= TABLET ================= */

@media (max-width: 1200px) {

    .nav {
        width: 96%;
        gap: 12px;
    }

    .logo img {
        width: 220px;
    }

    .menu-link {
        padding: 12px 8px;
        font-size: 12px;
    }

    .lowerNav {
        gap: 0;
    }

    .erp-btn {
        padding: 10px 11px;
        font-size: 11px;
    }
}

/* ================= MOBILE ================= */

@media (max-width: 900px) {

    .top-header {
        display: block;
        padding: 12px 15px;
    }

    .web-text {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        justify-content: center;
    }

    .web-text p:first-child {
        grid-column: 1 / -1;
        text-align: center;
        font-size: 13px;
        font-weight: 600;
    }

    .web-text p {
        font-size: 11px;
        line-height: 1.6;
    }

    .web-text a {
        font-size: 11px;
    }

    .right-text {
        margin-top: 12px;
        padding-top: 10px;
        border-top: 1px solid rgba(255,255,255,0.15);
        justify-content: center;
        gap: 10px 15px;
    }

    .right-text a {
        font-size: 10px;
    }

    .nav {
        min-height: 75px;
        padding: 10px 0;
    }

    .logo img {
        width: 190px;
        max-width: 72vw;
    }

    .menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

/* ================= SMALL MOBILE ================= */

@media (max-width: 480px) {

    .top-header {
        padding: 10px 12px;
    }

    .web-text {
        gap: 9px;
    }

    .web-text p {
        font-size: 10px;
    }

    .web-text p:first-child {
        font-size: 12px;
    }

    .right-text {
        gap: 8px 12px;
    }

    .right-text a {
        font-size: 9px;
    }

    .nav {
        width: 94%;
        min-height: 68px;
    }

    .logo img {
        width: 160px;
    }

    .hamburger {
        width: 44px;
        height: 42px;
    }

    .hamburger span {
        width: 24px;
    }

    .mobile-menu-overlay {
        width: 280px;
    }
}

/* ================= VERY SMALL SCREEN ================= */

@media (max-width: 360px) {

    .web-text {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .web-text p:first-child {
        grid-column: auto;
    }

    .right-text {
        flex-direction: column;
        gap: 7px;
    }

    .logo img {
        width: 145px;
    }

    .hamburger {
        width: 40px;
        height: 40px;
    }
}
/* =================================
   MOBILE HEADER - COMPACT DESIGN
================================= */

@media (max-width: 768px) {

    /* Hide top header information */
    .top-header {
        display: none !important;
    }

    /* Compact main header */
    .main-header {
        background: #ffffff;
        width: 100%;
    }

    .navbar-line {
        height: 4px;
    }

    .nav {
        width: 94%;
        min-height: 82px;
        margin: auto;
        padding: 8px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Logo */
    .logo {
        display: flex;
        align-items: center;
    }

    .logo img {
        width: 175px;
        max-width: 70%;
        height: auto;
        object-fit: contain;
    }

    /* Hide desktop navigation */
    .menu {
        display: none !important;
    }

    /* Hamburger button */
    .hamburger {
        display: flex !important;
        width: 46px;
        height: 44px;
        background: #fff4e5;
        border-radius: 12px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 6px;
        border: none;
        cursor: pointer;
    }

    .hamburger span {
        width: 25px;
        height: 3px;
        background: #f5a623;
        border-radius: 10px;
    }

}

/* Small phones */

@media (max-width: 400px) {

    .nav {
        min-height: 75px;
    }

    .logo img {
        width: 155px;
    }

    .hamburger {
        width: 43px;
        height: 42px;
    }

}

/* =========================================
   DESKTOP HEADER COMPACT FIX
========================================= */

@media (min-width: 769px) {

    /* Top information bar */
    .top-header {
        padding: 8px 3%;
        min-height: 42px;
        gap: 12px;
    }

    .web-text {
        gap: 8px 18px;
    }

    .web-text p,
    .web-text a,
    .right-text a {
        font-size: 11px;
    }

    .right-text {
        gap: 8px 14px;
    }

    /* Main header height */
    .nav {
        width: 94%;
        max-width: 1250px;
        min-height: 85px;
        padding: 8px 0;
        gap: 15px;
    }

    /* Logo size */
    .logo img {
        width: 215px;
        max-width: 215px;
        height: auto;
    }

    /* Navbar spacing */
    .lowerNav {
        gap: 0;
    }

    .menu-link {
        padding: 10px 9px;
        font-size: 12px;
        gap: 5px;
    }

    .menu-link i {
        font-size: 12px;
    }

    /* ERP button */
    .erp-btn {
        padding: 9px 13px;
        font-size: 11px;
    }

}

/* Smaller desktop and tablets */
@media (min-width: 769px) and (max-width: 1100px) {

    .nav {
        width: 97%;
        min-height: 75px;
    }

    .logo img {
        width: 175px;
        max-width: 175px;
    }

    .menu-link {
        padding: 9px 6px;
        font-size: 11px;
    }

    .lowerNav {
        gap: 0;
    }

    .erp-btn {
        padding: 8px 9px;
        font-size: 10px;
    }

}
/* ==========================================
   EXTRA COMPACT DESKTOP HEADER
========================================== */

@media (min-width: 769px) {

    /* Top bar */
    .top-header {
        padding: 5px 2%;
        min-height: 34px;
    }

    .web-text {
        gap: 6px 12px;
    }

    .web-text p,
    .web-text a,
    .right-text a {
        font-size: 10px;
    }

    .right-text {
        gap: 6px 10px;
    }

    /* Main header */
    .nav {
        width: 96%;
        max-width: 1180px;
        min-height: 68px;
        padding: 5px 0;
        gap: 10px;
    }

    /* Smaller logo */
    .logo img {
        width: 200px;
        max-width: 180px;
    }

    /* Navbar */
    .lowerNav {
        gap: 0;
    }

    .menu-link {
        padding: 8px 7px;
        font-size: 15px;
        gap: 13px;
    }

    .menu-link i {
        font-size: 11px;
    }

    /* ERP */
    .erp-btn {
        padding: 7px 10px;
        font-size: 10px;
        border-radius: 5px;
    }

    /* Dropdown */
    .dropdown-menu {
        min-width: 190px;
    }

    .dropdown-menu li a {
        padding: 9px 12px;
        font-size: 11px;
    }
}

/* Extra compact for laptop screens */
@media (min-width: 769px) and (max-width: 1100px) {

    .nav {
        min-height: 62px;
    }

    .logo img {
        width: 155px;
        max-width: 155px;
    }

    .menu-link {
        padding: 20px 15px;
        font-size: 10px;
    }

    .erp-btn {
        padding: 6px 8px;
        font-size: 9px;
    }

}