/* ========================================
   Swopnoshiri - Design System
   ======================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&family=Noto+Sans+Bengali:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
  /* Colors — White / Teal Blue / Black */
  --clr-bg: #ffffff;
  --clr-bg-2: #f0f9ff;
  --clr-bg-card: #ffffff;
  --clr-surface: #f1f5f9;
  --clr-primary: #0891b2;
  --clr-primary-dark: #0e7490;
  --clr-primary-light: #06b6d4;
  --clr-accent: #f59e0b;
  --clr-text: #1a1a2e;
  --clr-text-muted: #64748b;
  --clr-text-dark: #0f172a;
  --clr-border: rgba(15, 23, 42, 0.08);
  --clr-glass: rgba(255, 255, 255, 0.8);
  --clr-glass-border: rgba(15, 23, 42, 0.06);
  --clr-danger: #ef4444;
  --clr-success: #22c55e;

  /* Typography */
  --font-en: 'Inter', sans-serif;
  --font-bn: 'Hind Siliguri', 'Noto Sans Bengali', 'Kalpurush', sans-serif;
  --font-body: var(--font-en);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 30px rgba(13, 148, 136, 0.1);

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.lang-bn {
  font-family: var(--font-bn);
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: var(--clr-primary);
  transition: color var(--transition);
}

a:hover {
  color: var(--clr-primary-light);
}

ul {
  list-style: none;
}

/* ---- Utilities ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-4xl) 0;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--clr-text-muted);
  margin-bottom: var(--space-2xl);
  max-width: 600px;
}

.text-center {
  text-align: center;
}

.text-center .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-dark));
  color: #fff;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(20, 184, 166, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--clr-primary);
  border: 2px solid var(--clr-primary);
}

.btn-outline:hover {
  background: var(--clr-primary);
  color: #fff;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-danger {
  background: var(--clr-danger);
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

/* ---- Glass Card ---- */
.card {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(13, 148, 136, 0.2);
}

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card-body {
  padding: var(--space-lg);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--clr-text);
}

.card-text {
  color: var(--clr-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--clr-primary);
  margin-bottom: var(--space-sm);
  font-weight: 500;
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  transition: all var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
  padding: var(--space-sm) 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--clr-text);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-logo span {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a {
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--clr-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--clr-primary);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.lang-toggle {
  background: var(--clr-bg-2);
  color: var(--clr-text);
  border: 1px solid var(--clr-border);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-bn);
  font-weight: 600;
}

.lang-toggle:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--clr-text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a 0%, #134e4a 50%, #0f766e 100%);
  color: #f1f5f9;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-30px) rotate(3deg);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clr-primary);
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.2);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-lg);
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.15rem;
  color: rgba(241, 245, 249, 0.7);
  margin-bottom: var(--space-2xl);
  line-height: 1.8;
}

.hero-btns {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ---- About ---- */
.about-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.about-img-wrap {
  position: relative;
}

.about-img-wrap img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 3px solid var(--clr-glass-border);
}

.about-img-wrap::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: 10px;
  bottom: 10px;
  border: 2px solid var(--clr-primary);
  border-radius: var(--radius-lg);
  z-index: -1;
  opacity: 0.3;
}

.about-info h3 {
  font-size: 1.6rem;
  margin-bottom: var(--space-sm);
}

.about-info .role {
  font-size: 1rem;
  color: var(--clr-primary);
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

.about-info p {
  color: var(--clr-text-muted);
  line-height: 1.9;
}

/* ---- Books ---- */
.book-card .card-img {
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  background: #f8fafc; /* Light background for empty spaces */
}

/* ---- Mosque ---- */
.mosque-card .card-img {
  height: 200px;
}

.mosque-card .location {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.85rem;
  color: var(--clr-primary);
  margin-bottom: var(--space-sm);
}

.mosque-card .waqt {
  display: inline-block;
  background: rgba(20, 184, 166, 0.1);
  color: var(--clr-primary);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

/* ---- Blog ---- */
.blog-card .card-img {
  height: 200px;
}

/* ---- Handicrafts ---- */
.handicraft-card .card-img {
  height: 260px;
}

/* ---- YouTube ---- */
.youtube-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--space-xl);
}

