/* ============================================
   PUBLIC HEADER STYLES - AHDA Knowledge Hub
   Unique Class Names (ph- prefix) - No Conflicts
   ============================================ */

/* ===== BASE CONTAINER ===== */
.ph-public-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ===== ANIMATED GRADIENT TOP BAR ===== */
.ph-gradient-top-bar {
    height: 4px;
    background: linear-gradient(90deg, 
        #F57B2C 0%, 
        #AC1A2C 25%, 
        #14776D 50%, 
        #0B4F66 75%, 
        #F57B2C 100%);
    background-size: 200% 100%;
    animation: ph-gradient-move 3s ease infinite;
}

@keyframes ph-gradient-move {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== CONTAINER ===== */
.ph-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== TOP ANNOUNCEMENT BAR ===== */
.ph-top-bar {
    background: linear-gradient(135deg, #2d0a0a 0%, #4a0a0a 25%, #6b0a0a 50%, #4a0a0a 75%, #2d0a0a 100%);
    background-size: 200% 200%;
    animation: ph-bg-shift 15s ease infinite;
    color: white;
    font-size: 0.75rem;
    padding: 0.4rem 0;
    position: relative;
    z-index: 1001;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

@keyframes ph-bg-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.ph-top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.ph-marquee-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ph-marquee-text i {
    color: #F57B2C;
}

.ph-marquee-text span {
    background: linear-gradient(90deg, #fff, #F57B2C, #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: ph-shine 3s infinite;
}

@keyframes ph-shine {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.ph-top-bar-links {
    display: flex;
    gap: 1.5rem;
}

.ph-top-bar-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.ph-top-bar-links a:hover {
    color: #F57B2C;
    transform: translateY(-1px);
}

/* ===== MAIN NAVBAR ===== */
.ph-navbar {
    background: linear-gradient(135deg, #FFFFFF 0%, rgba(245, 123, 44, 0.03) 50%, #FFFFFF 100%);
    padding: 0.6rem 0;
    position: relative;
    border-bottom: 1px solid rgba(245, 123, 44, 0.12);
}

.ph-navbar .ph-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* ===== LOGO ===== */
.ph-logo-wrapper {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ph-logo-wrapper:hover {
    transform: scale(1.02);
}

.ph-logo-image {
    height: 46px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.05));
}

/* ===== DESKTOP NAVIGATION ===== */
.ph-desktop-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

.ph-nav-links {
    display: flex;
    gap: 0.3rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ph-nav-item {
    position: relative;
}

.ph-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1.2rem;
    color: #465256;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 40px;
    transition: all 0.3s ease;
    position: relative;
}

.ph-nav-link i {
    font-size: 0.95rem;
    color: #0B4F66;
    transition: all 0.3s ease;
}

.ph-nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #AC1A2C, #F57B2C);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 3px;
}

.ph-nav-link:hover::before,
.ph-nav-link.ph-active::before {
    width: 60%;
}

.ph-nav-link:hover {
    color: #F57B2C;
    background: rgba(245, 123, 44, 0.08);
    transform: translateY(-2px);
}

.ph-nav-link:hover i {
    color: #F57B2C;
    transform: translateY(-2px);
}

.ph-nav-link.ph-active {
    color: #F57B2C;
    background: rgba(245, 123, 44, 0.12);
    font-weight: 600;
}

.ph-nav-link.ph-active i {
    color: #F57B2C;
}

/* ===== DROPDOWN MENU ===== */
.ph-dropdown-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.ph-dropdown-trigger:hover .ph-dropdown-icon {
    transform: rotate(180deg);
}

.ph-dropdown-menu {
    position: absolute;
    top: 120%;
    left: 0;
    min-width: 220px;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    padding: 0.5rem;
    border: 1px solid rgba(245, 123, 44, 0.15);
}

.ph-dropdown-trigger:hover .ph-dropdown-menu {
    opacity: 1;
    visibility: visible;
    top: 100%;
}

.ph-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.7rem 1rem;
    color: #162C32;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.ph-dropdown-item i {
    width: 22px;
    color: #14776D;
}

.ph-dropdown-item:hover {
    background: rgba(245, 123, 44, 0.08);
    transform: translateX(5px);
    color: #F57B2C;
}

/* ===== AUTH BUTTONS ===== */
.ph-auth-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.ph-btn-login,
.ph-btn-register {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ph-btn-login {
    background: transparent;
    border: 2px solid #AC1A2C;
    color: #AC1A2C;
}

.ph-btn-login:hover {
    background: linear-gradient(135deg, #AC1A2C, #5A0000);
    color: white;
    transform: translateY(-2px);
}

.ph-btn-register {
    background: linear-gradient(135deg, #AC1A2C, #5A0000);
    color: white;
    border: none;
}

.ph-btn-register::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.ph-btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 0, 0, 0.3);
}

.ph-btn-register:hover::before {
    left: 100%;
}

/* ===== MOBILE ACTIONS ===== */
.ph-mobile-actions {
    display: none;
    align-items: center;
    gap: 0.75rem;
}

.ph-mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    color: #0B4F66;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.ph-mobile-menu-btn:hover {
    background: rgba(245, 123, 44, 0.1);
    color: #F57B2C;
}

/* ===== MOBILE SIDEBAR ===== */
.ph-mobile-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, #FFFFFF, #FFF9F5);
    z-index: 9999;
    transition: right 0.3s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
}

.ph-mobile-sidebar.open {
    right: 0;
}

.ph-mobile-sidebar-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(245, 123, 44, 0.08), rgba(20, 119, 109, 0.04));
    border-bottom: 2px solid #F57B2C;
}

.ph-mobile-logo {
    height: 36px;
    width: auto;
}

.ph-mobile-close {
    background: rgba(245, 123, 44, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    color: #0B4F66;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ph-mobile-close:hover {
    background: linear-gradient(135deg, #F57B2C, #AC1A2C);
    color: white;
}

.ph-mobile-sidebar-content {
    padding: 0.5rem 1rem 1.5rem;
}

.ph-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ph-mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    color: #162C32;
    text-decoration: none;
    border-radius: 14px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.ph-mobile-nav-link i {
    width: 24px;
    color: #14776D;
    font-size: 1rem;
}

.ph-mobile-nav-link:hover {
    background: linear-gradient(135deg, rgba(245, 123, 44, 0.1), rgba(20, 119, 109, 0.05));
    color: #F57B2C;
    transform: translateX(5px);
}

/* ===== MOBILE DROPDOWN MENU ===== */
.ph-mobile-dropdown {
    margin-bottom: 0.25rem;
}

.ph-mobile-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    color: #162C32;
    text-decoration: none;
    border-radius: 14px;
    transition: all 0.2s ease;
    font-weight: 500;
    cursor: pointer;
}

.ph-mobile-dropdown-trigger i {
    width: 24px;
    color: #14776D;
    font-size: 1rem;
}

.ph-mobile-dropdown-trigger span {
    flex: 1;
}

.ph-mobile-dropdown-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    color: #14776D;
}

.ph-mobile-dropdown-trigger.active .ph-mobile-dropdown-icon {
    transform: rotate(180deg);
}

.ph-mobile-dropdown-trigger:hover {
    background: linear-gradient(135deg, rgba(245, 123, 44, 0.1), rgba(20, 119, 109, 0.05));
    color: #F57B2C;
}

.ph-mobile-dropdown-trigger:hover i {
    color: #F57B2C;
}

.ph-mobile-dropdown-menu {
    display: none;
    margin-left: 2rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    border-left: 2px solid rgba(245, 123, 44, 0.3);
}

.ph-mobile-dropdown-menu.show {
    display: block;
}

.ph-mobile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1rem;
    color: #465256;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.ph-mobile-dropdown-item i {
    width: 20px;
    color: #14776D;
    font-size: 0.85rem;
}

