/* =============================================
   الصدفين المبتكرة — Blog Stylesheet (Dark Premium)
   ============================================= */

/* Body dark background for blog */
body.blog-page {
  background: #0a1628;
}
body.blog-page .footer {
  border-top: 1px solid rgba(200,164,94,.08);
}

/* ── Blog Hero ── */
.blog-hero {
  min-height: 48vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #050d1a 0%, var(--navy) 40%, var(--petrol) 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(200,164,94,.08) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(26,58,92,.15) 0%, transparent 50%);
}

.blog-hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.bh-shape {
  position: absolute;
  border-radius: 50%;
  opacity: .05;
  background: var(--gold);
  animation: float 8s ease-in-out infinite;
}
.bh-shape:nth-child(1) { width: 350px; height: 350px; top: -80px; right: -60px; }
.bh-shape:nth-child(2) { width: 200px; height: 200px; bottom: 15%; left: 8%; animation-delay: 3s; }
.bh-shape:nth-child(3) { width: 120px; height: 120px; top: 40%; right: 55%; animation-delay: 5s; }

.blog-hero-content {
  position: relative;
  z-index: 2;
  padding: 140px 24px 70px;
  max-width: 780px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200,164,94,.12);
  color: var(--gold);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: 20px;
  border: 1px solid rgba(200,164,94,.2);
  animation: fadeInUp .8s ease both;
}
.blog-hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 18px;
  animation: fadeInUp .8s ease .2s both;
}
.blog-hero-content h1 .highlight {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.blog-hero-content .hero-sub {
  font-size: clamp(.95rem, 1.8vw, 1.12rem);
  color: rgba(255,255,255,.55);
  max-width: 600px;
  margin: 0 auto;
  animation: fadeInUp .8s ease .4s both;
}

/* ── Blog Filters ── */
.blog-filters-section {
  background: linear-gradient(180deg, #050d1a 0%, #0a1628 100%);
  padding: 0;
  position: relative;
  z-index: 10;
}
.blog-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 32px 0 12px;
}
.filter-btn {
  background: rgba(255,255,255,.04);
  border: 1.5px solid rgba(255,255,255,.08);
  padding: 10px 24px;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Cairo', sans-serif;
  backdrop-filter: blur(4px);
}
.filter-btn:hover {
  color: var(--gold);
  border-color: rgba(200,164,94,.3);
  background: rgba(200,164,94,.06);
  transform: translateY(-2px);
}
.filter-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy);
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(200,164,94,.3);
}
.filter-btn i {
  font-size: .8rem;
}

/* ── Blog Grid ── */
.blog-section {
  background: linear-gradient(180deg, #0a1628 0%, #0d1b30 100%);
  padding: 40px 0 80px;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── Blog Card (Dark Premium) ── */
.blog-card {
  background: rgba(255,255,255,.03);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: all .4s cubic-bezier(.4,0,.2,1);
  border: 1px solid rgba(255,255,255,.06);
  opacity: 0;
  transform: translateY(30px);
  animation: cardReveal .6s ease forwards;
  display: flex;
  flex-direction: column;
}
.blog-card:nth-child(1) { animation-delay: .05s; }
.blog-card:nth-child(2) { animation-delay: .1s; }
.blog-card:nth-child(3) { animation-delay: .15s; }
.blog-card:nth-child(4) { animation-delay: .2s; }
.blog-card:nth-child(5) { animation-delay: .25s; }
.blog-card:nth-child(6) { animation-delay: .3s; }
.blog-card:nth-child(7) { animation-delay: .35s; }
.blog-card:nth-child(8) { animation-delay: .4s; }
.blog-card:nth-child(9) { animation-delay: .45s; }
.blog-card:nth-child(10) { animation-delay: .5s; }
.blog-card:nth-child(11) { animation-delay: .55s; }
.blog-card:nth-child(12) { animation-delay: .6s; }

@keyframes cardReveal {
  to { opacity: 1; transform: translateY(0); }
}

.blog-card:hover {
  transform: translateY(-8px);
  border-color: rgba(200,164,94,.2);
  box-shadow: 0 16px 48px rgba(0,0,0,.3), 0 0 0 1px rgba(200,164,94,.1);
  background: rgba(255,255,255,.05);
}

/* Card Image */
.blog-card-image {
  position: relative;
  overflow: hidden;
  height: 220px;
  border-radius: 12px;
  margin: 12px 12px 0;
}
.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  transition: transform .7s cubic-bezier(.4,0,.2,1);
}
.blog-card:hover .blog-card-image img {
  transform: scale(1.08);
}
.blog-card-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, rgba(5,13,26,.7), transparent);
  border-radius: 0 0 12px 12px;
}

