* {
  margin: 0px;
  padding: 0px;
  box-sizing: border-box;
  scroll-behavior: smooth;
  font-family: "IRANSans", sans-serif;
}

:root {
  --primary: #b53835;
  --secondary: #323232;
}

@font-face {
  font-family: "IRANSans";
  src: url("./Fonts/IRANSans(FaNum).ttf") format("truetype");
  font-display: swap;
}

html,
body {
  height: 100%;
}

/* فونت و ریست */
body {
  margin: 0;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background: none;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("./img/back.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
  background-attachment: fixed;
}

/* هدر حرفه‌ای */
.main-header {
  background: var(--primary);
  color: #fff;
  padding: 10px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  position: sticky;
  z-index: 1001;
  top: 0;
  left: 0;
}

/* ظرف محتوا */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* بخش لوگو */
.logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
}

.logo-section img {
  width: 45px;
  height: 45px;
}

.logo-section span {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
}

/* منوی دسکتاپ */
.nav a {
  color: white;
  text-decoration: none;
  margin-left: 25px;
  font-size: 17px;
  transition: 0.2s;
  border-radius: 5px;
  padding: 10px;
}

.nav a:hover {
  background-color: white;
  color: black;
}

/* دکمه موبایل */
.hamburger {
  width: 30px;
  margin: 0px 0px 0px 25px;
  display: none;
  cursor: pointer;
}
.hamburger span {
  display: block;
  height: 3px;
  background: white;
  margin: 6px 0;
  transition: 0.3s;
}
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 8px);
}
.hamburger.active span:nth-child(2) {
  background-color: transparent;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -8px);
}

/* منوی موبایل */
.mobile-menu {
  background: var(--primary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.mobile-menu a {
  color: white;
  padding: 12px;
  text-decoration: none;
  font-size: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu.open {
  max-height: 300px;
}

/* --- بخش معرفی (Hero) --- */
.hero {
  text-align: center;
  padding: 100px 20px;
  color: white;
  background: rgba(0, 0, 0, 0.55);
  margin-top: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 1200px;
  margin: 30px auto;
  backdrop-filter: blur(4px);
}

.hero h1 {
  font-size: 32px;
  margin-bottom: 15px;
}

.hero p {
  font-size: 18px;
  line-height: 2;
  margin-top: 10px;
}

.hero-btn {
  display: inline-block;
  margin-top: 25px;
  padding: 12px 28px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 17px;
  transition: 0.3s;
}

.hero-btn:hover {
  background: #951f1c;
}

/* --- بخش راهنماهای مهم (Cards) --- */
.guides {
  padding: 60px 20px 20px 20px;
  text-align: center;
}

.guides h2 {
  font-size: 28px;
  margin-bottom: 30px;
  display: inline-block;
  background: rgba(255, 255, 255, 0.8);
  padding: 8px 20px;
  border-radius: 10px;
}

.guide-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

.card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(3px);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: 0.25s;
}

.card:hover {
  transform: translateY(-6px);
}

.card i {
  font-size: 40px;
  color: var(--primary);
  margin-bottom: 15px;
}

.card h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.guide-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 18px;
  background: #d32f2f;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: 0.3s;
}

.guide-btn:hover {
  background: #b71c1c;
}

/* --- بخش نکات مهم --- */
.tips {
  padding: 60px 20px;
  text-align: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  width: 90%;
  max-width: 1000px;
  margin: 40px auto;
  backdrop-filter: blur(3px);
  color: #fff;
}

.tips h2 {
  font-size: 26px;
  margin-bottom: 20px;
  color: #fff;
}

.tips li {
  margin: 10px 0;
  font-size: 18px;
  color: #f1f1f1;
  list-style: none;
}

.contact-page {
  width: 90%;
  max-width: 1000px;
  margin: 10px auto 40px auto;
  color: #222;
}

.emergency-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.emergency-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.number {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary);
  margin: 10px 0;
}

