/* Critical Header Styles - Load First */
/* Estos estilos aseguran que el header sea visible inmediatamente */

/* Header principal - Estilos críticos básicos compatibles con Bootstrap */
.header {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    position: sticky;
    top: 0;
    z-index: 1030;
    width: 100%;
    min-height: 70px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: visible;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: block;
    width: 100%;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 20px;
    width: 100%;
    min-height: 70px;
}

.logo-search-section {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    min-width: 300px;
}

.logo-image {
    height: 45px;
    width: auto;
    display: block;
    max-width: 200px;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.search-input {
    width: 100%;
    padding: 12px 50px 12px 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    backdrop-filter: blur(10px);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.categories-btn, .btn-auth, .btn-publish {
    padding: 10px 18px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.categories-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-auth {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-publish {
    background: #10b981;
    color: white;
    border: 1px solid #10b981;
}

/* Responsive crítico */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
    }

    .logo-search-section {
        width: 100%;
        gap: 15px;
        flex-direction: column;
    }

    .search-input-wrapper {
        max-width: none;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 15px;
    }

    .logo-image {
        height: 35px;
    }

    .search-input {
        font-size: 14px;
        padding: 10px 45px 10px 15px;
    }

    .categories-btn, .btn-auth, .btn-publish {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* Country indicator */
.country-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* User dropdown button */
.user-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Logo styling */
.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
}

/* Dropdown menus - essential for functionality */
.category-dropdown-menu, .user-dropdown-menu {
    position: absolute;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10000;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.category-dropdown-menu.show, .user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* User dropdown button hover */
.user-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* Categories button hover */
.categories-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* Auth modal - essential for functionality */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.auth-modal-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.auth-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.auth-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    padding: 5px;
}

/* Ensure modal can be shown by JavaScript */
.auth-modal[style*="display: flex"],
.auth-modal[style*="display:flex"],
.auth-modal.show {
    display: flex;
}

/* Button hover effects */
.btn-auth:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.btn-publish:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
