/* Universal Header Styles - AutoClick */
/* Version: 2.0 - Figma Dark Dropdowns - Updated 2025-11-10 */

.universal-header {
    width: 100%;
    height: 80px;
    padding-right: 40px;
    background: #02081C;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    /* CRITICAL: No transform to allow position:fixed children to work correctly */
    transform: none !important;
}

.header-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: none;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: visible;
    /* CRITICAL: Do NOT use transform on header-container as it breaks position:fixed children */
    transform: none !important;
}

/* Logo Section */
.logo-section {
    width: auto;
    height: 80px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 10px !important;
    flex-shrink: 0;
}

.logo-link {
    text-decoration: none;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
}

/* Logo Container for hover effect */
.logo-section .logo-container {
    position: relative;
    width: 148px;
    height: 23.49px;
    overflow: hidden !important;
    display: block;
}

.logo-section .logo-container .logo-image {
    width: 148px;
    height: 23.49px;
    position: absolute !important;
    top: 0;
    left: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
    will-change: transform;
    object-fit: contain;
    display: block !important;
}

/* Main logo - visible by default, in position */
.logo-section .logo-container .logo-main {
    transform: translateX(0) !important;
    z-index: 2;
}

/* Hover logo (Logo 06) - hidden to the LEFT off-screen initially */
.logo-section .logo-container .logo-hover {
    transform: translateX(-100%) !important;
    z-index: 1;
}

/* On hover: Main logo slides LEFT (out of screen), Hover logo slides IN from LEFT */
.logo-section .logo-link:hover .logo-container .logo-main {
    transform: translateX(-100%) !important;
}

.logo-section .logo-link:hover .logo-container .logo-hover {
    transform: translateX(0) !important;
}

/* Navigation Section */
.navigation-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 64px;
    flex: 1;
    padding: 0 20px;
    /* CRITICAL: No transform to allow position:fixed children to work correctly */
    transform: none !important;
}

/* Explorar Autos Button */
.explorar-btn {
    color: transparent;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-decoration: none;
    padding: 0;
    border-radius: 4px;
    background-image: url('/images/logos/EXPLORAR AUTOS_1.gif');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width: 140px;
    height: 40px;
    display: inline-block;
    transition: opacity 0.3s ease;
}

.explorar-btn span {
    display: none;
}

.explorar-btn:hover {
    opacity: 0.9;
    color: transparent;
    text-decoration: none;
}

/* Flag styles removed as requested */

/* Navigation Dropdowns */
.nav-dropdown {
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    /* CRITICAL: No transform to allow position:fixed children to work correctly */
    transform: none !important;
}

/* Special positioning for full-width dropdowns */
.nav-dropdown[data-dropdown="productos"],
.nav-dropdown[data-dropdown="anunciese"],
.nav-dropdown[data-dropdown="financiamiento"] {
    position: static;
    transform: none !important;
}

.nav-item {
    height: 40px;
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Override Bootstrap dropdown arrows */
.nav-item::after,
.nav-item::before,
.nav-dropdown .nav-item::after,
.nav-dropdown .nav-item::before,
.nav-dropdown button::after,
.nav-dropdown button::before {
    display: none !important;
    content: none !important;
    border: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
}

.dropdown-toggle::after,
.dropdown-toggle::before,
button.dropdown-toggle::after,
button.dropdown-toggle::before,
a.dropdown-toggle::after,
a.dropdown-toggle::before,
.nav-dropdown-container a::after,
.nav-dropdown-container a::before {
    display: none !important;
    content: none !important;
    border: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
}

/* Dropdown Content - BASE STYLE WITH DARK BACKGROUND */
.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(4, 17, 56, 0.95) !important;
    min-width: 250px;
    border-radius: 0 !important;
    box-shadow: none !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    overflow: visible;
    margin-top: 0;
    padding: 32px;
    border: none !important;
}

/* Dark dropdown style (Figma design) - Default for all */
.dropdown-content.dropdown-dark {
    background: rgba(4, 17, 56, 0.95) !important;
    border: none;
    padding: 32px;
}

/* Large dropdown for Productos & Servicios - EXACTLY FROM FIGMA */
.dropdown-content.dropdown-large {
    position: fixed;
    top: 80px;
    left: 50% !important;
    width: 100vw !important;
    max-width: none !important;
    padding: 32px 0 !important;
    transform: translate(-50%, -10px) !important;
    z-index: 9999 !important;
    background: rgba(4, 17, 56, 0.95) !important;
    overflow: hidden;
    margin: 0 !important;
}

.nav-dropdown:hover .dropdown-content.dropdown-large,
.nav-dropdown.active .dropdown-content.dropdown-large {
    transform: translate(-50%, 0) !important;
}