.warning-box {
  background: #fff3cd;
  border-right: 6px solid #ffcc00;
  padding: 20px;
  border-radius: 10px;
  margin-top: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.warning-box h3 {
  margin-bottom: 10px;
}

.emergency-prep {
  padding: 40px 20px;
  max-width: 1200px;
  margin: auto;
}

.emergency-prep h2 {
  color: #000;
  margin-bottom: 5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.emergency-prep h3 {
  color: #252525;
  margin-bottom: 25px;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.prep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.prep-card {
  background: #fff;
  padding: 18px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: 0.3s;
}

.prep-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.prep-card h4 {
  color: #d62828;
  margin-bottom: 8px;
  font-size: 16px;
}

.prep-card p {
  color: #555;
  line-height: 1.7;
  font-size: 14px;
}

.guides-page {
  width: 90%;
  max-width: 1100px;
  margin: 40px auto;
}

.guide-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.guide-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.guide-card i {
  color: var(--primary);
  margin-bottom: 15px;
}

.guide-card h3 {
  margin-bottom: 10px;
  color: var(--primary);
}

.card-btn {
  display: inline-block;
  margin-top: auto;
  padding: 8px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  transition: 0.3s;
  text-decoration: none;
}

.card-btn:hover {
  background: #922c2a;
}

.first-aid {
  padding: 40px 20px;
  text-align: center;
}

.section-title {
  font-size: 28px;
  margin-bottom: 30px;
  color: #222;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.aid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: auto;
}

.aid-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  text-align: right;
}

.aid-card h3 {
  color: #d32f2f;
  margin-bottom: 10px;
}

.aid-card p {
  color: #444;
  line-height: 1.8;
  font-size: 15px;
}

.kit-list {
  padding: 40px 20px;
  text-align: center;
}

.kit-list h2 {
  margin-bottom: 30px;
}

.kit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: auto;
}

.kit-group {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  text-align: right;
}

.kit-group h3 {
  color: #d62828;
  margin-bottom: 10px;
}

.kit-group ul {
  list-style: none;
  padding: 0;
}

.kit-group li {
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}

.kit-group li:last-child {
  border-bottom: none;
}

.accordion-section {
  padding: 40px 20px;
  max-width: 1200px;
  margin: auto;
}

.accordion {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  align-items: start;
}

.accordion-item {
  align-self: start;
}

.accordion-section h2 {
  margin-bottom: 20px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.accordion-item {
  background: #fff;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.accordion-title {
  width: 100%;
  text-align: right;
  padding: 15px;
  background: #f7f7f7;
  border: none;
  cursor: pointer;
  font-size: 17px;
  color: #d62828;
  font-weight: 600;
  transition: 0.3s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-title::before {
  content: "▼";
  font-size: 12px;
  transition: transform 0.3s;
}

.accordion-title.active::before {
  transform: rotate(180deg);
}

.accordion-title:hover {
  background: #eee;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 15px;
  transition: max-height 0.35s ease;
}

.accordion-content p {
  color: #555;
  padding: 10px 0 15px;
  line-height: 1.7;
}

.prep-page {
  width: 90%;
  max-width: 1000px;
  margin: 40px auto;
  color: #222;
}

.page-title {
  text-align: center;
  margin-bottom: 40px;
  margin: 30px 30px 0px 0px;
}

.page-title h1 {
  font-size: 32px;
  margin-bottom: 10px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.page-title p {
  font-size: 18px;
  color: #555;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.prep-section {
  background: rgba(255, 255, 255, 0.9);
  padding: 25px;
  margin-bottom: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.prep-section h2 {
  margin-bottom: 15px;
  color: var(--primary);
}

.check-list {
  padding-right: 20px;
}

.check-list li {
  margin: 10px 0;
  font-size: 17px;
  list-style: none;
}

.check-list li::before {
  content: "✔ ";
  color: var(--primary);
  font-weight: bold;
}

.home-safety {
  padding: 40px 20px;
  max-width: 1200px;
  margin: auto;
}

.home-safety h2 {
  margin-bottom: 5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.home-safety h3 {
  color: #252525;
  margin-bottom: 25px;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.safety-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.safety-card {
  background: #ffffff;
  padding: 18px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: 0.3s;
}

.safety-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.safety-card h4 {
  color: #d62828;
  margin-bottom: 8px;
  font-size: 17px;
}

.safety-card p {
  color: #555;
  line-height: 1.7;
  font-size: 14px;
}

/* Footer */
.footer {
  background: var(--secondary);
  color: #ddd;
  padding-top: 40px;
  margin-top: auto;
}

.footer-container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-section h3 {
  margin-bottom: 15px;
  color: #fff;
}

.footer-section p {
  line-height: 2.2;
  font-size: 14px;
}

.footer-section a {
  display: block;
  color: #ddd;
  text-decoration: none;
  margin-bottom: 10px;
  transition: 0.2s;
}

.footer-section a:hover {
  color: #ff4d4d;
}

/* شبکه اجتماعی */
.social {
  margin-top: 10px;
}

.social a {
  color: white;
  margin-left: 10px;
  font-size: 20px;
  transition: 0.2s;
}

.social a:hover {
  color: #ff4d4d;
}
.social a img {
  width: 45px;
  height: 45px;
}

/* پایین فوتر */
.footer-bottom {
  text-align: center;
  padding: 15px;
  margin-top: 30px;
  border-top: 1px solid #333;
  font-size: 14px;
}

#backToTop {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;

  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);

  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;

  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

#backToTop:hover {
  background: #f2f2f2;
  color: #323232;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.crisis-actions {
  padding: 40px 20px;
  max-width: 1200px;
  margin: auto;
}

.crisis-actions h2 {
  margin-bottom: 5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.crisis-actions h3 {
  color: #252525;
  margin-bottom: 25px;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.action-card {
  background: #fff;
  padding: 18px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: 0.3s;
}

.action-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.action-card h4 {
  color: #d62828;
  margin-bottom: 8px;
  font-size: 16px;
}

.action-card p {
  color: #555;
  line-height: 1.7;
  font-size: 14px;
}

@media (max-width: 1000px) {
  body::before {
    background-attachment: fixed;
  }

  .actions-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ====== Tablet ====== */
@media (max-width: 992px) {
  .container {
    width: 95%;
  }

  .logo-section img {
    width: 38px;
    height: 38px;
  }

  .logo-section span {
    font-size: 20px;
  }

  .guide-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero p {
    font-size: 16px;
  }

  .nav {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .page-title {
    margin: 25px;
  }

  .page-title h1 {
    font-size: 26px;
  }

  .page-title p {
    font-size: 16px;
    line-height: 1.9;
  }

  .emergency-numbers {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .aid-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .kit-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .accordion {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .prep-page {
    width: 95%;
  }

  .prep-section {
    padding: 22px;
  }
}

/* ====== Mobile ====== */
@media (max-width: 768px) {
  .container {
    width: 95%;
  }

  .nav {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .hero {
    padding: 70px 15px;
  }

  .hero h1 {
    font-size: 22px;
  }

  .hero p {
    font-size: 15px;
    line-height: 1.8;
  }

  .hero-btn {
    padding: 10px 20px;
    font-size: 15px;
  }

  .guide-cards {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 20px;
  }

  .guides h2 {
    font-size: 22px;
  }

  .tips {
    padding: 40px 15px;
  }

  .tips h2 {
    font-size: 22px;
  }

  .tips li {
    font-size: 16px;
  }

  .logo-section span {
    font-size: 20px;
  }

  .actions-grid {
    grid-template-columns: 1fr;
  }

  .container {
    width: 95%;
  }

  .logo-section span {
    font-size: 18px;
  }

  .social {
    margin-top: 15px;
  }

  .hamburger {
    display: block;
  }

  .section-title {
    font-size: 22px;
  }

  .aid-container {
    grid-template-columns: 1fr;
  }

  .kit-grid {
    grid-template-columns: 1fr;
  }

  .accordion {
    grid-template-columns: 1fr;
  }

  .accordion-title {
    font-size: 15px;
    padding: 12px;
  }

  .accordion-content p {
    font-size: 14px;
  }

  .home-safety {
    padding: 30px 15px;
  }

  .home-safety h2 {
    font-size: 22px;
  }

  .home-safety h3 {
    font-size: 15px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* ====== Small phones ====== */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 20px;
  }

  .hero p {
    font-size: 14px;
  }

  .card i {
    font-size: 32px;
  }

  .card h3 {
    font-size: 18px;
  }

  .first-aid {
    padding: 25px 15px;
  }

  .kit-list {
    padding: 25px 15px;
  }

  .accordion-section {
    padding: 25px 15px;
  }

  .aid-card {
    padding: 15px;
  }

  .kit-group {
    padding: 15px;
  }

  .home-safety h2 {
    font-size: 20px;
  }

  .home-safety h3 {
    font-size: 14px;
  }
}
