:root {
  --bg: #fdfbf7;
  /* Warm paper/cream background */
  --card: #ffffff;
  /* Clean white for cards */
  --text: #2c2724;
  /* Dark charcoal/brown for text */
  --muted: #5e5754;
  /* Soft brownish grey */
  --accent: #0d9488;
  /* Deep teal/turquoise - Islamic art inspired */
  --border: #e6e1d6;
  /* Soft border color */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: 'Merriweather', 'Georgia', serif;
  background: #ffffff;
  color: var(--text);
  line-height: 1.7;
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
.logo,
.nav-link {
  font-family: 'Inter', system-ui, sans-serif;
  /* Keep headings modern or mix? Let's use Serif for headings for authority. */
  font-family: 'Playfair Display', 'Merriweather', serif;
}

.container {
  width: calc(100% - 6rem);
  max-width: none;
  margin: auto;
  padding: none;
}

.navbar {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(95% - 6rem);
  max-width: none;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  /* visually balanced vertical spacing */
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Floating Pill Look */
  border-radius: 50px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Gradient hint on top */
.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50px;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.1) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Scrolled State - Slightly more solid/compact */
.navbar-scrolled {
  background: rgba(253, 251, 247, 0.95);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
  top: 1rem;
  /* Move up slightly */
  width: calc(100% - 4rem);
  max-width: none;
  /* Expand slightly */
  border-color: rgba(255, 255, 255, 0.2);
  padding: 0.8rem 2rem;
  /* Compress slightly on scroll */
}

/* Homepage Initial Transparency - but still Glassy */
.navbar-transparent {
  background: rgba(255, 255, 255, 0.15);
  /* Glassy dark/light */
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.logo {
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
  /* Fix vertical alignment */
  font-family: 'Playfair Display', serif;
  color: var(--accent) !important;
  z-index: 1;
}

.navbar-transparent .logo {
  color: #fff;
}



.navbar nav {
  display: flex;
  gap: 0.2rem;
  z-index: 1;
  margin-left: auto;
  /* Push nav and search to the right */
}

.navbar nav a {
  margin-left: 0;
  /* Reset margins */
  text-decoration: none;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  transition: all 0.3s ease;
  color: var(--muted);
  position: relative;
}



/* Remove underline effect */
.navbar nav a::after {
  display: none;
}

/* Floating Link Hover Effect */
.navbar nav a:hover {
  background: rgba(13, 148, 136, 0.1);
  /* Light accent tint */
  color: var(--accent);
  transform: translateY(-1px);
}

.nav-socials {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}

.navbar nav .nav-socials a {
  width: auto;
  padding: 0.5rem;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0;
}
.navbar nav .nav-socials a:after {
  display: none !important;
}

/* Mobile Menu Button - Hidden by default */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  padding: 0.5rem;
}

/* Responsive Header */
/* Responsive Header */
@media (max-width: 768px) {
  .navbar {
    width: calc(95% - 2rem);
    max-width: none;
    padding: 0.8rem 1rem;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.5rem;
  }

  .logo {
    order: 1;
    font-size: 1.3rem;
    white-space: nowrap;
    line-height: normal;
  }

  .nav-actions {
    order: 2;
    margin-left: auto !important;
    display: flex;
    align-items: center;
  }

  .nav-actions .search-wrapper {
    margin-left: 0 !important;
  }

  .nav-socials {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    justify-content: center;
    width: 100%;
  }

  .mobile-menu-btn {
    display: block;
    order: 3;
    padding: 0.2rem 0.5rem;
  }

  .navbar nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    display: none;
    border: 1px solid var(--border);
    z-index: 999;
  }

  .navbar nav.active {
    display: flex;
  }

  .navbar nav a {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
}

.navbar-transparent nav a {
  color: rgba(255, 255, 255, 0.9);
}

.navbar-transparent nav a:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.navbar-scrolled nav a {
  color: var(--muted);
}

.navbar-scrolled nav a:hover {
  background: rgba(13, 148, 136, 0.1);
  color: var(--accent);
}

/* Nav Dropdown Styles */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-toggle {
  cursor: pointer;
  display: flex !important;
  align-items: center;
  gap: 0.3rem;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-width: 220px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  border: 1px solid rgba(13, 148, 136, 0.1);
  padding: 0.8rem !important;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  pointer-events: none;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(5px);
  pointer-events: auto;
}

.nav-dropdown-menu a {
  padding: 0.8rem 1rem !important;
  border-radius: 10px !important;
  color: var(--text) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500 !important;
  transition: background 0.2s, color 0.2s;
  background: transparent;
  width: 100%;
  box-sizing: border-box;
}

.nav-dropdown-menu a:hover {
  background: rgba(13, 148, 136, 0.08) !important;
  color: var(--accent) !important;
}

@media (max-width: 768px) {
  .nav-dropdown {
    width: 100%;
    display: block;
    text-align: center;
  }

  .nav-dropdown-menu {
    position: static;
    transform: none !important;
    opacity: 1;
    visibility: visible;
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0 !important;
    display: none;
    pointer-events: auto;
    width: 100%;
  }

  .nav-dropdown.active .nav-dropdown-menu {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .nav-dropdown-toggle {
    display: block !important;
    text-align: center !important;
    width: 100%;
    padding: 1rem 0 !important;
  }

  .nav-dropdown-menu a {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
    padding: 1rem 0 !important;
    margin: 0 !important;
  }
}



.hero-article-style {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  padding: 3rem;
  text-align: left;
  /* Reset centering */
  background: var(--card);
  /* Solid card background */
  border: 1px solid var(--border);
  min-height: auto;
  /* Allow content to dictate height */
  overflow: hidden;

  /* Keep floating rounded look */
  margin-top: 125px;
  width: calc(100% - 6rem);
  max-width: none;
  /* Slightly tighter for reading */
  margin-left: auto;
  margin-right: auto;
  border-radius: 40px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
  /* Increased shadow depth */
}

/* Remove old pseudo-elements for bg image */
.hero-article-style::before,
.hero-article-style::after {
  display: none;
}

.hero-image-container {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hero-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.hero-article-style:hover .hero-image-container img {
  transform: scale(1.05);
}

.hero-content {
  padding: 1rem;
}

.hero-content .tag {
  display: inline-block;
  margin-bottom: 1rem;
}

.hero-content h1 {
  color: var(--text);
  /* Dark text on light card */
  font-size: 2.2rem;
  /* Reduced to match other featured sections */
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-shadow: none;
  /* Clean text */
}

.hero-content p {
  color: var(--muted);
  font-size: 1rem;
  text-shadow: none;
  margin-bottom: 2rem;
  max-width: 100%;
}

/* Responsive */
@media (max-width: 900px) {
  .container {
    width: calc(100% - 2rem) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 1rem !important;
  }

  .page-header,
  .post-page {
    width: calc(100% - 2rem) !important;
    margin-top: 110px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-header {
    text-align: center !important;
  }

  .page-header h1,
  .page-header p {
    text-align: center !important;
  }

  .hero-modern {
    height: calc(100vh - 120px) !important;
    padding: 0.5rem !important;
  }

  .hero-article-style {
    width: calc(100% - 2rem) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    grid-template-columns: 1fr;
    grid-template-rows: 30% 70%;
    text-align: left;
    padding: 1.5rem !important;
    gap: 0.5rem;
    margin-top: 100px;
    height: 100%;
    border-radius: 20px;
    /* Prevent Mobile Navbar Overlap */
  }

  .hero-content {
    padding: 0.5rem;
  }

  .tag {
    margin-bottom: 0.5rem;
    font-size: 0.9rem !important;
  }

  .hero-content h1,
  .page-header h1,
  .post-title,
  .featured-content h2,
  .about-text h1 {
    font-size: 1.6rem !important;
    /* Hard limit for mobile to ensure consistency */
    margin-bottom: 0.5rem;
  }

  .hero-content p,
  .page-header p,
  .post-excerpt,
  .featured-content p,
  .about-text p {
    font-size: 0.95rem !important;
    margin-bottom: 1rem;
    line-height: 1.4;
  }

  .hero-image-container {
    min-height: unset;
    height: 100%;
    order: -1;
    border-radius: 40px;
    /* Image first */
  }

  .featured-post {
    grid-template-columns: 1fr !important;
    padding: 1.5rem !important;
    gap: 1.5rem !important;
    border-radius: 20px !important;
  }

  .posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
    gap: 1.5rem !important;
  }

  iframe,
  object,
  embed {
    max-width: 100% !important;
    height: auto;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-article-style .post-meta {
    justify-content: flex-start;
  }
}

@keyframes heroZoom {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.1);
  }
}

.hero h1 {
  font-size: 4.5rem;
  color: #fdfbf7;
  /* Cream/White text */
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.hero p {
  color: #e2e8f0;
  /* Light grey text */
  font-size: 1.4rem;
  margin-top: 1rem;
  font-family: 'Inter', sans-serif;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  max-width: 700px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  /* Sharper corners for academic look */
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  /* Premium default shadow */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  /* Enhanced premium hover shadow */
  border-color: var(--accent);
}

.post-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  filter: sepia(0.1);
  /* Slight vintage feel */
}

.post-content {
  padding: 1.5rem;
}

.tag {
  font-size: 1.1rem;
  /* Standardized larger font size */
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
}

.post-content h3 {
  margin: 0.6rem 0;
  font-size: 1.3rem;
  line-height: 1.3;
}

.post-content p {
  color: var(--muted);
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
}

.footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  margin-top: 5rem;
  background: transparent;
  /* Slightly darker bottom */
}

/* Page Header (Featured, Articles, etc.) */
.page-header {
  margin-top: 140px;
  /* Reduced header gap */
  width: calc(100% - 6rem);
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  text-align: center;

  /* White Card Style */
  background: white;
  padding: 2rem 2rem;
  border-radius: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  /* Stronger premium shadow for white bg */
  border: 1px solid rgba(255, 255, 255, 0.5);
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.page-header p {
  color: var(--muted);
  font-size: 1.1rem;
}

/* ---------- Post Page ---------- */

.post-page {
  width: calc(100% - 6rem);
  max-width: none;
  /* Matched hero section width */
  margin: 0 auto;
}

.post-article {
  margin-top: 125px;
  background: white;
  padding: 3rem 4rem;
  border-radius: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  /* Stronger premium shadow for white bg */
  border: 1px solid rgba(255, 255, 255, 0.5);
  margin-bottom: 5rem;
  overflow: visible;
}

.post-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.post-tag {
  color: var(--accent);
  font-weight: 600;
}

.post-title {
  font-size: 2.6rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.post-excerpt {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.post-body-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.book-post-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  /* Wider image column relative to before */
  gap: 4rem;
  align-items: start;
}

.book-sidebar {
  position: sticky;
  top: 140px;
  height: auto;
  gap: 1.5rem;
}

.post-hero {
  width: 100%;
  border-radius: 16px;
  margin: 0;
  position: sticky;
  top: 160px;
  /* Stays visible when scrolling with a margin under navbar */
}

@media (max-width: 900px) {

  .post-body-layout,
  .book-post-layout {
    grid-template-columns: 1fr;
  }

  .book-sidebar {
    position: static;
    margin-bottom: 2rem;
  }

  .post-hero {
    position: static;
    margin-bottom: 2rem;
  }
}

.post-content-full {
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-content-full h2,
.post-content-full h3 {
  margin: 2rem 0 1rem;
}

.post-content-full p {
  margin-bottom: 1.2rem;
}

.post-content-full ul {
  padding-left: 1.4rem;
  margin-bottom: 1.5rem;
}

.post-content-full li {
  margin-bottom: 0.5rem;
}

.post-content-full blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  margin: 2rem 0;
  color: var(--muted);
  font-style: italic;
}

.hero-modern {
  height: calc(100vh - 130px);
  padding: 2rem 3rem;
}

.featured-post {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  /* Image is smaller, text is wider */
  gap: 3rem;
  margin: 3rem 0;
  /* Increased margin for separation */
  align-items: center;

  /* Card Look */
  background: white;
  padding: 3rem;
  border-radius: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  /* Stronger premium shadow for white bg */
  border: 1px solid rgba(255, 255, 255, 0.5);
  /* Subtle highlight */
}

.featured-post img {
  width: 100%;
  border-radius: 20px;
}

.featured-content .tag {
  letter-spacing: 1px;
}

.featured-content h2 {
  font-size: 2.2rem;
  margin: 1rem 0;
}

/* =========================================
   FEATURED HERO CAROUSEL
   ========================================= */
.featured-hero-carousel {
  display: flex !important;
  gap: 0 !important;
  /* Spacing handled entirely by margins for perfect centering */
  overflow-x: auto !important;
  scroll-behavior: smooth !important;
  scroll-snap-type: x mandatory !important;
  padding: 0rem 0 4rem 0 !important;
  /* NO left/right padding! */
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
}

.featured-hero-carousel::-webkit-scrollbar {
  display: none !important;
}

/* Every slide gets uniform margins so that margin + width perfectly equals 100% of the view window (hence 1 visible at a time).
   This intrinsically handles centering, prevents shadow clipping, and removes the need for container gap tricks! */
.featured-hero-carousel .hero-slide {
  flex: 0 0 calc(100% - 2rem) !important;
  scroll-snap-align: center !important;
  margin: 0 2rem !important;
}

@media (max-width: 900px) {
  .featured-hero-carousel .hero-slide {
    flex: 0 0 calc(100% - 2rem) !important;
    margin: 0 1rem !important;
  }
}


.featured-content p {
  color: var(--muted);
  margin-bottom: 1.2rem;
}

/* Book Showcase (Modified Featured Post) */
.book-showcase {
  grid-template-columns: 0.5fr 1.5fr;
  /* Narrower left column for portrait book covers */
  gap: 4rem;
}

/* About Preview Card */
.about-preview-card {
  grid-template-columns: 1.2fr 0.8fr;
  /* Text left (wide), Image right (narrow) */
}

.book-cover-wrapper img {
  transition: transform 0.4s ease;
}

.book-showcase:hover .book-cover-wrapper img {
  transform: translateY(-5px) scale(1.02);
}

.read-more {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.read-more:hover {
  background: rgba(13, 148, 136, 0.1);
  /* Light accent tint */
  border: 1px solid rgba(13, 148, 136, 0.2);
  transform: translateY(-1px);
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 900px) {

  .featured-post,
  .book-showcase,
  .about-preview-card {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .read-more {
    font-size: 0.9rem !important;
  }
}

/* ---------- About Page ---------- */
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-top: 125px;
}

.about-image img {
  width: 100%;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.about-text h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.about-text p {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-btn {
  background: #f4f1ea;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid var(--border);
}

.social-btn:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .about-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ---------- Admin Panel (Visual Only) ---------- */
.admin-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.admin-sidebar h2 {
  font-size: 1.8rem;
  margin-bottom: 3rem;
  color: var(--accent);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-nav a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  border-bottom: none;
}

.admin-nav a:hover,
.admin-nav a.active {
  color: var(--accent);
  background: rgba(13, 148, 136, 0.1);
  padding-left: 1.2rem;
  /* Reset padding shift */
}

.admin-content {
  padding: 3rem 4rem;
  background: transparent;
  /* Show body gradient */
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.admin-header h1 {
  font-size: 2.5rem;
  font-family: 'Playfair Display', serif;
  color: var(--text);
}

.btn-primary {
  background: var(--accent);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  /* Pillow shape like navbar links */
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.2);
}

.btn-primary:hover {
  background: #0f766e;
}

/* Dashboard Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--card);
  padding: 1.5rem 2rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  /* Enhanced premium shadow */
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card h3 {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.stat-card .value {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text);
  font-family: 'Playfair Display', serif;
}

/* Admin Table */
.data-table-container {
  background: var(--card);
  border-radius: 24px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 1.2rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: rgba(0, 0, 0, 0.02);
  font-weight: 600;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.status-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-published {
  background: #dcfce7;
  color: #166534;
}

.status-draft {
  background: #f3f4f6;
  color: #4b5563;
}

.action-btn {
  color: var(--muted);
  text-decoration: none;
  margin-right: 0.8rem;
  font-size: 0.9rem;
}

.action-btn:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- Comment Section ---------- */
.comments-section {
  margin-top: 5rem;
  border-top: 1px solid var(--border);
  padding-top: 3rem;
  /* max-width removed */
}

.comments-section h3 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  font-family: 'Playfair Display', serif;
}

.comment-form {
  background: rgba(13, 148, 136, 0.08);
  /* Soft Teal matching homepage */
  color: var(--text);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid rgba(13, 148, 136, 0.2);
  margin-bottom: 3rem;
}

.comment-form h4 {
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  /* Changed from cream --bg to white --card */
  color: var(--text);
  font-family: 'Inter', sans-serif;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.comment-item {
  display: flex;
  gap: 1.5rem;
}

.comment-avatar {
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.comment-date {
  color: var(--muted);
  font-size: 0.85rem;
}

.comment-content p {
  color: var(--muted);
  line-height: 1.6;
}

/* Articles Slider */
.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  margin-left: 1rem;
}

.section-title {
  margin-bottom: 0;
  /* Override default */
}

.slider-controls {
  display: flex;
  gap: 1rem;
}

.slider-arrow {
  background: white;
  border: 1px solid var(--border);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--text);
  font-size: 1.2rem;
}

.slider-arrow:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.posts-slider {
  display: flex;
  gap: 0;
  /* Spacing handled by card margins */
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 1.5rem 0 3rem 0;
  /* NO horizontal padding */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.posts-slider::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.post-card {
  flex: 0 0 350px;
  /* Fixed width for slider cards */
  scroll-snap-align: center;
  margin: 0 1rem;
  /* Inherit 2rem total spacing and create native shadow room! */
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.30);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.post-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.post-content {
  padding: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .post-card {
    flex: 0 0 calc(100% - 2rem);
    /* The shrink trick for perfect mobile centering */
    margin: 0 1rem;
  }
}

/* ---------- About Page ---------- */

.about-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 4rem;
  align-items: start;

  /* Clear header */
  margin-top: 140px;
  /* Reduced from potential default */
  width: 100%;

  /* White Card Style */
  background: white;
  padding: 2.5rem;
  border-radius: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.5);
  margin-bottom: 5rem;
}

.about-image img {
  width: 100%;
  border-radius: 20px;
  height: auto;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.about-text h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  font-family: 'Playfair Display', serif;
  color: var(--text);
}

.about-text p {
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

.social-links {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-btn {
  padding: 0.8rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 50px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.social-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .about-section {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
    margin-top: 100px;
  }
}

/* SEARCH FEATURE (DROPDOWN STYLE) */
.search-wrapper {
  display: flex;
  align-items: center;
}

.search-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--muted);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.search-toggle:hover {
  background: rgba(13, 148, 136, 0.1);
  color: var(--accent);
}

.search-dropdown {
  position: absolute;
  top: 150%;
  right: 0;
  width: 320px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1100;
}

.search-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Arrow tip for dropdown */
.search-dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 14px;
  width: 12px;
  height: 12px;
  background: white;
  transform: rotate(45deg);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
}

#search-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  background: #fafafa;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 0.5rem;
}

#search-input:focus {
  border-color: var(--accent);
  background: white;
}

.search-results {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Custom Scrollbar for results */
.search-results::-webkit-scrollbar {
  width: 6px;
}

.search-results::-webkit-scrollbar-track {
  background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
  background: #e5e5e5;
  border-radius: 10px;
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.6rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.2s;
}

.search-result-item:hover {
  background: #fdfbf7;
}

.search-result-type {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  margin-top: 3px;
  white-space: nowrap;
}

.type-article {
  background: #e0f2fe;
  color: #0284c7;
}

.type-video {
  background: #fce7f3;
  color: #be185d;
}

.search-result-info h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.search-result-info p {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================================
   ADMIN PANEL STYLES
   ========================================= */

/* Desktop Layout */
.admin-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
  /* Use global body background instead of grey */
  background: transparent;
}

.admin-sidebar {
  /* Glassy Effect matching Navbar */
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid rgba(255, 255, 255, 0.4);
  padding: 2rem;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
}

.admin-sidebar h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--text);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-nav a {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(13, 148, 136, 0.1);
  color: var(--accent);
}

.admin-content {
  padding: 3rem;
  overflow-x: hidden;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--text);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.stat-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.stat-card h3 {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  font-family: 'Playfair Display', serif;
}

/* Default Mobile Toggle */
#admin-mobile-toggle {
  display: none;
}

.admin-overlay {
  display: none;
}

/* MOBILE RESPONSIVE ADMIN */
@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
    /* Stack layout */
    display: block;
  }

  /* Mobile Header / Toggle */
  #admin-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.4);
    z-index: 1200;
    transition: transform 0.2s;
  }

  #admin-mobile-toggle:active {
    transform: scale(0.95);
  }

  /* Off-canvas Sidebar */
  .admin-sidebar {
    background: #ffffff;
    /* Solid white to avoid grey overlay mix */
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 1300;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
  }

  .admin-sidebar.active {
    transform: translateX(0);
  }

  /* Overlay */
  .admin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1250;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    display: block;
    /* but hidden */
  }

  .admin-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Content Adjustments */
  .admin-content {
    padding: 1.5rem;
    padding-bottom: 100px;
    /* Space for fab */
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .admin-header h1 {
    font-size: 1.8rem;
  }

  /* Table responsive */
  .data-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
  }

  .data-table {
    min-width: 600px;
    /* Force scroll */
  }

  /* Form Grids to Stack */
  .admin-content .admin-view>div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem;
  }

  .stat-card {
    padding: 0.8rem 0.9rem;
  }

  .stat-card h3 {
    font-size: 0.7rem;
  }

  .stat-card .value {
    font-size: 1.3rem;
  }
}

