/* ============================================
   Dr. Salhi - Parliamentary Website 2026
   Egyptian Official Design System
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cairo:wght@300;400;600;700;800&display=swap');

:root {
    --primary: #0a1628;
    --primary-light: #162040;
    --accent: #c5a059;
    --accent-light: #e8d5a8;
    --red: #c41e3a;
    --bg: #f5f6f8;
    --white: #ffffff;
    --text: #2d3748;
    --text-light: #718096;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --transition: all 0.35s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    overflow-x: hidden;
    font-size: 16px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Amiri', serif;
    font-weight: 700;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    color: var(--primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   TOP BAR - Egyptian Flag Colors
   ============================================ */
.flag-strip {
    height: 4px;
    background: linear-gradient(to left, #c41e3a 33.33%, #ffffff 33.33%, #ffffff 66.66%, #000000 66.66%);
}

.top-bar {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 0;
    font-size: 0.78rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar .contact-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar .contact-info i {
    color: var(--accent);
    margin-left: 5px;
}

.top-bar .emblems {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-bar .emblems img {
    height: 28px;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.top-bar .emblems span {
    font-size: 0.7rem;
    opacity: 0.5;
}

.social-icons a {
    color: rgba(255, 255, 255, 0.5);
    margin-left: 10px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* ============================================
   HEADER
   ============================================ */
header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img {
    display: none;
}

.logo a,
.logo>div {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-emblem {
    font-size: 2.2rem;
    color: var(--accent);
    line-height: 1;
}

.logo-text h1 {
    font-size: 1.2rem;
    color: var(--primary);
    margin: 0;
    line-height: 1.3;
}

.logo-text p {
    font-size: 0.7rem;
    color: var(--accent);
    margin: 0;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo-divider {
    width: 1px;
    height: 35px;
    background: var(--border);
    margin: 0 15px;
}

.logo-party {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-light);
    font-weight: 600;
}

.logo-party i {
    color: var(--accent);
    font-size: 1rem;
}

/* Navigation */
nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2px;
    margin: 0;
    padding: 0;
}

nav ul li {
    position: relative;
}

nav a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    padding: 10px 13px;
    display: block;
    transition: var(--transition);
    white-space: nowrap;
    border-radius: 8px;
}

nav a:hover {
    color: var(--accent);
    background: rgba(197, 160, 89, 0.06);
}

nav a.current {
    color: var(--primary);
    background: rgba(10, 22, 40, 0.05);
    font-weight: 700;
}

nav a.current::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.nav-login-btn {
    background: var(--primary) !important;
    color: var(--white) !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    margin-right: 6px;
    font-size: 0.8rem !important;
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
}

.nav-login-btn:hover {
    background: var(--accent) !important;
    color: var(--primary) !important;
}

.nav-login-btn.current::after {
    display: none;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    padding: 8px;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    min-height: 82vh;
    background: url('../images/hero_bg.jpg') no-repeat center top/cover;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

/* Hero Particles */
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(197, 160, 89, 0.6);
    border-radius: 50%;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) translateX(40px);
        opacity: 0;
    }
}

.hero-tagline {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.9;
    font-weight: 300;
    line-height: 2;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 22, 40, 0.85) 0%, rgba(10, 22, 40, 0.15) 40%, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 0 20px 50px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(197, 160, 89, 0.2);
    border: 1px solid rgba(197, 160, 89, 0.4);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.82rem;
    color: var(--accent-light);
    margin-bottom: 20px;
}

.hero-badge i {
    font-size: 1rem;
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 18px;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    color: var(--white);
    line-height: 1.3;
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: 30px;
    opacity: 0.85;
    font-weight: 300;
    line-height: 1.9;
}

.hero-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 30px;
    background: var(--accent);
    color: var(--primary);
    font-weight: 700;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: var(--transition);
    border: 2px solid var(--accent);
    font-family: 'Cairo', sans-serif;
}

.btn-cta:hover {
    background: transparent;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.3);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 13px 30px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Cairo', sans-serif;
    transition: var(--transition);
}

.btn-outline:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.08);
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 45px 0 35px;
    text-align: center;
    color: var(--white);
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to left, #c41e3a 33%, #fff 33%, #fff 66%, #000 66%);
}

.page-header h2 {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 8px;
}

.page-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

/* ============================================
   SECTIONS
   ============================================ */
.section-padding {
    padding: 70px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 45px;
}

.section-header h2 {
    font-size: 2.1rem;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.section-header p {
    color: var(--text-light);
    margin-top: 10px;
    font-size: 1rem;
}

/* ============================================
   VISION SECTION
   ============================================ */
.vision-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--white);
}

.vision-img {
    min-height: 500px;
    background: #071426 url('../images/Elsalhy2026.png') no-repeat center center/contain;
}

.vision-content {
    padding: 65px 55px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.vision-content h2 {
    font-size: 2.1rem;
}

.vision-content h4 {
    color: var(--accent);
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

/* ============================================
   NEWS CARDS
   ============================================ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.news-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

.news-card:hover .news-content h3 {
    color: var(--accent);
    transition: color 0.3s;
}

.news-img {
    height: 210px;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-card:hover .news-img img {
    transform: scale(1.05);
}

.news-content {
    padding: 22px;
}

.news-date {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.news-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.88rem;
}

.news-link:hover {
    gap: 10px;
    color: var(--primary);
}

/* ============================================
   SERVICES
   ============================================ */
.services-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.services-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(197, 160, 89, 0.08) 0%, transparent 50%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.service-item {
    padding: 32px 18px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    color: var(--white);
    display: block;
}

.service-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.15);
}