.youtube-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--clr-glass-border);
}

.youtube-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ---- Business ---- */
.biz-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.biz-card .card-img {
  height: 100%;
  min-height: 250px;
}

.biz-card .card-body {
  padding: var(--space-2xl);
}

/* ---- Contact / Social ---- */
.social-links {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  color: var(--clr-text);
  font-weight: 500;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.social-link:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ---- New Contact Cards ---- */
.contact-card-new {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.contact-card-new:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--clr-primary);
}

.contact-icon-new {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-light));
  border-radius: 50%;
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  color: #fff;
}

@media (max-width: 768px) {
  .contact-card-new {
    min-width: 100%;
  }
}

/* ---- Page Header ---- */
.page-header {
  background: var(--clr-bg);
  padding: 140px 0 var(--space-2xl);
  border-bottom: 1px solid var(--clr-border);
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--clr-text);
}

.page-subtitle {
  font-size: 1.1rem;
  color: var(--clr-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .page-header {
    padding: 100px 0 var(--space-xl);
  }
  .page-title {
    font-size: 1.8rem;
  }
}

/* ---- Footer ---- */
.footer {
  background: var(--clr-bg-2);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--clr-border);
  text-align: center;
  color: var(--clr-text-muted);
  font-size: 0.9rem;
}

/* ---- Back to Top ---- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--clr-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-md);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

/* ---- Loading ---- */
.loading-screen {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s, visibility 0.5s;
}

.loading-screen.hide {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--clr-surface);
  border-top-color: var(--clr-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Animations ---- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s, transform 0.7s;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-img-wrap {
    max-width: 300px;
    margin: 0 auto;
  }

  .biz-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .section {
    padding: var(--space-3xl) 0;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.97);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-xl);
    z-index: 100;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .mobile-menu-btn {
    display: block;
    z-index: 200;
  }

  .youtube-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .hero-btns {
    flex-direction: column;
  }
}

/* ========================================
   Admin Panel Styles
   ======================================== */

/* ---- Admin Layout ---- */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

.login-card {
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius-lg);
  padding: var(--space-3xl);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  color: #f1f5f9;
}

.login-card h1 {
  font-size: 1.75rem;
  margin-bottom: var(--space-sm);
  text-align: center;
}

.login-card p {
  color: #94a3b8;
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.admin-wrapper {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: #1e293b;
  padding: var(--space-xl);
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  color: #f1f5f9;
}

.admin-sidebar .logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--clr-primary);
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--clr-border);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.65rem var(--space-md);
  border-radius: var(--radius-sm);
  color: #94a3b8;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(20, 184, 166, 0.1);
  color: var(--clr-primary);
}

.sidebar-nav a.active {
  font-weight: 600;
}

.admin-main {
  padding: var(--space-2xl);
  overflow-y: auto;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--clr-border);
}

.admin-header h2 {
  font-size: 1.5rem;
}