/* Dropdown columns container - EXACTLY FROM FIGMA */
.dropdown-columns {
    display: flex;
    gap: 168px; /* EXACTLY 168px gap between Productos and Servicios */
    align-items: flex-start;
    justify-content: center;
    max-width: none; /* No max-width constraint */
    margin: 0 auto;
    padding: 0;
}

/* Horizontal dropdown for Anúnciese - EXACTLY FROM FIGMA */
.dropdown-content.dropdown-anunciese {
    position: fixed;
    top: 80px;
    left: 50% !important;
    width: 100vw !important;
    max-width: none !important;
    height: 200px;
    margin: 0 !important;
    display: flex;
    flex-direction: row;
    gap: 80px;
    padding: 32px 0 !important;
    justify-content: center;
    align-items: flex-start;
    transform: translate(-50%, -10px) !important;
    z-index: 9999 !important;
    background: rgba(4, 17, 56, 0.95) !important;
    overflow: hidden;
}

.nav-dropdown:hover .dropdown-content.dropdown-anunciese,
.nav-dropdown.active .dropdown-content.dropdown-anunciese {
    transform: translate(-50%, 0) !important;
}

/* Anuncio item with icon - FROM FIGMA */
.dropdown-anuncio-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px; /* EXACTLY from Figma */
    padding: 0;
    height: 40px; /* Match Figma height */
    white-space: nowrap;
    background: transparent;
    transition: none; /* No hover effect on Anúnciese items */
}

.dropdown-anuncio-item:hover {
    background: transparent; /* Keep transparent - no hover background */
}

.dropdown-anuncio-item .dropdown-icon {
    flex-shrink: 0;
    /* Icon sizes are set inline in HTML: 16px, 22px, 20px per Figma */
}

.dropdown-anuncio-item span {
    color: white !important;
    font-size: 16px; /* EXACTLY from Figma */
    font-weight: 400; /* Regular weight from Figma */
    line-height: 1;
}

/* Horizontal dropdown for Financiamiento - EXACTLY FROM FIGMA */
.dropdown-content.dropdown-horizontal {
    position: fixed;
    top: 80px;
    left: 50% !important;
    width: 100vw !important;
    max-width: none !important;
    height: 200px;
    margin: 0 !important;
    display: flex;
    flex-direction: row;
    gap: 80px;
    padding: 32px 0 !important;
    justify-content: center;
    align-items: flex-start;
    transform: translate(-50%, -10px) !important;
    background: rgba(4, 17, 56, 0.95) !important;
    z-index: 9999 !important;
    overflow: hidden;
}

.nav-dropdown:hover .dropdown-content.dropdown-horizontal,
.nav-dropdown.active .dropdown-content.dropdown-horizontal {
    transform: translate(-50%, 0) !important;
}

/* Individual dropdown column */
.dropdown-column {
    display: flex;
    flex-direction: column;
    gap: 8px; /* 8px gap between items */
    flex: 0 0 auto; /* Don't grow or shrink, natural size */
    min-width: 0; /* Remove minimum width */
}

.dropdown-column-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.75); /* EXACTLY 75% opacity white */
    margin: 0 0 16px 0; /* 24px gap from Figma: 16px margin bottom + 8px item gap */
    padding: 0;
    line-height: 1;
}

/* Vertical divider between columns - FROM FIGMA */
.dropdown-divider-vertical {
    width: 1px;
    background: rgba(255, 255, 255, 0.2); /* Subtle white divider */
    align-self: stretch;
    margin: 0; /* NO MARGIN - gap is controlled by parent .dropdown-columns */
    flex-shrink: 0;
}

.nav-dropdown:hover .dropdown-content,
.nav-dropdown.active .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    color: white !important;
    text-decoration: none;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    border-bottom: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    line-height: 1.5;
}

/* Dark dropdown link styles */
.dropdown-dark .dropdown-link {
    color: white !important;
    border-bottom: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 400;
    gap: 8px;
}

.dropdown-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    text-decoration: none;
}

.dropdown-dark .dropdown-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

/* Icon in dropdown links */
.dropdown-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Product logo in dropdown - EXACTLY FROM FIGMA */
.dropdown-product {
    display: flex;
    align-items: center;
    gap: 12px; /* 12px gap between logo and text */
    padding: 14px 8px; /* height: 48px with this padding */
    border-radius: 4px;
    background: transparent;
    transition: background-color 0.2s ease;
    height: 48px; /* EXACTLY from Figma */
    box-sizing: border-box;
}

.dropdown-product:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.product-logo {
    height: 17px; /* EXACTLY from Figma */
    width: 63px; /* EXACTLY from Figma */
    object-fit: contain;
    flex-shrink: 0;
}

