*,
    *::before,
    *::after {
      box-sizing: border-box;
    }

    :root {
      --blue-dark: #1a2d4a;
      --blue-mid: #243b5c;
      --blue-accent: #3b6ea8;
      --gold: #c4a35a;
      --gold-light: #d4b87a;
      --bg-light: #f0f2f5;
      --bg-white: #ffffff;
      --text-dark: #1a2d4a;
      --text-muted: #5a6a7e;
      --text-light: #ffffff;
      --border: #e2e6ec;
      --container: 1140px;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      font-family: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
      color: var(--text-dark);
      line-height: 1.7;
      background: var(--bg-white);
    }

    img {
      max-width: 100%;
      height: auto;
      display: block;
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    .container {
      max-width: var(--container);
      margin: 0 auto;
      padding: 0 1.5rem;
    }

    /* ── Header ── */
    .site-header {
      background: var(--bg-white);
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: 0;
      z-index: 100;
    }

    .header-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1rem 0;
      gap: 1rem;
    }

    .header-right {
      display: flex;
      align-items: center;
      gap: 1.5rem;
      flex-wrap: wrap;
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .logo-mark {
      font-family: Georgia, "Times New Roman", serif;
      font-size: 1.75rem;
      font-weight: 700;
      color: var(--blue-dark);
      line-height: 1;
    }

    .logo-text strong {
      display: block;
      font-size: 0.88rem;
      font-weight: 700;
      color: var(--blue-dark);
    }

    .logo-text span {
      display: block;
      font-size: 0.68rem;
      color: var(--text-muted);
      margin-top: 0.15rem;
    }

    .nav {
      display: flex;
      align-items: center;
      gap: 0.15rem;
      flex-wrap: wrap;
    }

    .nav a {
      padding: 0.45rem 0.7rem;
      font-size: 0.8rem;
      font-weight: 500;
      color: var(--text-dark);
      position: relative;
      transition: color 0.2s;
    }

    .nav a:hover {
      color: var(--blue-accent);
    }

    .nav a.active {
      color: var(--blue-dark);
      font-weight: 600;
    }

    .nav a.active::after {
      content: "";
      position: absolute;
      bottom: 0;
      left: 0.7rem;
      right: 0.7rem;
      height: 2px;
      background: var(--blue-dark);
    }

    .search-btn {
      background: none;
      border: none;
      color: var(--text-dark);
      cursor: pointer;
      padding: 0.4rem;
      display: flex;
      align-items: center;
    }

    .search-btn:hover {
      color: var(--blue-accent);
    }

    .search-btn svg {
      width: 20px;
      height: 20px;
    }

    .menu-toggle {
      display: none;
      background: none;
      border: none;
      color: var(--text-dark);
      cursor: pointer;
      padding: 0.4rem;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .menu-toggle svg {
      width: 24px;
      height: 24px;
    }

    .menu-toggle:hover {
      color: var(--blue-accent);
    }

    /* ── Buttons ── */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      padding: 0.65rem 1.5rem;
      font-family: inherit;
      font-size: 0.88rem;
      font-weight: 600;
      border-radius: 4px;
      cursor: pointer;
      transition: background 0.2s, color 0.2s, border-color 0.2s;
      border: 2px solid transparent;
    }

    .btn-primary {
      background: var(--blue-dark);
      color: var(--text-light);
      border-color: var(--blue-dark);
    }

    .btn-primary:hover {
      background: var(--blue-mid);
      border-color: var(--blue-mid);
    }

    .btn-outline {
      background: transparent;
      color: var(--blue-dark);
      border-color: var(--gold);
    }

    .btn-outline:hover {
      background: var(--gold);
      color: var(--text-light);
    }

  .btn-outline-white {
      background: transparent;
      color: var(--text-light);
      border-color: var(--gold);
    }

    .btn-outline-white:hover {
      background: var(--gold);
      color: var(--blue-dark);
    }

    .btn-link {
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--blue-dark);
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
    }

    .btn-link:hover {
      color: var(--gold);
    }

    .btn-link .arrow {
      font-size: 0.75rem;
    }

    /* ── Section titles ── */
    .section-title {
      font-size: 1.35rem;
      font-weight: 700;
      color: var(--blue-dark);
      margin: 0 0 0.25rem;
      position: relative;
      padding-bottom: 0.6rem;
    }

    .section-title::after {
      content: "";
      position: absolute;
      bottom: 0;
      right: 0;
      width: 48px;
      height: 3px;
      background: var(--gold);
    }

    .section-header {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      margin-bottom: 2rem;
      gap: 1rem;
    }

    /* ── Hero ── */
    .hero {
      position: relative;
      min-height: 520px;
      overflow: hidden;
      display: flex;
      align-items: center;
      padding: 3.5rem 0 4rem;
    }

    .hero-bg {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center center;
      z-index: 0;
    }

    .hero-overlay {
      position: absolute;
      inset: 0;
      z-index: 1;
      pointer-events: none;
      background: linear-gradient(
        to right,
        rgba(245, 242, 236, 0.35) 0%,
        rgba(245, 242, 236, 0.08) 42%,
        transparent 68%
      );
    }

    .hero .container {
      position: relative;
      z-index: 2;
      width: 100%;
    }

    .hero-content {
      max-width: 38%;
      margin-right: auto;
      margin-left: 0;
      text-align: center;
    }

    .hero-content h1 {
      font-size: 2.4rem;
      font-weight: 700;
      color: var(--blue-dark);
      margin: 0 0 1rem;
      line-height: 1.3;
      text-align: center;
    }

    .hero-subtitle {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 1rem;
      margin-bottom: 1.25rem;
    }

    .hero-subtitle .line {
      flex: 1;
      height: 1px;
      background: var(--gold);
      max-width: 80px;
    }

    .hero-subtitle span {
      font-size: 0.95rem;
      color: var(--text-muted);
      font-weight: 500;
    }

    .hero-desc {
      color: var(--text-muted);
      font-size: 0.92rem;
      margin: 0 auto 2rem;
      max-width: 480px;
      text-align: center;
    }

    .hero-actions {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
      justify-content: center;
    }

    /* ── Stats ── */
    .stats {
      padding: 3rem 0;
      background: var(--bg-white);
    }

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1.5rem;
    }

    .stat-card {
      text-align: center;
      padding: 1.5rem 1rem;
      border: 1px solid var(--border);
      border-radius: 4px;
      background: var(--bg-white);
    }

    .stat-icon {
      width: 48px;
      height: 48px;
      margin: 0 auto 1rem;
      color: var(--gold);
    }

    .stat-number {
      font-size: 1.75rem;
      font-weight: 700;
      color: var(--blue-dark);
      margin: 0 0 0.35rem;
    }

    .stat-label {
      font-size: 0.82rem;
      color: var(--text-muted);
      margin: 0;
    }

    /* ── Notes (دفتر اندیشه) ── */
    .notes {
      padding: 3rem 0 4rem;
      background: var(--bg-light);
    }

    .notes-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1.5rem;
    }

    .note-card {
      background: var(--bg-white);
      border-radius: 4px;
      overflow: hidden;
      border: 1px solid var(--border);
      transition: transform 0.2s, box-shadow 0.2s;
    }

    .note-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 24px rgba(26, 45, 74, 0.1);
    }

    .note-card img {
      width: 100%;
      height: 180px;
      object-fit: cover;
    }

    .note-card-body {
      padding: 1.25rem;
    }

    .note-card h3 {
      font-size: 0.95rem;
      font-weight: 700;
      color: var(--blue-dark);
      margin: 0 0 0.6rem;
      line-height: 1.5;
    }

    .note-card p {
      font-size: 0.82rem;
      color: var(--text-muted);
      margin: 0 0 1rem;
      line-height: 1.6;
    }

    .note-card-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 0.75rem;
      color: var(--text-muted);
    }

    .note-tag {
      background: var(--bg-light);
      padding: 0.2rem 0.6rem;
      border-radius: 3px;
      font-weight: 500;
    }

    /* ── Services ── */
    .services {
      padding: 3rem 0 4rem;
      background: var(--bg-white);
    }

    .services-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.5rem;
    }

    .service-card {
      display: flex;
      align-items: flex-start;
      gap: 1.5rem;
      background: var(--bg-light);
      padding: 2rem;
      border-radius: 4px;
      border: 1px solid var(--border);
    }

    .service-icon {
      width: 72px;
      height: 72px;
      flex-shrink: 0;
      color: var(--blue-dark);
      stroke-width: 1.25;
    }

    .service-body {
      flex: 1;
      min-width: 0;
    }

    .service-card h3 {
      font-size: 1.05rem;
      font-weight: 700;
      color: var(--blue-dark);
      margin: 0 0 0.75rem;
    }

    .service-card p {
      font-size: 0.88rem;
      color: var(--text-muted);
      margin: 0 0 1.25rem;
      line-height: 1.7;
    }

    /* ── Library ── */
    .library {
      position: relative;
      padding: 2.75rem 0;
      background: var(--blue-dark);
      overflow: hidden;
    }

    .library-bg {
    position: absolute;
    inset: 0;
    background: var(--library-bg-image) center/cover no-repeat;
     }

    .library .container {
      position: relative;
      z-index: 1;
    }

    .library .section-title {
      color: var(--gold);
    }

    .library .section-title::after {
      background: var(--gold);
    }

    .library-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1.5rem;
      margin-top: 2.5rem;
    }

    .library-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.75rem;
      color: var(--text-light);
      text-decoration: none;
      transition: opacity 0.2s;
    }

    .library-item:hover {
      opacity: 0.85;
    }

    .library-icon {
      width: 64px;
      height: 64px;
      flex-shrink: 0;
      display: block;
      padding: 9px;
      box-sizing: border-box;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.86);
      box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.16),
      0 0 0 1px rgba(255, 255, 255, 0.35);
    }

    .library-item span {
      font-size: 0.88rem;
      font-weight: 500;
      text-align: center;
      line-height: 1.55;
      max-width: 8.5rem;
    }

    /* ── About ── */
    .about {
      padding: 3rem 0 4rem;
      background: var(--bg-white);
    }

    .about-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 3rem;
      align-items: center;
    }

    .about-text p {
      font-size: 0.92rem;
      color: var(--text-muted);
      margin: 0 0 1.5rem;
      line-height: 1.8;
    }

    .about-image {
      border-radius: 4px;
      overflow: hidden;
      box-shadow: 0 8px 32px rgba(26, 45, 74, 0.1);
    }

    .about-image img {
      width: 100%;
      height: 320px;
      object-fit: cover;
    }

    /* ── Quote ── */
    .quote {
      background: var(--blue-dark);
      padding: 3rem 0;
    }

    .quote-inner {
      display: flex;
      align-items: center;
      gap: 2rem;
      max-width: 800px;
      margin: 0 auto;
    }

    .quote-mark {
      font-size: 4rem;
      line-height: 1;
      color: var(--gold);
      font-family: Georgia, serif;
      flex-shrink: 0;
    }

    .quote p {
      font-size: 1.15rem;
      color: var(--text-light);
      margin: 0;
      font-weight: 400;
      line-height: 1.8;
    }

    /* ── Footer ── */
    .site-footer {
      background: var(--bg-light);
      padding: 3rem 0 0;
      border-top: 1px solid var(--border);
    }

    .footer-grid {
      display: grid;
      grid-template-columns: 1.2fr 1fr 1.2fr;
      gap: 2rem;
      padding-bottom: 2rem;
    }

    .footer-logo .logo-mark {
      font-size: 1.75rem;
    }

    .footer-logo p {
      font-size: 0.82rem;
      color: var(--text-muted);
      margin: 0.75rem 0 0;
      max-width: 260px;
    }

    .footer-col h4 {
      font-size: 0.9rem;
      font-weight: 700;
      color: var(--blue-dark);
      margin: 0 0 1rem;
    }

    .footer-links {
      list-style: none;
      margin: 0;
      padding: 0;
    }

    .footer-links li {
      margin-bottom: 0.5rem;
    }

    .footer-links a {
      font-size: 0.85rem;
      color: var(--text-muted);
      transition: color 0.2s;
    }

    .footer-links a:hover {
      color: var(--gold);
    }

    .contact-item {
      display: flex;
      align-items: flex-start;
      gap: 0.6rem;
      margin-bottom: 0.75rem;
      font-size: 0.85rem;
      color: var(--text-muted);
    }

    .contact-item svg {
      width: 18px;
      height: 18px;
      color: var(--gold);
      flex-shrink: 0;
      margin-top: 2px;
    }

    .social-links {
      display: flex;
      gap: 0.75rem;
      margin-top: 1.25rem;
    }

    .social-links a {
      width: 36px;
      height: 36px;
      border: 1px solid var(--border);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--blue-dark);
      transition: background 0.2s, color 0.2s, border-color 0.2s;
    }

    .social-links a:hover {
      background: var(--blue-dark);
      color: var(--text-light);
      border-color: var(--blue-dark);
    }

    .social-links svg {
      width: 16px;
      height: 16px;
    }

    .footer-bottom {
      border-top: 1px solid var(--border);
      padding: 1.25rem 0;
      text-align: center;
      font-size: 0.78rem;
      color: var(--text-muted);
    }

    .footer-admin-link {
      display: block;
      margin-bottom: 0.85rem;
      font-size: 0.8rem;
      font-weight: 500;
      color: var(--text-muted);
      text-align: left;
    }

    .footer-admin-link:hover {
      color: var(--gold);
    }

    /* ── Responsive ── */
    @media (max-width: 960px) {
      .header-inner {
        padding: 0.75rem 0;
        flex-wrap: wrap;
        gap: 0.5rem;
      }

      .header-right {
        flex: 1;
        gap: 0.75rem;
        flex-wrap: wrap;
        min-width: 0;
      }

      .header-right .nav {
        display: none;
        order: 3;
        width: 100%;
        flex-direction: column;
        background: var(--bg-white);
        border-top: 1px solid var(--border);
        padding: 0.5rem 0 0.75rem;
        gap: 0;
        margin-top: 0.25rem;
        box-shadow: 0 8px 20px rgba(26, 45, 74, 0.08);
      }

      .header-right .nav.is-open {
        display: flex;
      }

      .header-right .nav a {
        padding: 0.65rem 0.5rem;
        border-bottom: 1px solid var(--border);
      }

      .header-right .nav a:last-child {
        border-bottom: none;
      }

      .header-right .nav a.active::after {
        display: none;
      }

      .menu-toggle {
        display: flex;
      }

      .site-header .search-btn,
      .site-header .menu-toggle {
        flex-shrink: 0;
      }

      .hero {
        min-height: 460px;
        padding: 2.5rem 0 3rem;
      }

      .hero-content {
        max-width: 55%;
      }

      .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
      }

      .about-grid {
        grid-template-columns: 1fr;
      }

      .about-image img {
        height: 260px;
      }

      .stats-grid {
        grid-template-columns: repeat(2, 1fr);
      }

      .notes-grid {
        grid-template-columns: 1fr;
      }

      .services-grid {
        grid-template-columns: 1fr;
      }

      .service-card {
        gap: 1.25rem;
        padding: 1.5rem;
      }

      .service-icon {
        width: 56px;
        height: 56px;
      }

      .library {
        padding: 2.25rem 0;
      }

      .library-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
        margin-top: 2rem;
      }

      .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
      }

      .quote-inner {
        gap: 1.25rem;
      }

      .quote p {
        font-size: 1.05rem;
      }
    }

    @media (max-width: 560px) {
      .container {
        padding: 0 1rem;
      }

      .header-right .logo-text span {
        display: none;
      }

      .hero {
        min-height: auto;
        padding: 2rem 0 2.5rem;
        align-items: flex-start;
      }

      .hero-bg {
        object-position: 75% center;
      }

      .hero-content {
        max-width: 100%;
        margin: 0;
      }

      .hero-overlay {
        background: linear-gradient(
          to bottom,
          rgba(245, 242, 236, 0.92) 0%,
          rgba(245, 242, 236, 0.75) 45%,
          rgba(245, 242, 236, 0.2) 100%
        );
      }

      .hero-content h1 {
        font-size: 1.65rem;
      }

      .hero-subtitle span {
        font-size: 0.85rem;
      }

      .hero-subtitle .line {
        max-width: 48px;
      }

      .hero-desc {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
      }

      .hero-actions {
        flex-direction: column;
        align-items: stretch;
      }

      .hero-actions .btn {
        width: 100%;
      }

      .stats {
        padding: 2rem 0;
      }

      .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
      }

      .stat-card {
        padding: 1rem 0.75rem;
      }

      .stat-number {
        font-size: 1.4rem;
      }

      .stat-label {
        font-size: 0.75rem;
      }

      .notes,
      .services,
      .about {
        padding: 2rem 0 2.5rem;
      }

      .section-title {
        font-size: 1.15rem;
      }

      .library-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem 0.75rem;
      }

      .library-icon {
        width: 48px;
        height: 48px;
      }

      .library-item span {
        font-size: 0.8rem;
        max-width: 7rem;
      }

      .quote {
        padding: 2rem 0;
      }

      .quote-inner {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
      }

      .quote-mark {
        font-size: 2.75rem;
      }

      .quote p {
        font-size: 0.95rem;
        line-height: 1.75;
      }

      .site-footer {
        padding: 2rem 0 0;
      }

      .footer-logo p {
        max-width: none;
      }
    }