/* ---- Form Styles ---- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-label .lang-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  margin-left: var(--space-xs);
  font-weight: 700;
  text-transform: uppercase;
}

.lang-badge-en {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.lang-badge-bn {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.7rem var(--space-md);
  background: #f1f5f9;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  color: var(--clr-text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.form-input[lang="bn"],
.form-textarea[lang="bn"] {
  font-family: var(--font-bn);
  font-size: 1.05rem;
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* ---- Item List ---- */
.item-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.item-card {
  background: var(--clr-bg-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.item-card:hover {
  border-color: rgba(13, 148, 136, 0.2);
  box-shadow: var(--shadow-md);
}

.item-card-img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.item-card-info {
  flex: 1;
  min-width: 0;
}

.item-card-info h4 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-card-info p {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-card-actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* ---- Toast ---- */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  background: #ffffff;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  min-width: 280px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease-out;
  border-left: 3px solid var(--clr-success);
}

.toast.error {
  border-left-color: var(--clr-danger);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ---- Admin Panel ---- */
.panel-section {
  display: none;
}

.panel-section.active {
  display: block;
}

.add-btn {
  margin-bottom: var(--space-xl);
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: #ffffff;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.3s;
  box-shadow: var(--shadow-lg);
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-xl);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

/* ---- Admin Responsive ---- */
@media (max-width: 768px) {
  .admin-wrapper {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: fixed;
    left: -300px;
    width: 260px;
    z-index: 1000;
    transition: left 0.3s;
  }

  .admin-sidebar.open {
    left: 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ---- Read More Link ---- */
.read-more-link {
  display: inline-block;
  margin-top: var(--space-sm);
  color: var(--clr-primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.card:hover .read-more-link {
  color: var(--clr-primary-dark);
}

/* ---- Detail Modal (Books / Handicrafts) ---- */
.detail-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  padding: var(--space-lg);
}

.detail-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.detail-modal {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.3s ease;
  position: relative;
}

.detail-modal-overlay.open .detail-modal {
  transform: scale(1) translateY(0);
}

/* Blog Modal - larger for reading */
.detail-modal-overlay.blog-modal .detail-modal {
  max-width: 720px;
  max-height: 90vh;
}

.detail-modal-overlay.blog-modal .detail-modal-body {
  padding: var(--space-xl) var(--space-2xl) var(--space-2xl);
}

.detail-modal-overlay.blog-modal .detail-modal-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--clr-text);
}

.detail-modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 2;
  color: var(--clr-text-muted);
}

.detail-modal-close:hover {
  background: var(--clr-danger);
  color: #fff;
}

.detail-modal-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.detail-modal-body {
  padding: var(--space-xl) var(--space-2xl) var(--space-2xl);
}

.detail-modal-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: var(--space-md);
}

.detail-modal-body p {
  color: var(--clr-text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

/* ---- Blog Full View ---- */
.blog-full-view {
  min-height: 100vh;
  background: var(--clr-bg);
  padding: var(--space-3xl) 0;
}

.blog-back-btn {
  margin-bottom: var(--space-2xl);
}

.blog-full-article {
  max-width: 800px;
  margin: 0 auto;
}

.blog-full-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-md);
}

.blog-full-content {
  padding: 0 var(--space-md);
}

.blog-full-date {
  font-size: 0.85rem;
  color: var(--clr-primary);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-full-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--clr-text);
  margin-bottom: var(--space-xl);
  line-height: 1.3;
}

.blog-full-body {
  font-size: 1.1rem;
  color: var(--clr-text-muted);
  line-height: 2;
  white-space: pre-line;
}

/* ---- Admin Panel Dark Overrides ---- */
#adminPanel .form-input,
#adminPanel .form-textarea {
  background: #334155;
  border-color: rgba(148, 163, 184, 0.15);
  color: #f1f5f9;
}

#adminPanel .form-input:focus,
#adminPanel .form-textarea:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

#adminPanel .form-label {
  color: #94a3b8;
}

#adminPanel .admin-main {
  background: #0f172a;
  color: #f1f5f9;
}

#adminPanel .admin-header {
  border-bottom-color: rgba(148, 163, 184, 0.12);
}

#adminPanel .admin-header h2 {
  color: #f1f5f9;
}

#adminPanel .item-card {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(148, 163, 184, 0.12);
  color: #f1f5f9;
}

#adminPanel .item-card-info h4 {
  color: #f1f5f9;
}

#adminPanel .item-card-info p {
  color: #94a3b8;
}

@media (max-width: 768px) {
  .detail-modal-img {
    height: 200px;
  }

  .blog-full-img {
    height: 220px;
  }

  .blog-full-title {
    font-size: 1.5rem;
  }
}