/* إعدادات أساسية */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Tahoma", sans-serif;
  background-color: #050816;
  color: #f5f5f5;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1140px, 100% - 32px);
  margin-inline: auto;
}

/* العناوين */
h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  font-weight: 700;
}

p {
  margin: 0 0 0.8em;
}

/* أكاديمية ايجى فوركس بنر أنيميشن */
@keyframes flashMove {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(238, 90, 36, 0.4);
    background: linear-gradient(45deg, #ee5a24, #ff6b6b);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 12px;
  min-height: 60px;
}

.header-inner .logo img {
  height: 80px;
  width: 80px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.header-inner .logo img:hover {
  transform: scale(1.05);
}

/* Responsive header logo */
@media (max-width: 768px) {
  .header-inner .logo img {
    height: 60px;
    width: 60px;
  }
  
  .nav-toggle {
    display: flex !important;
    z-index: 1001;
  }
  
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(30, 64, 175, 0.3);
    border-radius: 0 0 12px 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    flex-direction: column;
    gap: 15px;
  }
  
  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .main-nav a {
    display: block;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    color: #cbd5f5;
    background: rgba(30, 64, 175, 0.2);
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
    touch-action: manipulation;
  }
  
  .main-nav a:hover {
    background: rgba(30, 64, 175, 0.4);
    transform: translateY(-2px);
    border-color: rgba(30, 64, 175, 0.5);
  }
  
  .main-nav a.active {
    background: linear-gradient(135deg, #22d3ee, #818cf8);
    color: #020617;
    border-color: rgba(56, 189, 248, 0.5);
  }
  
  .site-header {
    position: relative;
  }
  
  .header-inner {
    position: relative;
    min-height: 60px;
  }
}

@media (max-width: 480px) {
  .header-inner .logo img {
    height: 50px;
    width: 50px;
  }
  
  .main-nav {
    min-width: 180px;
    padding: 15px;
  }
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.logo-main {
  color: #e5e7eb;
}

.logo-plus {
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  font-size: 0.8rem;
  color: #020617;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: #cbd5f5;
  transition: background-color 0.2s ease, color 0.2s ease,
    transform 0.1s ease;
}

.main-nav a:hover {
  background-color: rgba(30, 64, 175, 0.6);
  color: #e5e7eb;
  transform: translateY(-1px);
}

.main-nav a.active {
  background: linear-gradient(135deg, #22d3ee, #818cf8);
  color: #020617;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.85);
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
}

/* البطل */
.hero {
  padding: 40px 0 32px;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent),
    radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.14), #020617);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr);
  gap: 32px;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  background: linear-gradient(120deg, #e5e7eb, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text p {
  color: #cbd5f5;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    background 0.12s ease, border-color 0.12s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #22d3ee, #818cf8);
  color: #020617;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.27);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.4);
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.7);
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.55);
}

.btn.ghost:hover {
  background: rgba(15, 23, 42, 0.9);
}

.hero-card {
  padding: 20px 18px 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.1), transparent),
    radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.08), #020617);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.7);
}

.hero-card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.market-list {
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0;
}

.market-list li {
  display: grid;
  grid-template-columns: 1.6fr auto auto;
  gap: 8px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(51, 65, 85, 0.7);
  font-size: 0.9rem;
}

.market-list li:last-child {
  border-bottom: none;
}

.market-list .value {
  font-variant-numeric: tabular-nums;
  color: #e5e7eb;
}

.change {
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.change.up {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.change.down {
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
}

.market-note {
  font-size: 0.78rem;
  color: #9ca3af;
}

/* الأقسام العامة */
.section {
  padding: 32px 0;
}

.section-alt {
  background: radial-gradient(
      circle at top,
      rgba(30, 64, 175, 0.22),
      transparent
    ),
    #020617;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
}

.section-header h2 {
  font-size: 1.2rem;
}

.section-header.inline {
  margin-bottom: 12px;
}

.section-link {
  font-size: 0.9rem;
  color: #93c5fd;
}

.section-link:hover {
  text-decoration: underline;
}

/* بطاقات */
.card {
  border-radius: 18px;
  padding: 16px 16px 14px;
  background: radial-gradient(
        circle at top left,
        rgba(30, 64, 175, 0.6),
        transparent 60%
      )
      border-box,
    rgba(15, 23, 42, 0.96) !important;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.88);
}

.card-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #bfdbfe;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(96, 165, 250, 0.7);
  margin-bottom: 8px;
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: #f5f5f5 !important;
}

.card p {
  font-size: 0.9rem;
  color: #cbd5f5 !important;
}

.card-link {
  display: inline-flex;
  margin-top: 4px;
  font-size: 0.85rem;
  color: #93c5fd;
}

.card-link::before {
  content: "←";
  margin-left: 4px;
  font-size: 0.9em;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-3-ads {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr);
  gap: 20px;
}

