/**
 * components/materials/materials.css
 * استایل اختصاصی صفحه راهنمای انتخاب جنس فریم عینک طبی صدف
 */

:root {
  --transition-speed: 0.3s;
  --brand-color: #d4a300;
  --brand-color-dark: #b88d00;
  --bg-light: #fafafa;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.12);
  --border-radius: 16px;
}

.materials-page-wrapper {
  background-color: var(--bg-light);
  color: #333;
  padding-bottom: 80px;
  overflow: hidden;
}

/* =========================================
   1. Hero Section
   ========================================= */
.materials-hero {
  position: relative;
  background: radial-gradient(circle at 10% 20%, #1e1e1e 0%, #111111 90%);
  color: #fff;
  padding: 90px 0 100px;
  text-align: center;
  overflow: hidden;
}

.materials-hero .hero-content {
  position: relative;
  z-index: 2;
  max-width: 850px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-subtag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(214, 163, 0, 0.15);
  color: var(--brand-color, #d4a300);
  border: 1px solid rgba(214, 163, 0, 0.3);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.materials-hero .hero-title {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 20px;
  color: #fff;
  line-height: 1.4;
}

.materials-hero .hero-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--brand-color, #d4a300);
  margin: 15px auto 0;
  border-radius: 2px;
}

.materials-hero .hero-subtitle {
  font-size: 16px;
  line-height: 1.8;
  color: #ccc;
  font-weight: 300;
}

.materials-hero .hero-bg-glow {
  position: absolute;
  top: -50%;
  left: -20%;
  width: 70%;
  height: 200%;
  background: radial-gradient(circle, rgba(214, 163, 0, 0.12) 0%, rgba(0,0,0,0) 60%);
  z-index: 1;
  pointer-events: none;
  filter: blur(40px);
}

/* =========================================
   2. Shared Section Layout
   ========================================= */
.section-title-wrap {
  text-align: center;
  margin-bottom: 50px;
  padding: 0 20px;
}

.section-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFF7E6;
  color: #8b6b00;
  border: 1px solid rgba(214, 163, 0, 0.25);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-title-wrap h2 {
  font-size: 28px;
  color: #111;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-title-wrap p {
  font-size: 15px;
  color: #666;
}

/* =========================================
   3. Materials Grid / Cards
   ========================================= */
.materials-grid-section {
  padding: 85px 0 60px;
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 25px;
}

.material-card {
  background: #fff;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-speed) cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.material-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
}

.card-img-holder {
  position: relative;
  height: 300px;
  overflow: hidden;
}

.card-img-holder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.material-card:hover .card-img-holder img {
  transform: scale(1.06);
}

.card-img-overlay {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.card-info {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-info h3 {
  font-size: 22px;
  font-weight: 850;
  margin-bottom: 12px;
  color: #111;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-info h3 i {
  color: var(--brand-color);
  font-size: 18px;
}

.card-desc {
  font-size: 14.5px;
  line-height: 1.8;
  color: #666;
  margin-bottom: 20px;
}

.card-specs {
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  padding: 18px 0;
  margin-bottom: 24px;
}

.spec-item {
  display: flex;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.spec-item:last-child {
  margin-bottom: 0;
}

.spec-label {
  font-weight: 700;
  color: #222;
  min-width: 140px;
  flex-shrink: 0;
}

.spec-val {
  color: #555;
}

.dyk-card-box {
  background-color: #fcf8e3;
  border-right: 4px solid var(--brand-color);
  padding: 12px 16px;
  border-radius: 4px 12px 12px 4px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #725300;
  margin-bottom: 25px;
}

.dyk-card-box strong {
  color: #523c00;
  display: block;
  margin-bottom: 4px;
}

.card-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #111;
  color: #fff;
  padding: 12px 25px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.card-cta:hover {
  background-color: var(--brand-color);
  color: #111;
  box-shadow: 0 6px 20px rgba(214, 163, 0, 0.3);
  transform: translateY(-2px);
}

.card-cta i {
  transition: transform var(--transition-speed) ease;
}

.card-cta:hover i {
  transform: translateX(-4px);
}

/* =========================================
   3.5. Comparison Table Section
   ========================================= */
.materials-comparison-section {
  padding: 80px 0;
  background-color: #fff;
  border-top: 1px solid #eee;
}

.materials-comparison-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 25px;
}

.comparison-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.04);
  border: 1px solid #ebebeb;
}

.materials-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
  text-align: right;
  min-width: 700px;
}

.materials-table th {
  background: #181818;
  color: #fff;
  padding: 18px 20px;
  font-weight: 800;
  font-size: 15px;
  border-bottom: 2px solid #333;
}

.materials-table th.highlight-col {
  background: #252014;
  color: var(--brand-color, #d4a300);
  border-bottom: 2px solid var(--brand-color, #d4a300);
}

.materials-table td {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  color: #444;
  line-height: 1.6;
}

.materials-table tr:last-child td {
  border-bottom: none;
}

.materials-table tr:hover td {
  background-color: #fafafa;
}

.materials-table td.highlight-col {
  background-color: #FFFDF8;
  font-weight: 600;
}

.badge-good {
  display: inline-block;
  background: #eef7ee;
  color: #27ae60;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12.5px;
}

.table-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #111;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-speed) ease;
}

.table-link-btn:hover {
  background: var(--brand-color, #d4a300);
  color: #111;
  transform: translateY(-2px);
}

/* =========================================
   3.6. Featured Products Section
   ========================================= */
.materials-products-section {
  padding: 80px 0;
  background-color: #fafafa;
  border-top: 1px solid #eee;
}

.materials-products-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 25px;
}

.materials-products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 20px;
  margin-top: 30px;
}

.materials-view-all {
  text-align: center;
  margin-top: 45px;
}

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #111111;
  color: #fff;
  padding: 13px 32px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14.5px;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.view-all-link:hover {
  background: var(--brand-color, #d4a300);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(214, 163, 0, 0.25);
}

.view-all-link i {
  font-size: 12px;
  transition: transform var(--transition-speed) ease;
}

.view-all-link:hover i {
  transform: translateX(-4px);
}

/* =========================================
   3.7. Style Quiz Bridge
   ========================================= */
.materials-quiz-bridge {
  padding: 40px 0 70px;
  background-color: #fafafa;
}

.materials-quiz-bridge .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 25px;
}

.quiz-bridge-card {
  background: linear-gradient(135deg, #FFF8E7 0%, #FFF3D1 100%);
  border: 1px solid rgba(214, 163, 0, 0.25);
  border-radius: 20px;
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  box-shadow: 0 8px 30px rgba(214, 163, 0, 0.08);
}

.quiz-bridge-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #8b6b00;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.quiz-bridge-text h2 {
  font-size: 22px;
  font-weight: 850;
  color: #553e00;
  margin-bottom: 10px;
}

.quiz-bridge-text p {
  font-size: 14.5px;
  line-height: 1.8;
  color: #6d5208;
  margin: 0;
  max-width: 720px;
}

.quiz-bridge-action {
  flex-shrink: 0;
}

.quiz-bridge-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #111;
  color: #fff;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14.5px;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.quiz-bridge-btn:hover {
  background: var(--brand-color, #d4a300);
  color: #111;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(214, 163, 0, 0.3);
}

.quiz-bridge-btn i {
  font-size: 12px;
  transition: transform var(--transition-speed) ease;
}

.quiz-bridge-btn:hover i {
  transform: translateX(-4px);
}

/* =========================================
   4. Did You Know Section (دانستنی‌ها)
   ========================================= */
.dyk-section {
  padding: 60px 0 80px;
  background-color: #f4f4f4;
}

.dyk-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.dyk-box-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.dyk-box-card {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.02);
  transition: transform var(--transition-speed) ease;
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.dyk-box-card:hover {
  transform: translateY(-5px);
}

.dyk-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(214, 163, 0, 0.1);
  color: var(--brand-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 22px;
  margin-bottom: 20px;
}

.dyk-box-card h4 {
  font-size: 16px;
  font-weight: 800;
  color: #111;
  margin-bottom: 12px;
}

.dyk-box-card p {
  font-size: 13.5px;
  line-height: 1.7;
  color: #666;
}

/* =========================================
   5. FAQs Section (سوالات متداول)
   ========================================= */
.faq-section {
  padding: 80px 0;
  background-color: #fff;
}

.faq-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.accordion details {
  background-color: var(--bg-light);
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.04);
  transition: all var(--transition-speed) ease;
}