.service-icon {
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 15px;
    transition: transform 0.4s ease;
}

.service-item:hover .service-icon {
    transform: scale(1.2) rotateZ(-8deg);
}

.service-item h3 {
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    color: var(--white);
    margin: 0;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.6);
    padding: 45px 0 15px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-about h3 {
    color: var(--white);
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.footer-col h4 {
    color: var(--accent);
    font-size: 0.95rem;
    margin-bottom: 18px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a:hover {
    color: var(--white);
    padding-right: 5px;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
    padding-top: 15px;
    font-size: 0.82rem;
}

.footer-flag {
    height: 3px;
    background: linear-gradient(to left, #c41e3a 33%, #fff 33%, #fff 66%, #000 66%);
    margin-bottom: 15px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
.portal-home-btn {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 999px;
    color: #fff;
    background: #10233e;
    box-shadow: 0 12px 32px rgba(0,0,0,.25);
    font-family: 'Cairo', sans-serif;
    font-size: .88rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease;
}

.portal-home-btn:hover { transform: translateY(-2px); background: #b58a3a; color: #fff; }
.portal-home-btn:focus-visible { outline: 3px solid #d9b86f; outline-offset: 3px; }

@media (max-width: 992px) {
    .vision-section {
        grid-template-columns: 1fr;
    }

    .vision-img {
        height: 350px;
    }

    .vision-content {
        padding: 35px 25px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero {
        min-height: 60vh;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    nav ul {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .logo-divider,
    .logo-party {
        display: none;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero h2 {
        font-size: 1.7rem;
    }

    .services-grid {
        grid-template-columns: 1fr 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .top-bar .container {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .top-bar .emblems {
        display: none;
    }
}

@media (max-width: 520px) {
    .portal-home-btn { left: 12px; bottom: 12px; min-height: 44px; padding: 0 14px; }
    .portal-home-btn span { display: none; }
}

/* ============================================
   HOME HERO SLIDER
   ============================================ */
.hero {
    min-height: clamp(500px, 48vw, 690px);
    background: var(--primary);
}
.hero-slider,.hero-slide{position:absolute;inset:0}
.hero-slider{z-index:0;background:var(--primary)}
.hero-slide{opacity:0;visibility:hidden;transform:scale(1.06);transition:opacity 1s ease,visibility 1s ease,transform 6.2s ease}
.hero-slide.active{opacity:1;visibility:visible;transform:scale(1)}
.hero-slide img{width:100%;height:100%;display:block;object-fit:cover;object-position:center}
.hero-slide:nth-child(8) img{object-position:center 30%}
.hero::before{z-index:1;background:linear-gradient(to top,rgba(10,22,40,.9) 0%,rgba(10,22,40,.18) 45%,rgba(10,22,40,.04) 75%)}
.hero-content{z-index:3}
.hero-arrow{position:absolute;top:50%;z-index:4;width:50px;height:50px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.38);border-radius:50%;color:#fff;background:rgba(10,22,40,.52);backdrop-filter:blur(10px);cursor:pointer;transform:translateY(-50%);transition:var(--transition)}
.hero-arrow:hover{color:var(--primary);background:var(--accent);border-color:var(--accent);transform:translateY(-50%) scale(1.08)}
.hero-arrow:focus-visible{outline:3px solid var(--accent-light);outline-offset:3px}
.hero-arrow-prev{right:28px}.hero-arrow-next{left:28px}
.hero-dots{position:absolute;z-index:4;left:50%;bottom:24px;display:flex;gap:8px;transform:translateX(-50%)}
.hero-dot{width:8px;height:8px;padding:0;border:0;border-radius:999px;background:rgba(255,255,255,.55);cursor:pointer;transition:width .3s ease,background .3s ease}
.hero-dot.active{width:30px;background:var(--accent)}
.hero-dot:focus-visible{outline:2px solid #fff;outline-offset:3px}
.hero-progress{position:absolute;z-index:4;inset:auto 0 0;height:3px;background:rgba(255,255,255,.12);overflow:hidden}
.hero-progress span{display:block;width:0;height:100%;background:linear-gradient(90deg,var(--secondary),var(--accent-light))}
.hero-progress span.running{animation:heroProgress 5.5s linear forwards}
@keyframes heroProgress{to{width:100%}}
@media(max-width:768px){.hero{min-height:560px}.hero-arrow{width:42px;height:42px;top:45%}.hero-arrow-prev{right:12px}.hero-arrow-next{left:12px}.hero-content{padding-bottom:62px}.hero-tagline{font-size:1rem;line-height:1.7}.hero-dots{bottom:18px;gap:6px}}
@media(prefers-reduced-motion:reduce){.hero-slide{transition:opacity .2s ease;transform:none}.hero-progress span.running{animation:none;width:100%}}
/* Home media center: show complete images without cropping */
#mediaCenterHome .news-img {
    height: 280px;
    display: grid;
    place-items: center;
    padding: 10px;
    background: linear-gradient(145deg, #071426, #102744);
}
#mediaCenterHome .news-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transform: none;
}
#mediaCenterHome .news-card:hover .news-img img {
    transform: none;
    filter: brightness(1.04);
}
@media (max-width: 768px) {
    #mediaCenterHome .news-img { height: 245px; }
}