/* ===================================
   Header Desktop Styles
   =================================== */

/* Body padding to compensate for fixed header - DESKTOP ONLY */
@media (min-width: 1366px) {
    body {
        padding-top: 80px;
        /* Adjust this value based on your header height */
    }
}

/* Header Container */
.header-desktop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: auto;
}

.header-desktop .container-max-width {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    height: 100%;
    /* Ensure container takes full height of header */
}

.logo-and-nav {
    display: flex;
}

/* Logo Section */
.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo img {
    width: 178px;
    height: 48px;
    object-fit: contain;
    filter: none;
    /* Logo shows in original colors on white background */
    transition: filter 0.3s ease;
}

.header-logo img:hover {
    filter: brightness(0.9);
    /* Slightly darker on hover */
}

/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    padding-left: 3rem;
}

.header-nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.header-nav-links a {
    color: #221F20;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
}

.header-nav-links a:hover {
    color: #FF9933;
}

.header-nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FF9933;
    transition: width 0.3s ease;
}

.header-nav-links a:hover::after {
    width: 100%;
}

/* Submenu Styles */
.header-nav-links .dropdown {
    position: relative;
}

.header-nav-links .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    padding: 8px 0;
    margin-top: 8px;
}

.header-nav-links .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-nav-links .dropdown-menu li {
    list-style: none;
}

.header-nav-links .dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #221F20;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.header-nav-links .dropdown-menu a:hover {
    background: #f8f9fa;
    color: #FF9933;
}

.header-nav-links .dropdown-menu a::after {
    display: none;
}

/* Buttons Section */
.header-buttons {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-direction: column;
    align-items: flex-end;
    padding: 20px 0 0 0;
}

