/*
 * Ultra CMS — Frontend Design System
 * LAYER 3 / 3 — COMPONENTS
 * ────────────────────────────────────────────────────────────────
 * Every reusable public-site UI piece: top bar, header/logo, main
 * nav + mega menu, search, breaking-news ticker, mobile menu,
 * footer, utilities. All token-driven — zero hardcoded values.
 */

/* ══════════════════════════════════════════════════════
   TOP BAR
══════════════════════════════════════════════════════ */
.top-bar {
    height: var(--top-bar-height);
    background: linear-gradient(135deg, #1e293b, #0f172a);
    font-size: 0.85rem;
    position: relative;
    z-index: 1050;
}
.hover-accent:hover { color: var(--secondary-color) !important; text-decoration: none; }
.social-links-mini a { color: rgba(255, 255, 255, 0.7); margin: 0 5px; transition: var(--transition-base); font-size: 0.9rem; }
.social-links-mini a:hover { color: white; transform: translateY(-2px); }

/* ══════════════════════════════════════════════════════
   MAIN HEADER
══════════════════════════════════════════════════════ */
.main-header { background-color: var(--bg-header); border-bottom: 1px solid var(--border-color); padding: 20px 0; }
.brand-logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
    width: 45px; height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}
.logo-text {
    font-size: 1.8rem; font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}
body.dark-mode .logo-text { background: linear-gradient(135deg, #818cf8, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.header-ad {
    background-color: rgba(0, 0, 0, 0.03);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    height: 90px;
    display: flex; align-items: center; justify-content: center;
}
body.dark-mode .header-ad { background-color: rgba(255, 255, 255, 0.03); }

/* ══════════════════════════════════════════════════════
   NAVIGATION BAR + MEGA MENU
══════════════════════════════════════════════════════ */
.navbar-ultra { background-color: var(--bg-header); border-bottom: 1px solid var(--border-color); padding: 0; box-shadow: var(--shadow-sm); }
.navbar-ultra .nav-link { color: var(--text-main); font-weight: 600; padding: 18px 20px !important; position: relative; transition: var(--transition-base); }
.navbar-ultra .nav-link:hover,
.navbar-ultra .nav-link.active,
.navbar-ultra .nav-link.show { color: var(--primary-color); background-color: rgba(79, 70, 229, 0.04); }
.navbar-ultra .nav-link::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px;
    background-color: var(--primary-color); transform: scaleX(0); transition: transform 0.3s ease; transform-origin: right;
}
.navbar-ultra .nav-link:hover::after, .navbar-ultra .nav-link.active::after { transform: scaleX(1); }

.has-megamenu { position: static; }
.megamenu {
    width: 100%; left: 0; right: 0; margin-top: 0; border: none;
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 16px 16px;
    background-color: var(--bg-card);
    padding: 30px 0;
}
.megamenu-title {
    color: var(--primary-color); font-weight: 700; font-size: 1.1rem;
    margin-bottom: 15px; padding-bottom: 10px;
    border-bottom: 2px solid rgba(79, 70, 229, 0.1);
    display: inline-block;
}
.megamenu ul li a { display: block; padding: 8px 0; color: var(--text-muted); text-decoration: none; transition: var(--transition-base); font-weight: 500; }
.megamenu ul li a:hover { color: var(--text-main); padding-right: 8px; }
.megamenu-featured img { border-radius: 12px; box-shadow: var(--shadow-md); transition: var(--transition-base); }
.megamenu-featured:hover img { transform: scale(1.02); }

/* ══════════════════════════════════════════════════════
   SEARCH
══════════════════════════════════════════════════════ */
.search-form input { background-color: rgba(0, 0, 0, 0.04); border: 1px solid transparent; color: var(--text-main); transition: var(--transition-base); }
body.dark-mode .search-form input { background-color: rgba(255, 255, 255, 0.05); }
.search-form input:focus { background-color: var(--bg-card); border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1); }

/* ══════════════════════════════════════════════════════
   BREAKING NEWS TICKER
══════════════════════════════════════════════════════ */
.breaking-news-wrapper { background-color: var(--bg-body); border-bottom: 1px solid var(--border-color); padding: 12px 0; }
.breaking-news-container {
    background-color: var(--bg-card); border-radius: 50px;
    padding: 6px 6px 6px 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.news-label {
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: white; padding: 6px 16px; border-radius: 50px; font-weight: 700; font-size: 0.85rem;
    white-space: nowrap; box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3); z-index: 2;
}
.news-ticker-content { flex: 1; overflow: hidden; position: relative; height: 24px; margin-right: 15px; }
.ticker-item { position: absolute; width: 100%; animation: tickerSlide 15s infinite linear; opacity: 0; white-space: nowrap; }
.ticker-item a { color: var(--text-main); text-decoration: none; font-weight: 600; }
.ticker-item a:hover { color: var(--primary-color); }
@keyframes tickerSlide {
    0%   { transform: translateY(100%);  opacity: 0; }
    5%   { transform: translateY(0);     opacity: 1; }
    30%  { transform: translateY(0);     opacity: 1; }
    35%  { transform: translateY(-100%); opacity: 0; }
    100% { transform: translateY(-100%); opacity: 0; }
}
.ticker-item:nth-child(1) { animation-delay: 0s; }
.ticker-item:nth-child(2) { animation-delay: 5s; }
.ticker-item:nth-child(3) { animation-delay: 10s; }

/* ══════════════════════════════════════════════════════
   MOBILE MENU
══════════════════════════════════════════════════════ */
.hamburger-icon span { display: block; width: 25px; height: 3px; background-color: var(--text-main); margin: 5px 0; border-radius: 3px; transition: var(--transition-base); }

/* ══════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════ */
.footer-ultra { background-color: #0f172a; color: #cbd5e1; padding-top: 80px; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.footer-widget-title { color: white; font-weight: 700; margin-bottom: 25px; position: relative; padding-bottom: 15px; }
.footer-widget-title::after { content: ''; position: absolute; bottom: 0; right: 0; width: 40px; height: 3px; background: var(--primary-color); border-radius: 3px; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: #94a3b8; text-decoration: none; transition: var(--transition-base); display: flex; align-items: center; }
.footer-links a:hover { color: white; padding-right: 8px; }
.footer-links a i { font-size: 0.8rem; margin-left: 10px; color: var(--primary-color); }
.footer-bottom { background-color: #020617; padding: 25px 0; margin-top: 60px; border-top: 1px solid rgba(255, 255, 255, 0.05); font-size: 0.9rem; }

/* ══════════════════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════════════════ */
.extra-small { font-size: 0.75rem; }
.object-cover { object-fit: cover; }
.rounded-xl { border-radius: 12px; }
.shadow-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