.dropdown-product span {
    font-size: 14px; /* EXACTLY from Figma - Body Regular/14pts */
    font-weight: 500; /* Medium weight from Figma */
    color: white;
    line-height: 1;
}

/* Reserve link styles - EXACTLY FROM FIGMA */
.dropdown-reserve {
    font-weight: 700 !important; /* Bold from Figma */
    font-size: 16px !important; /* EXACTLY from Figma */
    color: white !important;
    padding: 8px 0 !important; /* height: 40px with 8px padding */
    justify-content: center !important;
    background: transparent !important;
    height: 40px; /* EXACTLY from Figma */
    display: flex !important;
    align-items: center !important;
    line-height: 1;
}

.dropdown-reserve .highlight {
    color: #ff931e; /* EXACTLY from Figma - orange highlight */
    font-weight: 700;
}

.dropdown-reserve:hover {
    background: transparent !important; /* NO background on hover for these links */
    color: white !important;
}

.dropdown-reserve:hover .highlight {
    color: #ffb84d; /* Lighter orange on hover */
}

/* Remove any arrows or indicators from dropdown links */
.dropdown-link::after,
.dropdown-link::before {
    display: none !important;
    content: none !important;
    border: none !important;
}

/* Actions Section */
.actions-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 32px;
    position: relative;
    height: 80px;
    overflow: visible;
    flex-shrink: 0;
    margin-left: auto;
    padding-right: 20px;
}

/* Favorites Button */
.favorites-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

.favorites-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.favorites-icon {
    width: 24px;
    height: 24px;
    display: block;
    filter: brightness(0) invert(1); /* Makes the icon white */
}