.accordion details[open] {
  background-color: #fff;
  border-color: rgba(214, 163, 0, 0.3);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.04);
}

.accordion summary {
  padding: 18px 24px;
  font-size: 16px;
  font-weight: 700;
  color: #222;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 13px;
  color: #888;
  transition: transform var(--transition-speed) ease;
}

.accordion details[open] summary::after {
  transform: rotate(180deg);
  color: var(--brand-color);
}

.accordion details .faq-answer {
  padding: 0 24px 22px;
  font-size: 14.5px;
  line-height: 1.8;
  color: #555;
  border-top: 1px solid rgba(0,0,0,0.02);
  margin-top: 5px;
  padding-top: 15px;
}

/* =========================================
   6. Advice / Appointment Banner
   ========================================= */
.advice-section {
  padding: 40px 0 80px;
}

.advice-banner {
  background: linear-gradient(135deg, #1e1e1e 0%, #111111 100%);
  border-radius: var(--border-radius);
  color: #fff;
  padding: 45px 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.advice-banner::after {
  content: "";
  position: absolute;
  right: -5%;
  top: -20%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(214, 163, 0, 0.08) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
}

.advice-text {
  max-width: 700px;
  position: relative;
  z-index: 2;
}

.advice-text h3 {
  font-size: 24px;
  font-weight: 850;
  margin-bottom: 12px;
  color: #fff;
}

.advice-text p {
  font-size: 14.5px;
  line-height: 1.8;
  color: #ccc;
  margin: 0;
}

.advice-action {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.advice-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--brand-color);
  color: #111;
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 4px 15px rgba(214, 163, 0, 0.2);
}

.advice-btn:hover {
  background-color: #fff;
  color: #111;
  box-shadow: 0 6px 22px rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* =========================================
   7. Responsive Styles (ریسپانسیو)
   ========================================= */
@media (max-width: 992px) {
  .materials-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 20px;
  }
  
  .dyk-box-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .advice-banner {
    flex-direction: column;
    text-align: center;
    padding: 40px 30px;
    gap: 30px;
  }

  .advice-text {
    max-width: 100%;
  }

  .advice-btn {
    width: 100%;
    justify-content: center;
  }

  .materials-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quiz-bridge-card {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .quiz-bridge-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .materials-hero {
    padding: 60px 0 70px;
  }

  .materials-hero .hero-title {
    font-size: 28px;
  }

  .section-title-wrap h2 {
    font-size: 22px;
  }

  .card-img-holder {
    height: 220px;
  }

  .card-info {
    padding: 20px;
  }

  .card-info h3 {
    font-size: 19px;
  }

  .spec-label {
    min-width: 110px;
  }

  .materials-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 10px;
  }

  .quiz-bridge-text h2 {
    font-size: 19px;
  }

  .materials-table th, 
  .materials-table td {
    padding: 12px 14px;
    font-size: 13px;
  }
}