/* قائمة المقالات مع شريط جانبي */
.articles-preview .list-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(30, 64, 175, 0.5);
}

.articles-preview .list-item:last-child {
  border-bottom: none;
}

.articles-preview h3 {
  font-size: 0.98rem;
}

.articles-preview p {
  font-size: 0.9rem;
  color: #cbd5f5;
}

.text-link {
  font-size: 0.85rem;
  color: #93c5fd;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.widget {
  border-radius: 16px;
  padding: 14px 14px 12px;
  border: 1px dashed rgba(248, 250, 252, 0.35);
  background: rgba(15, 23, 42, 0.86);
}

.widget h3 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.widget p {
  font-size: 0.88rem;
  color: #e5e7eb;
}

/* أكاديمية ايجى فوركس بنر */
.academy-banner {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    margin: 20px 0;
}

.academy-banner .flash-overlay {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 45%, 
        rgba(255, 255, 255, 0.5) 50%, 
        rgba(255, 255, 255, 0.3) 55%, 
        transparent 100%);
    animation: flashMove 3s ease-in-out infinite;
    z-index: 10;
    pointer-events: none;
}

.academy-banner .banner-content {
    display: flex;
    align-items: center;
    padding: 40px;
    position: relative;
    z-index: 5;
}

.academy-banner .logo-section {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 40px;
}

.academy-banner .academy-logo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

.academy-banner .text-section {
    flex: 1;
    color: white;
    text-align: center;
}

.academy-banner .academy-name {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: slideInRight 1s ease-out;
}

.academy-banner .tagline {
    font-size: 1.5em;
    margin-bottom: 15px;
    opacity: 0.9;
    animation: slideInRight 1.2s ease-out;
}

.academy-banner .description {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.8;
    animation: slideInRight 1.4s ease-out;
}

.academy-banner .cta-button {
    display: inline-block;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(238, 90, 36, 0.3);
    transition: all 0.3s ease;
    animation: slideInUp 1.6s ease-out;
}

/* Responsive styles for academy banner */
@media (max-width: 768px) {
    .academy-banner .banner-content {
        flex-direction: column;
        padding: 30px 20px;
    }
    
    .academy-banner .logo-section {
        margin-left: 0;
        margin-bottom: 30px;
        flex: 0 0 auto;
    }
    
    .academy-banner .academy-logo {
        width: 120px;
        height: 120px;
    }
    
    .academy-banner .academy-name {
        font-size: 2em;
    }
    
    .academy-banner .tagline {
        font-size: 1.2em;
    }
    
    .academy-banner .description {
        font-size: 1em;
    }
    
    .academy-banner .cta-button {
        padding: 12px 30px;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .academy-banner .banner-content {
        padding: 20px 15px;
    }
    
    .academy-banner .academy-logo {
        width: 100px;
        height: 100px;
    }
    
    .academy-banner .academy-name {
        font-size: 1.8em;
    }
    
    .academy-banner .tagline {
        font-size: 1.1em;
    }
    
    .academy-banner .description {
        font-size: 0.9em;
    }
}

/* الإعلانات */
.ad-section {
  padding: 10px 0 4px;
}

.ad-container {
  text-align: center;
  margin: 20px 0;
}

.ad-container.top-banner {
  margin: 30px 0;
}

.ad-container.middle-banner {
  margin: 20px 0;
}

.ad-image {
  width: 100%;
  height: auto;
  max-width: 728px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ad-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Responsive ads */
@media (max-width: 768px) {
  .ad-image {
    max-width: 100%;
    border-radius: 6px;
  }
  
  .ad-container.top-banner {
    margin: 20px 0;
  }
  
  .ad-container.middle-banner {
    margin: 15px 0;
  }
}

@media (max-width: 480px) {
  .ad-section {
    padding: 5px 0 2px;
  }
  
  .ad-container.top-banner {
    margin: 15px 0;
  }
  
  .ad-container.middle-banner {
    margin: 10px 0;
  }
  
  .ad-image {
    border-radius: 4px;
  }
}

.ad-slot {
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.8);
  color: #9ca3af;
  background: repeating-linear-gradient(
      -45deg,
      rgba(15, 23, 42, 0.8),
      rgba(15, 23, 42, 0.8) 6px,
      rgba(15, 23, 42, 0.96) 6px,
      rgba(15, 23, 42, 0.96) 12px
    ),
    #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.85rem;
}

.ad-slot--leaderboard {
  height: 80px;
}

.ad-slot--rectangle {
  height: 250px;
}

/* صفحات داخلية عامة */
.page {
  padding: 28px 0 32px;
}

.page-header {
  margin-bottom: 18px;
}

.page-header h1,
.page-header h2 {
  font-size: 1.4rem;
}

.page-header p {
  color: #cbd5f5;
}

.breadcrumbs {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-bottom: 8px;
}

.breadcrumbs a {
  color: #e5e7eb;
}

.breadcrumbs span {
  margin-inline: 4px;
}

/* صفحة الأخبار والمقالات - شبكة */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.cards-grid .card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.78rem;
  color: #9ca3af !important;
  margin-bottom: 4px;
}