.search-icon {
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.icon-border {
    padding: 12px;
    border: 2px solid white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-placeholder {
    width: 20px;
    height: 17px;
    border: 2px solid white;
}

/* User Section */
.user-section {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

/* Auth Section (for non-logged in users) */
.auth-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.login-register-btn {
    color: white;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    margin-left: 20px;
    position: relative;
    z-index: 10;
}

.login-register-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.login-register-btn::after,
.login-register-btn::before {
    display: none !important;
    content: none !important;
}

/* User avatar (only for logged-in users) */
.user-section .user-avatar {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    width: auto;
    height: auto;
}

.user-section .avatar-dot {
    width: 5.33px;
    height: 5.33px;
    background: white;
    border-radius: 50%;
    flex-shrink: 0;
}

.user-section .avatar-bars {
    width: 10.67px;
    height: 6px;
    background: white;
    flex-shrink: 0;
}

.user-name {
    height: 40px;
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.user-name:hover,
.user-section:hover .user-name,
.user-section.active .user-name {
    background: rgba(255, 255, 255, 0.1);
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    overflow: hidden;
    margin-top: 0;
    background: rgba(4, 17, 56, 0.95) !important;
    padding: 8px;
    border-radius: 0;
}

/* User dropdown shows on hover using the same system as nav dropdowns */
.user-section:hover .user-dropdown,
.user-section.active .user-dropdown,
.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 10px 8px;
    color: white !important;
    text-decoration: none;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 4px;
}

.user-menu-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    text-decoration: none;
}

.user-menu-item .admin-icon {
    font-size: 16px;
}

.menu-divider {
    margin: 8px 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive Design */

/* Very Small Desktop Screens (1024px - 1150px) */
@media (min-width: 1024px) and (max-width: 1150px) {
    /* Reduce header container padding */
    .header-container {
        padding: 0 8px;
    }
    
    /* Scale down logo more aggressively */
    .logo-section .logo-link {
        padding: 0 8px !important;
    }
    
    .logo-section .logo-container {
        width: 140px !important;
        height: 22px !important;
    }
    
    .logo-section .logo-container .logo-image {
        height: 22px !important;
    }
    
    /* Reduce navigation gap more */
    .navigation-section {
        gap: 28px;
        padding: 0 8px;
    }
    
    /* Smaller font sizes */
    .nav-item {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .nav-item svg {
        width: 9px;
        height: 5px;
    }
    
    /* Scale down explorar button more */
    .explorar-btn {
        width: 110px;
        height: 32px;
        font-size: 13px;
    }
    
    /* Smaller dropdown headers */
    .dropdown-header {
        font-size: 14px;
    }
    
    .dropdown-column-title {
        font-size: 13px;
    }
    
    /* Smaller dropdown links */
    .dropdown-link {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    /* Smaller dropdown columns gap */
    .dropdown-columns {
        gap: 40px;
    }
    
    /* Smaller actions section */
    .actions-section {
        gap: 8px;
    }
    
    /* Smaller favorites button */
    .favorites-btn {
        padding: 6px;
    }
    
    .favorites-icon {
        width: 18px;
        height: 18px;
    }
    
    /* Smaller user dropdown */
    .user-name {
        font-size: 13px;
        padding: 6px 10px;
        gap: 4px;
    }
    
    .avatar {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
    
    .user-name svg {
        width: 9px;
        height: 5px;
    }
    
    /* Smaller user menu items */
    .user-menu-item {
        font-size: 13px;
        padding: 6px 10px 6px 6px;
    }
    
    .user-menu-item .admin-icon {
        font-size: 13px;
    }
}

/* Small Desktop Screens (1024px - 1350px) */
@media (min-width: 1024px) and (max-width: 1350px) {
    /* Reduce header container padding */
    .header-container {
        padding: 0 12px;
    }
    
    /* Scale down logo */
    .logo-section .logo-link {
        padding: 0 12px !important;
    }
    
    .logo-section .logo-container {
        width: 160px !important;
        height: 24px !important;
    }
    
    .logo-section .logo-container .logo-image {
        height: 24px !important;
    }
    
    /* Reduce navigation gap */
    .navigation-section {
        gap: 40px;
        padding: 0 12px;
    }
    
    /* Reduce font sizes */
    .nav-item {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .nav-item svg {
        width: 10px;
        height: 5px;
    }
    
    /* Scale down explorar button */
    .explorar-btn {
        width: 120px;
        height: 35px;
        font-size: 14px;
    }
    
    /* Reduce dropdown header sizes */
    .dropdown-header {
        font-size: 15px;
    }
    
    .dropdown-column-title {
        font-size: 14px;
    }
    
    /* Reduce dropdown link sizes */
    .dropdown-link {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    /* Reduce dropdown columns gap */
    .dropdown-columns {
        gap: 60px;
    }
    
    /* Scale down actions section */
    .actions-section {
        gap: 12px;
    }
    
    /* Scale down favorites button */
    .favorites-btn {
        padding: 8px;
    }
    
    .favorites-icon {
        width: 20px;
        height: 20px;
    }
    
    /* Scale down user dropdown */
    .user-name {
        font-size: 14px;
        padding: 8px 12px;
        gap: 6px;
    }
    
    .avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .user-name svg {
        width: 10px;
        height: 5px;
    }
    
    /* Reduce user menu item sizes */
    .user-menu-item {
        font-size: 14px;
        padding: 8px 12px 8px 8px;
    }
    
    .user-menu-item .admin-icon {
        font-size: 14px;
    }
}

@media (max-width: 1024px) {
    .navigation-section {
        gap: 32px;
    }
    
    .header-container {
        padding: 0 15px;
    }
    
    /* Adjust dropdown columns for smaller screens */
    .dropdown-columns {
        gap: 80px;
    }
}

@media (max-width: 768px) {
    .universal-header {
        padding-right: 20px;
    }
    
    .navigation-section {
        display: none; /* Hide navigation on mobile, replace with hamburger menu */
    }
    
    .logo-section {
        width: auto;
        padding-left: 15px;
    }
    
    .logo-section .logo-container {
        width: 120px;
        height: auto;
    }
    
    .logo-section .logo-container .logo-image {
        width: 120px;
        height: auto;
    }
    
    .actions-section {
        gap: 16px;
    }
    
    .favorites-btn {
        padding: 6px;
    }
    
    .favorites-icon {
        width: 20px;
        height: 20px;
    }
    
    .user-name {
        font-size: 14px;
    }
    
    /* Mobile dropdown adjustments */
    .dropdown-columns {
        flex-direction: column;
        gap: 24px;
        padding: 0 20px;
    }
    
    .dropdown-divider-vertical {
        display: none;
    }
}

/* Ensure content doesn't overlap with fixed header */
body {
    padding-top: 80px;
}

/* Auth pages don't need header padding */
.main-container.auth-page {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Override body padding for auth pages */
.auth-page {
    padding-top: 0 !important;
}

/* Alternative method for auth pages */
body.auth-body {
    padding-top: 0 !important;
}

/* Page content adjustments */
.page-content {
    margin-top: 80px;
}

/* Animation for dropdown arrows */
@keyframes arrowRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(180deg);
    }
}

/* Hover effects */
.nav-dropdown:hover .nav-item,
.nav-dropdown.active .nav-item {
    background: rgba(255, 255, 255, 0.1);
}

/* Focus states for accessibility */
.nav-item:focus,
.user-name:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.dropdown-link:focus,
.user-menu-item:focus {
    outline: none;
}

/* ========================================== */
/* END OF UNIVERSAL HEADER STYLES */
/* ========================================== */