/* Image overlay badges (Category + Date) */
.blog-card-image-meta {
  position: absolute;
  bottom: 12px;
  right: 14px;
  left: 14px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-card-category {
  padding: 5px 14px;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .5px;
  backdrop-filter: blur(8px);
}
.blog-card-category.catering {
  background: rgba(200,164,94,.85);
  color: var(--navy);
}
.blog-card-category.tech {
  background: rgba(26,58,92,.85);
  color: var(--white);
  border: 1px solid rgba(255,255,255,.15);
}
.blog-card-category.events {
  background: rgba(46,204,113,.85);
  color: var(--navy);
}
.blog-card-date-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: 50px;
}
.blog-card-date-badge i {
  color: var(--gold);
  font-size: .65rem;
}

/* Card Body */
.blog-card-body {
  padding: 20px 20px 16px;
  flex: 1;
}
.blog-card-body h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.7;
  margin-bottom: 10px;
  transition: color var(--transition);
}
.blog-card:hover .blog-card-body h3 {
  color: var(--gold);
}
.blog-card-body p {
  font-size: .84rem;
  color: rgba(255,255,255,.4);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Footer — Author + Read Time */
.blog-card-footer {
  padding: 0 20px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.05);
  margin-top: auto;
  padding-top: 16px;
}

/* Author section */
.blog-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 800;
  color: var(--navy);
  flex-shrink: 0;
  text-transform: uppercase;
}
.author-avatar.catering { background: var(--gold); }
.author-avatar.tech { background: #4fc3f7; }
.author-avatar.events { background: #66bb6a; }

.blog-card-author-name {
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255,255,255,.7);
}

/* Read time */
.blog-card-time {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .75rem;
  color: rgba(255,255,255,.35);
}
.blog-card-time i {
  color: var(--gold);
  font-size: .68rem;
}

/* Old footer styles (for homepage cards — keep compatible) */
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: .78rem;
  color: var(--gray-light);
}
.blog-card-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.blog-card-meta i {
  font-size: .72rem;
  color: var(--gold);
}
.blog-card-read {
  font-size: .82rem;
  font-weight: 700;
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.blog-card:hover .blog-card-read {
  color: var(--gold);
  gap: 10px;
}

/* ── Filter Animation ── */
.blog-card.hidden {
  display: none;
}

/* No results */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: rgba(255,255,255,.4);
  font-size: 1.1rem;
}

/* =============================================
   ARTICLE MODAL
   ============================================= */
.article-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
}
.article-modal.active {
  display: flex;
}

.article-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 13, 26, .9);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity .4s ease;
}
.article-modal.active .article-modal-overlay {
  opacity: 1;
}

.article-modal-content {
  position: relative;
  z-index: 2;
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 880px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
  transform: translateY(40px) scale(.96);
  opacity: 0;
  transition: transform .5s cubic-bezier(.34,1.56,.64,1), opacity .4s ease;
}
.article-modal.active .article-modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Custom scrollbar for modal */
.article-modal-content::-webkit-scrollbar { width: 6px; }
.article-modal-content::-webkit-scrollbar-track { background: var(--off-white); }
.article-modal-content::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 3px;
}

/* Modal Close */
.modal-close {
  position: sticky;
  top: 16px;
  float: left;
  margin: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(10,22,40,.7);
  color: var(--white);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}
.modal-close:hover {
  background: var(--gold);
  color: var(--navy);
  transform: rotate(90deg);
}

/* Modal Header */
.modal-header {
  position: relative;
  height: 340px;
  overflow: hidden;
}
.modal-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,22,40,.85) 0%, rgba(10,22,40,.2) 50%, transparent 100%);
}
.modal-header-meta {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 32px 40px;
  z-index: 2;
}
.modal-category {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.modal-category.catering {
  background: rgba(200,164,94,.9);
  color: var(--navy);
}
.modal-category.tech {
  background: rgba(26,58,92,.9);
  color: var(--white);
}
.modal-category.events {
  background: rgba(46,204,113,.9);
  color: var(--navy);
}
.modal-header-meta h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.5;
  margin-bottom: 12px;
}
.modal-info {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: .82rem;
  color: rgba(255,255,255,.7);
}
.modal-info span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.modal-info i {
  color: var(--gold);
}