/* =========================================
   POST & VIDEO PAGE MOBILE OPTIMIZATION
   ========================================= */
@media (max-width: 768px) {
  .post-article {
    padding: 2rem 1.5rem;
    /* Reduced from 3rem 4rem */
    margin-top: 1.5rem;
    margin-bottom: 3rem;
    border-radius: 20px;
    /* Reduced radius */
  }

  .post-title {
    font-size: 1.8rem;
    /* Reduced from 2.6rem */
    line-height: 1.3;
  }

  .post-content-full {
    font-size: 1rem;
    /* Reduced from 1.05rem */
  }

  .post-meta {
    margin-bottom: 0.5rem;
  }

  /* Video wrapper adjustments if needed */
  .video-wrapper {
    margin-bottom: 1.5rem !important;
  }
}

/* =========================================
   FEATURED CAROUSEL — Dots & Arrow styles
   ========================================= */

/* Dots inside carousel */
#hero-dots .hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  padding: 0;
}

#hero-dots .hero-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

/* Hide arrows on mobile */
@media (max-width: 900px) {
  .featured-carousel-arrows {
    display: none !important;
  }

  .carousel-dots {
    margin-top: -5.5rem !important;
  }
}
/* --- Category Tabs / Filters --- */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0.5rem;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.category-tab {
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.category-tab:hover {
  background: rgba(13, 148, 136, 0.06);
  color: var(--accent);
}

.category-tab.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

/* --- Action Buttons (Admin Tablosu İçin) --- */
.action-btn {
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  margin-right: 0 !important;
}

.action-btn:hover {
  background: rgba(13, 148, 136, 0.08);
  border-color: var(--accent);
  text-decoration: none !important;
}

.delete-btn {
  color: #dc2626 !important;
}

.delete-btn:hover {
  background: rgba(220, 38, 38, 0.08) !important;
  border-color: #dc2626 !important;
}

button.action-btn {
  background: transparent;
}

.admin-alert {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
}

.admin-alert-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.admin-alert-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.admin-alert.is-hiding {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.table-search {
  width: min(100%, 360px);
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
}

.table-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.admin-actions-cell {
  white-space: nowrap;
  min-width: 150px;
}

.admin-actions-cell form {
  display: inline-flex !important;
}

.admin-entry-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 2rem;
  align-items: start;
}

.admin-form-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-form-panel {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  min-width: 0;
}

.admin-form-main {
  padding: 2rem;
}

.admin-form-submit {
  width: 100%;
  justify-content: center;
  padding: 1rem;
  font-size: 1rem;
}

@media (max-width: 900px) {
  .admin-entry-form-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .admin-form-main,
  .admin-form-panel {
    padding: 1.25rem;
  }

  .admin-form-sidebar {
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .admin-header .action-btn,
  .admin-header .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .form-control {
    font-size: 16px;
  }

  textarea.form-control {
    min-height: 260px;
  }
}