.header-button-group {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.header-btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.header-btn-login {
    background: transparent;
    border: 2px solid #E78B3D;
    color: #E78B3D;
}

.header-btn-login:hover {
    background: rgba(255, 153, 51, 0.1);
    transform: translateY(-2px);
}

.header-btn-trial {
    background: #48A1A3;
    color: white;
    padding: 12px 24px;
}

.header-btn-trial:hover {
    background: #48A1A3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 185, 176, 0.3);
}

.header-trial-start {
    text-align: center;
}

.header-trial-note {
    color: #48A1A3;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}

/* Header scroll effect */
.header-desktop.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* .header-desktop.scrolled .container-max-width {
    padding: 32px 32px 16px;
} */

/* Sticky header logo consistency */
.sticky .logo-full {
    display: block !important;
}

.sticky .logo-icon {
    display: none !important;
}

.sticky .logo-icon-dark {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 1365px) {
    .header-nav-links {
        gap: 20px;
    }

    .header-nav-links a {
        font-size: 13px;
    }
}

@media (max-width: 1365px) {
    .header-desktop {
        display: none;
        /* Hide desktop header on mobile */
    }
}

/* Desktop specific styles (1366px and above) */
@media (min-width: 1366px) {
    body {
        padding-top: 80px;
        /* Ensure padding-top is applied on desktop */
    }

    .header-desktop {
        display: flex !important;
        position: fixed;
        height: auto;
    }
}

/* Mobile Navigation Styles */

.mobile-nav-links a {
    display: inline-block;
    text-gray-600 px-5 py-2 font-normal hover: text-gray-800;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-nav-links a:hover {
    color: #1f2937 !important;
}

.mobile-nav-links a.current-menu-item {
    font-weight: 600;
    text-decoration: underline;
}

/* Mobile menu button and navigation visibility */
.mobile-menu-btn {
    display: block;
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Mobile header logo - same size as desktop */
#navbar .logo-full {
    width: 178px;
    height: 48px;
    object-fit: contain;
}

/* Smaller logo for mobile devices (768px and below) */
@media (max-width: 768px) {
    #navbar .logo-full {
        width: 112px;
        height: 30px;
        object-fit: contain;
    }
}

/* Mobile header actions container (768px - 1365px) */
.mobile-header-actions {
    display: none;
    align-items: center;
    gap: 16px;
}

/* Tablet Header Fixed Position (768px - 1365px) */
@media (min-width: 768px) and (max-width: 1365px) {
    body {
        padding-top: 80px;
        /* Compensate for fixed tablet header */
    }

    #navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }
}

/* Mobile header buttons - same structure as desktop */
.mobile-header-buttons {
    display: none;
    /* Hidden by default */
    align-items: center;
    gap: 5px;
    flex-direction: column;
    align-items: flex-end;
    padding: 20px 0 0 0;
}

/* Tablet header buttons - for 768px-1365px breakpoint */
.tablet-header-buttons {
    display: none;
    /* Hidden by default */
    align-items: center;
    gap: 5px;
    flex-direction: column;
    align-items: flex-end;
    padding: 20px 0 0 0;
}

.mobile-header-button-group {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.tablet-header-button-group {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.mobile-header-btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.mobile-header-btn-login {
    background: transparent;
    border: 2px solid #E78B3D;
    color: #E78B3D;
}

.mobile-header-btn-login:hover {
    background: rgba(255, 153, 51, 0.1);
    transform: translateY(-2px);
}

.mobile-header-btn-trial {
    background: #48A1A3;
    color: white;
    padding: 12px 24px;
}

.mobile-header-btn-trial:hover {
    background: #48A1A3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 185, 176, 0.3);
}

.mobile-header-trial-start {
    text-align: center;
}

.mobile-header-trial-note {
    color: #48A1A3;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}

/* Tablet header button styles */
.tablet-header-btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.tablet-header-btn-login {
    background: transparent;
    border: 2px solid #E78B3D;
    color: #E78B3D;
}

.tablet-header-btn-login:hover {
    background: rgba(255, 153, 51, 0.1);
    transform: translateY(-2px);
}

.tablet-header-btn-trial {
    background: #48A1A3;
    color: white;
    padding: 12px 24px;
}

.tablet-header-btn-trial:hover {
    background: #48A1A3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 185, 176, 0.3);
}

.tablet-header-trial-start {
    text-align: center;
}

.tablet-header-trial-note {
    color: #48A1A3;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}

/* Mobile header buttons (767px and below) */
@media (max-width: 767px) {
    body {
        padding-top: 80px;
        /* Compensate for fixed mobile header */
    }
    
    #navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }
    
    .mobile-header-buttons {
        display: none !important;
        /* Hide buttons outside menu */
    }

    .mobile-header-actions {
        display: flex !important;
        /* Show actions container for hamburger button */
    }

    /* Show buttons only inside mobile nav menu */
    .mobile-nav .mobile-header-buttons {
        display: block !important;
    }
}

/* Mobile header actions (768px - 1365px) */
@media (min-width: 768px) and (max-width: 1365px) {
    .mobile-header-actions {
        display: flex !important;
        /* Show actions container */
    }

    .tablet-header-buttons {
        display: flex !important;
        /* Show tablet buttons in actions container */
    }
}

.mobile-menu-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
    color: #374151;
}

.mobile-nav {
    display: none !important;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
    padding: 16px;
    transition: all 0.3s ease;
    flex-direction: column;
    width: 100%;
}

/* Hide mobile header on desktop */
@media (min-width: 1366px) {
    #navbar {
        display: none;
    }

    .mobile-menu-btn {
        display: none !important;
    }

    .mobile-nav {
        display: none !important;
    }

    .mobile-nav.flex {
        display: none !important;
    }

    /* Sticky logo for desktop breakpoint */
    .sticky .logo-full {
        display: block !important;
    }

    .sticky .logo-icon {
        display: none !important;
    }

    .sticky .logo-icon-dark {
        display: none !important;
    }

    /* Ensure mobile logo is hidden on desktop */
    #navbar .logo-full {
        display: none !important;
    }

    /* Hide mobile header buttons on desktop */
    .mobile-header-buttons {
        display: none !important;
    }


}

/* Show mobile elements on screens <= 1365px */
@media (max-width: 1365px) {
    .mobile-menu-btn {
        display: block;
    }

    .mobile-nav {
        display: none;
        /* Hidden by default, shown via Alpine.js when menu is open */
    }

    .mobile-nav.flex {
        display: flex;
    }

    /* Clean mobile navigation styles */
    .mobile-nav {
        background: white;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        margin-top: 8px;
        padding: 16px;
        transition: all 0.3s ease;
    }

    .mobile-nav a {
        display: block;
        padding: 12px 16px;
        color: #374151;
        text-decoration: none;
        border-bottom: 1px solid #f3f4f6;
        transition: all 0.3s ease;
        font-weight: 500;
    }

    .mobile-nav a:hover {
        background: #f9fafb;
        color: #1f2937;
    }

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

    /* Mobile Header Buttons - Only for menu dropdown (≤ 767px) */
    .mobile-nav .mobile-header-buttons {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #f3f4f6;
    }

    .mobile-nav .mobile-header-btn {
        display: block;
        width: 100%;
        padding: 12px 16px;
        margin-bottom: 12px;
        border-radius: 8px;
        text-decoration: none;
        font-weight: 600;
        font-size: 14px;
        text-align: center;
        transition: all 0.3s ease;
        border: none;
        cursor: pointer;
    }

    .mobile-nav .mobile-header-btn-login {
        background: transparent;
        border: 2px solid #E78B3D;
        color: #E78B3D;
    }

    .mobile-nav .mobile-header-btn-login:hover {
        background: rgba(255, 153, 51, 0.1);
        transform: translateY(-2px);
    }

    .mobile-nav .mobile-header-btn-trial {
        background: #48A1A3;
        color: white;
        padding: 14px 16px;
    }

    .mobile-nav .mobile-header-btn-trial:hover {
        background: #48A1A3;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(72, 185, 176, 0.3);
    }

    .mobile-nav .mobile-header-trial-start {
        text-align: center;
    }

    .mobile-nav .mobile-header-trial-note {
        color: #48A1A3;
        font-size: 12px;
        opacity: 0.8;
        margin-top: 4px;
        text-align: center;
    }

    /* Override Tailwind classes for mobile menu functionality */
    .mobile-nav.hidden {
        display: none !important;
    }

    .mobile-nav.flex {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    /* Ensure mobile menu button works */
    .mobile-menu-btn {
        display: block !important;
    }

    /* Force mobile nav to be hidden by default on mobile */
    .mobile-nav:not(.flex) {
        display: none !important;
    }

    /* Sticky logo for mobile breakpoint */
    .sticky .logo-full {
        display: block !important;
    }

    .sticky .logo-icon {
        display: none !important;
    }

    .sticky .logo-icon-dark {
        display: none !important;
    }

    /* Ensure mobile logo is always visible */
    #navbar .logo-full {
        display: block !important;
        width: 178px;
        height: 48px;
        object-fit: contain;
    }

    /* Smaller logo for mobile devices (768px and below) */
    @media (max-width: 768px) {
        #navbar .logo-full {
            width: 112px !important;
            height: 30px !important;
            object-fit: contain;
        }
    }


}

@media (max-width: 480px) {
    .header-desktop .container-max-width {
        padding: 12px 16px;
    }

    .header-logo img {
        width: 140px;
        height: 38px;
    }
}

/* Custom breakpoint overrides for 1366px */
@media (max-width: 1365px) {

    /* Override Tailwind lg: classes to work with our custom breakpoint */
    .lg\\:py-4 {
        padding-top: 0;
        padding-bottom: 0;
    }

    .lg\\:flex-nowrap {
        flex-wrap: wrap;
    }

    .lg\\:my-0 {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .lg\\:mr-0 {
        margin-right: 0.5rem;
    }

    .lg\\:order-last {
        order: 0;
    }

    .lg\\:shadow-none {
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    }

    .lg\\:flex {
        display: none !important;
    }

    .lg\\:justify-end {
        justify-content: center;
    }

    .lg\\:flex-row {
        flex-direction: column;
    }

    .lg\\:w-auto {
        width: 100%;
    }

    .lg\\:hidden {
        display: block;
    }



    /* Handle md: classes for mobile */
    .md\\:flex-row {
        flex-direction: column;
    }

    .md\\:mr-4 {
        margin-right: 0;
    }

    .md\\:inline {
        display: none;
    }

    .md\\:absolute {
        position: static;
    }

    .md\\:-mt-1 {
        margin-top: 0;
    }

    .navbar-wrapper {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

@media (min-width: 1366px) {

    /* Show desktop elements and hide mobile elements */
    .lg\\:py-4 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .lg\\:flex-nowrap {
        flex-wrap: nowrap;
    }

    .lg\\:my-0 {
        margin-top: 0;
        margin-bottom: 0;
    }

    .lg\\:mr-0 {
        margin-right: 0;
    }

    .lg\\:order-last {
        order: 9999;
    }

    .lg\\:shadow-none {
        box-shadow: none;
    }

    .lg\\:flex {
        display: flex;
    }

    .lg\\:justify-end {
        justify-content: flex-end;
    }

    .lg\\:flex-row {
        flex-direction: row;
    }

    .lg\\:w-auto {
        width: auto;
    }

    .lg\\:hidden {
        display: none;
    }



    /* Handle md: classes for desktop */
    .md\\:flex-row {
        flex-direction: row;
    }

    .md\\:mr-4 {
        margin-right: 1rem;
    }

    .md\\:inline {
        display: inline;
    }

    .md\\:absolute {
        position: absolute;
    }

    .md\\:-mt-1 {
        margin-top: -0.25rem;
    }
}