.ph-mobile-dropdown-item:hover {
    background: linear-gradient(135deg, rgba(245, 123, 44, 0.08), rgba(20, 119, 109, 0.04));
    color: #F57B2C;
    transform: translateX(5px);
}

/* ===== MOBILE LOGIN/REGISTER BUTTONS - SAME ROW ===== */
.ph-mobile-auth-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.ph-mobile-nav-link.ph-mobile-login,
.ph-mobile-nav-link.ph-mobile-register {
    flex: 1;
    justify-content: center;
    text-align: center;
    margin-top: 0;
    padding: 0.75rem 0.5rem;
}

.ph-mobile-nav-link.ph-mobile-login {
    border: 2px solid #AC1A2C;
    background: transparent;
    color: #AC1A2C;
}

.ph-mobile-nav-link.ph-mobile-login i {
    color: #AC1A2C;
}

.ph-mobile-nav-link.ph-mobile-register {
    background: linear-gradient(135deg, #AC1A2C, #5A0000);
    color: white;
}

.ph-mobile-nav-link.ph-mobile-register i {
    color: white;
}

.ph-mobile-nav-link.ph-mobile-login i,
.ph-mobile-nav-link.ph-mobile-register i {
    width: auto;
    margin-right: 0.25rem;
}

.ph-mobile-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    margin: 0.75rem 0;
}

/* ===== MOBILE OVERLAY ===== */
.ph-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(22, 44, 50, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: none;
}

.ph-mobile-overlay.active {
    display: block;
}

/* ===== MAIN CONTENT ===== */
.ph-main-content {
    min-height: calc(100vh - 120px);
    background: #F3FAFA;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet and Mobile (max 1024px) */
@media (max-width: 1024px) {
    .ph-desktop-menu {
        display: none;
    }
    
    .ph-auth-buttons {
        display: none;
    }
    
    .ph-mobile-actions {
        display: flex;
    }
    
    .ph-top-bar-content {
        justify-content: center;
        text-align: center;
    }
    
    .ph-top-bar-links {
        display: none;
    }
    
    .ph-navbar .ph-container {
        padding: 0 1rem;
        gap: 0.5rem;
    }
    
    .ph-logo-image {
        height: 36px;
    }
}

/* Small Mobile (max 576px) */
@media (max-width: 576px) {
    .ph-container {
        padding: 0 1rem;
    }
    
    .ph-logo-image {
        height: 32px;
    }
    
    .ph-top-bar {
        font-size: 0.7rem;
    }
    
    .ph-marquee-text span {
        font-size: 0.7rem;
    }
    
    .ph-mobile-sidebar {
        width: 85%;
    }
}

/* Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .ph-logo-image {
        height: 40px;
    }
}

/* Desktop Large */
@media (min-width: 1200px) {
    .ph-logo-image {
        height: 52px;
    }
    
    .ph-nav-link {
        padding: 0.6rem 1.5rem;
    }
}