/* Modal Body */
.modal-body {
  padding: 40px;
  line-height: 2;
  color: var(--navy);
}
.modal-body h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  margin: 32px 0 16px;
  padding-right: 16px;
  border-right: 4px solid var(--gold);
  line-height: 1.6;
}
.modal-body h2:first-child {
  margin-top: 0;
}
.modal-body p {
  font-size: .98rem;
  color: #3a4a5c;
  margin-bottom: 18px;
  line-height: 2.1;
}
.modal-body ul, .modal-body ol {
  margin: 16px 0 20px 0;
  padding-right: 24px;
}
.modal-body li {
  font-size: .95rem;
  color: #3a4a5c;
  margin-bottom: 10px;
  line-height: 1.9;
  position: relative;
  padding-right: 8px;
}
.modal-body ul li::before {
  content: '';
  position: absolute;
  right: -16px;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
.modal-body ol {
  counter-reset: item;
  list-style: none;
}
.modal-body ol li {
  counter-increment: item;
}
.modal-body ol li::before {
  content: counter(item) ".";
  position: absolute;
  right: -24px;
  font-weight: 800;
  color: var(--gold);
}
.modal-body blockquote {
  background: linear-gradient(135deg, rgba(200,164,94,.08), rgba(200,164,94,.03));
  border-right: 4px solid var(--gold);
  padding: 20px 28px;
  margin: 24px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--petrol);
  font-size: .95rem;
  line-height: 2;
}
.modal-body strong {
  color: var(--navy);
  font-weight: 700;
}
.modal-body .article-highlight-box {
  background: var(--off-white);
  border-radius: var(--radius-sm);
  padding: 24px 28px;
  margin: 24px 0;
  border: 1px solid rgba(200,164,94,.2);
}
.modal-body .article-highlight-box h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-body .article-highlight-box h3 i {
  color: var(--gold);
}

/* Modal Footer */
.modal-footer {
  padding: 24px 40px;
  border-top: 1px solid rgba(10,22,40,.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.modal-share {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--gray);
}
.modal-share a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-size: .95rem;
  transition: var(--transition);
}
.modal-share a:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-3px);
}
.modal-back-btn {
  font-size: .88rem;
  font-weight: 700;
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.modal-back-btn:hover {
  color: var(--gold);
  gap: 12px;
}

/* =============================================
   NEWSLETTER
   ============================================= */
.newsletter-section {
  background: linear-gradient(180deg, #0d1b30 0%, #050d1a 100%);
  padding: 0 0 80px;
}
.newsletter-card {
  background: linear-gradient(135deg, rgba(200,164,94,.08) 0%, rgba(26,58,92,.2) 100%);
  border: 1px solid rgba(200,164,94,.12);
  border-radius: 20px;
  padding: 56px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.newsletter-card::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(200,164,94,.04);
  top: -80px;
  left: -80px;
}
.newsletter-card::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(200,164,94,.03);
  bottom: -60px;
  right: -40px;
}
.newsletter-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(200,164,94,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.6rem;
  color: var(--gold);
  position: relative;
  z-index: 2;
}
.newsletter-card h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
}
.newsletter-card p {
  font-size: .95rem;
  color: rgba(255,255,255,.45);
  max-width: 480px;
  margin: 0 auto 28px;
  position: relative;
  z-index: 2;
}
.newsletter-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 10px;
  position: relative;
  z-index: 2;
}
.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border: 1.5px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  border-radius: 50px;
  font-size: .92rem;
  font-family: 'Cairo', sans-serif;
  color: var(--white);
  outline: none;
  transition: var(--transition);
}
.newsletter-form input::placeholder {
  color: rgba(255,255,255,.3);
}
.newsletter-form input:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,.08);
}
.newsletter-form button {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--navy);
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: .9rem;
  font-family: 'Cairo', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  white-space: nowrap;
}
.newsletter-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200,164,94,.4);
}

/* Success state */
.newsletter-form.success input {
  border-color: var(--green);
}
.newsletter-form.success button {
  background: var(--green);
  color: var(--white);
}

/* =============================================
   RESPONSIVE — Blog
   ============================================= */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .modal-header { height: 280px; }
  .modal-body { padding: 32px; }
  .modal-footer { padding: 20px 32px; }
}

@media (max-width: 768px) {
  .blog-hero { min-height: 42vh; }
  .blog-hero-content { padding: 120px 20px 50px; }
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .filter-btn {
    padding: 8px 18px;
    font-size: .82rem;
  }
  .blog-filters { gap: 8px; }
  .modal-header { height: 220px; }
  .modal-header-meta { padding: 20px 24px; }
  .modal-header-meta h1 { font-size: 1.2rem; }
  .modal-body { padding: 24px; }
  .modal-body h2 { font-size: 1.15rem; }
  .modal-footer { padding: 18px 24px; }
  .newsletter-card { padding: 40px 24px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { justify-content: center; }
  .modal-info { gap: 12px; font-size: .75rem; }
  .blog-card-image { height: 200px; }
}

@media (max-width: 480px) {
  .blog-hero { min-height: 38vh; }
  .blog-card-image { height: 180px; }
  .modal-header { height: 180px; }
  .modal-share { flex-wrap: wrap; }
}
