/* ==========================================================================
   iziDizi — Card Components
   Service cards, blog cards, value cards, contact cards, stats, about,
   page header, CTA section, CTA banner, scroll reveal.
   ========================================================================== */

/* --- Service Cards -------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.service-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s, border-color 0.3s;
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
}

.service-card:hover::after { opacity: 1; }

.service-icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin-bottom: 1rem;
}

.service-card h3 { margin-bottom: 0.5rem; }

.service-card p { font-size: 0.9375rem; line-height: 1.7; }

/* --- Stats Section -------------------------------------------------------- */
.stats-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.stat-value {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* --- About Preview (index page) ------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.about-text h2 { margin-bottom: 1.25rem; }

.about-text p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.about-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
}

.about-visual {
  position: relative;
  height: 320px;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 4px 6px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.about-visual::before {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  top: 20%;
  left: 15%;
}

.about-visual::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  bottom: 15%;
  right: 15%;
  transform: rotate(15deg);
}

.about-shape {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  background: var(--accent-subtle);
  border: 1px solid var(--border);
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%) rotate(-10deg);
}

/* --- Blog Cards (index page) ---------------------------------------------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.blog-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s, border-color 0.3s;
}

.blog-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.blog-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.blog-card:hover::after { opacity: 1; }

.blog-date {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

.blog-card h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.blog-card p {
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.blog-link {
  font-size: 0.8125rem;
  font-weight: 600;
}

/* --- CTA Section ---------------------------------------------------------- */
.cta-section {
  text-align: center;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-section h2 { margin-bottom: 1rem; }

.cta-section p {
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* --- Contact Items (index page) ------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.contact-item { text-align: center; }

.contact-item svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
  margin: 0 auto 0.75rem;
}

.contact-item h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-item p { font-size: 0.9375rem; }

/* --- Page Header (subpages) ----------------------------------------------- */
.page-header {
  background:
    radial-gradient(ellipse 60% 40% at 30% 50%, rgba(224, 120, 86, 0.04), transparent),
    radial-gradient(ellipse 50% 35% at 70% 50%, rgba(37, 99, 235, 0.03), transparent),
    linear-gradient(135deg, var(--bg-deep) 0%, #1a1f3a 50%, var(--bg-deep) 100%);
  padding: clamp(3.5rem, 8vw, 5rem) 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.page-header .subtitle {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Content Block (about page) ------------------------------------------- */
.content-block {
  max-width: 800px;
  margin: 0 auto;
  font-size: 0.9375rem;
  line-height: 1.8;
}

.content-block p { margin-bottom: 1rem; }

.content-block h2 {
  font-size: 1.25rem;
  margin: 2.5rem 0 1rem;
}

/* --- Value Cards (about page) --------------------------------------------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.value-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s, border-color 0.3s;
}

.value-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.value-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
}

.value-card:hover::after { opacity: 1; }

.value-card h3 { margin-bottom: 0.5rem; }

.value-card p { font-size: 0.875rem; line-height: 1.7; }

/* --- Blog List (blog page) ------------------------------------------------ */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.blog-post {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s, border-color 0.3s;
}

.blog-post::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.blog-post:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.blog-post:hover::after { opacity: 1; }

.blog-post h2 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.blog-post h2 a {
  color: var(--text-primary);
}

.blog-post h2 a:hover { color: var(--accent); }

.blog-post > p {
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* --- Tags ----------------------------------------------------------------- */
.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  color: var(--link-color);
}

/* --- Pagination ----------------------------------------------------------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.pagination a:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  text-decoration: none;
}

.pagination a.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* --- Contact Cards (contact page) ----------------------------------------- */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto 3rem;
}

.contact-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s, border-color 0.3s;
}

.contact-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.contact-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.contact-card:hover::after { opacity: 1; }

.contact-card svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
  margin: 0 auto 1rem;
}

.contact-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.contact-card p { font-size: 0.9375rem; }

.contact-card .label {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-top: 0.5rem;
}

/* --- CTA Banner ----------------------------------------------------------- */
.cta-banner {
  background: linear-gradient(135deg, #0F1B2D 0%, #142847 100%);
  border-top: 1px solid rgba(37, 99, 235, 0.15);
  border-bottom: 1px solid rgba(37, 99, 235, 0.15);
  padding: clamp(3rem, 8vw, 5rem) 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(37, 99, 235, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.cta-banner h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
  position: relative;
}

.cta-banner > .container > p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.0625rem;
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.7;
  position: relative;
}

.cta-banner-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.btn-cta-primary {
  background: #fff;
  color: var(--accent);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: all 0.25s;
  text-decoration: none;
}

.btn-cta-primary:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-cta-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.75);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: all 0.25s;
  text-decoration: none;
}

.btn-cta-secondary:hover {
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* --- About Content (index page about section) ----------------------------- */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-content p {
  font-size: 0.9375rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* --- Scroll Reveal -------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive: Tablet (max 1024px) -------------------------------------- */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Responsive: Mobile (max 768px) --------------------------------------- */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-visual { height: 240px; }

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

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

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

  .blog-post { padding: 1.5rem; }

  .hero-trust-card-inner {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
  }

  .hero-trust-divider {
    width: 100%;
    height: 1px;
  }
}

/* --- Responsive: Small mobile (max 480px) --------------------------------- */
@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Light Theme — Card Overrides
   ========================================================================== */

[data-theme="light"] {
  --shadow-hover-light: 0 4px 12px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

/* --- Cards: base shadow fix ----------------------------------------------- */
[data-theme="light"] .service-card,
[data-theme="light"] .blog-card,
[data-theme="light"] .value-card,
[data-theme="light"] .contact-card,
[data-theme="light"] .blog-post {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* --- Cards: hover shadow via ::after -------------------------------------- */
[data-theme="light"] .service-card::after,
[data-theme="light"] .value-card::after {
  box-shadow: var(--shadow-hover-light);
}

[data-theme="light"] .blog-card::after,
[data-theme="light"] .contact-card::after,
[data-theme="light"] .blog-post::after {
  box-shadow: var(--shadow-hover-light);
}

/* --- About Visual (hardcoded shadows) ------------------------------------- */
[data-theme="light"] .about-visual {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* --- Page Header (hardcoded gradient) ------------------------------------- */
[data-theme="light"] .page-header {
  background:
    radial-gradient(ellipse 60% 40% at 30% 50%, rgba(37, 99, 235, 0.04), transparent),
    radial-gradient(ellipse 50% 35% at 70% 50%, rgba(37, 99, 235, 0.03), transparent),
    linear-gradient(135deg, #FAFAF7 0%, #F0EFEB 50%, #FAFAF7 100%);
}

/* --- CTA Banner (light theme: medium blue) -------------------------------- */
[data-theme="light"] .cta-banner {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  border-top-color: transparent;
  border-bottom-color: transparent;
}

[data-theme="light"] .cta-banner::before {
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
}