.cards-grid .card-link {
  display: inline-flex;
  margin-top: 4px;
  font-size: 0.85rem;
  color: #93c5fd !important;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
}

/* صفحة مقال */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.1fr);
  gap: 24px;
}

.article-body {
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(30, 64, 175, 0.85);
  padding: 18px 16px 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.article-body h1 {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 12px;
}

.article-body h2 {
  font-size: 1.1rem;
  margin-top: 1.2rem;
}

.article-body ul {
  padding-right: 1.1rem;
}

.article-body li {
  margin-bottom: 0.4rem;
}

.article-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(248, 250, 252, 0.3);
  font-size: 0.85rem;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

/* صفحة الأدوات */
.tools-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr);
  gap: 20px;
}

.tool-card {
  border-radius: 18px;
  border: 1px solid rgba(30, 64, 175, 0.9);
  background: rgba(15, 23, 42, 0.96);
  padding: 18px 16px 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.tool-card label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
}

.tool-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field {
  margin-bottom: 10px;
}

input[type="number"],
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(30, 64, 175, 0.85);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease;
}

textarea {
  border-radius: 14px;
  min-height: 140px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.7);
}

input::placeholder,
textarea::placeholder {
  color: #64748b;
}

.tool-result {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px dashed rgba(148, 163, 184, 0.7);
  font-size: 0.9rem;
  color: #e5e7eb;
}

/* من نحن + تواصل */
.columns-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr);
  gap: 24px;
}

.about-card,
.contact-card {
  border-radius: 18px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(30, 64, 175, 0.85);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.about-list {
  padding-right: 1.1rem;
  margin: 0 0 0.4rem;
}

.about-list li {
  margin-bottom: 0.3rem;
}

.contact-info {
  font-size: 0.9rem;
  color: #cbd5f5;
}

.contact-info p {
  margin-bottom: 0.4rem;
}

.contact-info span {
  color: #93c5fd;
}

/* الفوتر */
.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), #020617);
  padding: 20px 0 16px;
  font-size: 0.85rem;
  color: #9ca3af;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 16px;
}

.footer-col h4 {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 4px;
}

.footer-col a {
  color: #cbd5f5;
  font-size: 0.85rem;
}

.footer-col a:hover {
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
}

.risk-warning {
  font-size: 0.78rem;
  color: #9ca3af;
  max-width: 640px;
}

/* استجابة الشاشات */
@media (min-width: 1200px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card {
    order: -1;
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3-ads,
  .article-layout,
  .tools-grid,
  .columns-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Show 2 columns on tablets for articles */
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .header-inner {
    padding-block: 8px;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    padding: 8px 16px 12px;
    background: rgba(15, 23, 42, 0.98);
    border-bottom: 1px solid rgba(30, 64, 175, 0.9);
    flex-direction: column;
    transform-origin: top;
    transform: scaleY(0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease,
      visibility 0.18s ease;
  }

  .main-nav.open {
    opacity: 1;
    transform: scaleY(1);
    visibility: visible;
    pointer-events: auto;
  }

  .main-nav a {
    width: 100%;
  }

  .hero {
    padding-top: 28px;
  }

  .cards-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 540px) {
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .ad-slot--leaderboard {
    height: 60px;
  }
}


/* --- زر تسجيل الدخول في الهيدر --- */
.login-header-btn {
    background-color: #007bff; /* لون أزرق احترافي */
    color: white !important;
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    border: 2px solid transparent;
}

.login-header-btn:hover {
    background-color: transparent;
    color: #007bff !important;
    border-color: #007bff;
}

/* --- Profile Header Button --- */
.profile-header-btn {
    background-color: #28a745; /* لون أخضر للبروفايل */
    color: white !important;
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    border: 2px solid transparent;
    display: none; /* مخفي افتراضياً */
    align-items: center;
    gap: 8px;
}

.profile-header-btn:hover {
    background-color: transparent;
    color: #28a745 !important;
    border-color: #28a745;
}

.profile-header-btn i {
    font-size: 1.1rem;
}

/* --- Profile Styles --- */
.profile-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.profile-info h3 {
    color: #f5f5f5;
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}

.profile-info p {
    color: #9ca3af;
    margin: 0;
}

.btn.logout {
    background: #dc3545;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn.logout:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.profile-details {
    margin-top: 1rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.detail-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-item label {
    display: block;
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.detail-item span {
    color: #f5f5f5;
    font-size: 1.1rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .btn.logout {
        width: 100%;
    }
}
/* Article Category Badge */
.article-category-badge {
    display: inline-block;
    background: rgba(30, 64, 175, 0.15);
    border: 1px solid rgba(30, 64, 175, 0.3);
    color: #93c5fd;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    margin-bottom: 10px;
}
