/* ═══════════════════════════════════════
   MADOREX — Pages CSS
   Subpage-specific components & layouts
   ═══════════════════════════════════════ */

/* ── Page Hero (Subpages) ────────────── */
.page-hero {
  position: relative;
  height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-primary);
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--bg-primary) 0%,
    rgba(26, 26, 26, 0.7) 50%,
    rgba(26, 26, 26, 0.4) 100%
  );
  z-index: 1;
}
.page-hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px 60px;
  width: 100%;
}
.page-hero-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 16px;
}
.page-hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.page-hero-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
}

/* ── Breadcrumb ──────────────────────── */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.breadcrumb a {
  color: var(--text-muted);
  transition: color 0.3s;
}
.breadcrumb a:hover {
  color: var(--accent-gold);
}
.breadcrumb span {
  margin: 0 8px;
  opacity: 0.5;
}

/* ── Dropdown Menu ───────────────────── */
.has-dropdown {
  position: relative;
}
.has-dropdown > .nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
}
.has-dropdown > .nav-link::before {
  display: none;
}
.dropdown-arrow {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform 0.3s var(--ease);
  margin-left: 2px;
}
.has-dropdown:hover .dropdown-arrow,
.has-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

/* Desktop dropdown */
.dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  background: #1E1E1E;
  border: 1px solid var(--border);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  z-index: 1000;
  list-style: none;
}
.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown li {
  list-style: none;
}
.dropdown a {
  display: block;
  padding: 10px 24px;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  transition: color 0.2s, background 0.2s, padding-left 0.2s;
}
.dropdown a:hover {
  color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.03);
  padding-left: 28px;
}

/* ── Page Content Sections ───────────── */
.page-section {
  padding: var(--section-pad) 0;
}
.page-section:nth-child(even) {
  background: var(--bg-secondary);
}
.page-content {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

/* Content Grid — text + image side by side */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.content-grid.reverse {
  direction: rtl;
}
.content-grid.reverse > * {
  direction: ltr;
}
.content-text h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.content-text h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.content-text p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}
.content-text p:last-child {
  margin-bottom: 0;
}
.content-image {
  border-radius: 4px;
  overflow: hidden;
}
.content-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Feature Cards (Neden MADOREX) ───── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 36px 28px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}
.feature-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
  margin-bottom: 20px;
}
.feature-card-icon svg {
  width: 24px;
  height: 24px;
}
.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.feature-card p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Process Timeline ────────────────── */
.process-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2px;
}
.process-timeline-step {
  background: var(--bg-card);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--border);
  position: relative;
  transition: border-color 0.3s;
}
.process-timeline-step:hover {
  border-color: var(--accent-gold-dim);
}
.process-timeline-number {
  font-size: 2rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
}
.process-timeline-step h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.process-timeline-step p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Specs / Details List ────────────── */
.specs-list {
  list-style: none;
  padding: 0;
}
.specs-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.specs-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent-gold);
  flex-shrink: 0;
  margin-top: 8px;
}

/* ── Materials / Tags ────────────────── */
.material-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.material-tag {
  padding: 8px 16px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: color 0.3s, border-color 0.3s;
}
.material-tag:hover {
  color: var(--accent-gold);
  border-color: var(--accent-gold-dim);
}

/* ── CTA Banner ──────────────────────── */
.cta-banner {
  text-align: center;
  padding: var(--section-pad) 40px;
  background: var(--bg-secondary);
}
.cta-banner h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.cta-banner p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* ── Project Filter ──────────────────── */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
  justify-content: center;
}
.filter-btn {
  padding: 10px 20px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  font-family: var(--font);
}
.filter-btn:hover,
.filter-btn.active {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  background: var(--accent-gold-dim);
}

/* ── Project Cards ───────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}
.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}
.project-card-img,
.project-card-img-wrap {
  height: 220px;
  overflow: hidden;
}
.project-card-img img,
.project-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.project-card:hover .project-card-img img,
.project-card:hover .project-card-img-wrap img {
  transform: scale(1.05);
}
.project-card-body,
.project-card-content {
  padding: 24px;
}
.project-card-cat,
.project-category {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 8px;
}
.project-card-title,
.project-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.project-card-desc,
.project-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Tech Specs Table ────────────────── */
.tech-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}
.tech-spec {
  background: var(--bg-card);
  padding: 24px;
  border: 1px solid var(--border);
}
.tech-spec-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.tech-spec-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── File Upload ─────────────────────── */
.file-upload-wrapper {
  position: relative;
}
.file-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  border: 1px dashed var(--border);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.file-upload-label:hover {
  border-color: var(--accent-gold-dim);
  background: rgba(255, 255, 255, 0.02);
}
.file-upload-label svg {
  width: 20px;
  height: 20px;
  color: var(--accent-gold);
}
.file-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-upload-info {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
}
.file-upload-name {
  font-size: 0.8rem;
  color: var(--accent-gold);
  margin-top: 8px;
  display: none;
}
.file-upload-name.visible {
  display: block;
}

/* ── Google Maps Container ───────────── */
.map-container {
  width: 100%;
  height: 400px;
  border: 1px solid var(--border);
  margin-top: 40px;
  overflow: hidden;
}
.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(80%) brightness(0.7) contrast(1.1);
  transition: filter 0.3s;
}
.map-container:hover iframe {
  filter: grayscale(40%) brightness(0.8) contrast(1.05);
}

/* ── Panel Diagram ───────────────────── */
.panel-diagram {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 400px;
  margin: 0 auto;
}
.panel-layer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
  border: 1px solid var(--border);
}
.panel-layer.ctp {
  background: rgba(191, 173, 127, 0.15);
  color: var(--accent-gold);
  height: 40px;
}
.panel-layer.xps {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  height: 60px;
}
.panel-layer.wood {
  background: rgba(139, 90, 43, 0.15);
  color: #c5956a;
  height: 30px;
}

/* ── Internal Link Cards ─────────────── */
.link-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.3s, transform 0.3s;
}
.link-card:hover {
  border-color: var(--accent-gold-dim);
  transform: translateX(4px);
}
.link-card-title {
  font-size: 0.88rem;
  font-weight: 600;
}
.link-card-arrow {
  margin-left: auto;
  color: var(--accent-gold);
  font-size: 1.1rem;
}

/* ═══════════════ PAGE RESPONSIVE ═══════════════ */

@media (max-width: 1024px) {
  .content-grid { grid-template-columns: 1fr; gap: 40px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-specs { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Page Hero */
  .page-hero { height: 320px; }
  .page-hero-content { padding: 0 20px 40px; }
  .page-hero-title { font-size: clamp(1.5rem, 6vw, 2rem); }
  .page-hero-desc { font-size: 0.88rem; }

  /* Dropdown — fullscreen mobile */
  .dropdown-arrow { display: none; }
  .dropdown {
    position: static;
    transform: none;
    min-width: auto;
    background: transparent;
    border: none;
    padding: 8px 0 0;
    opacity: 1;
    visibility: visible;
    display: none;
  }
  .has-dropdown.open .dropdown {
    display: block;
  }
  .dropdown a {
    padding: 8px 0;
    font-size: 0.9rem;
    text-align: center;
    color: var(--text-muted);
  }
  .dropdown a:hover {
    padding-left: 0;
  }

  /* Content */
  .content-grid { grid-template-columns: 1fr; gap: 32px; }
  .content-grid.reverse { direction: ltr; }
  .features-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; gap: 16px; }

  /* Process timeline */
  .process-timeline { grid-template-columns: 1fr; }

  /* CTA */
  .cta-banner { padding: 64px 20px; }

  /* Map */
  .map-container { height: 280px; }

  /* File upload */
  .file-upload-label { padding: 16px; }

  .page-content { padding: 0 20px; }
}

@media (max-width: 480px) {
  .page-hero { height: 260px; }
  .page-hero-content { padding: 0 16px 32px; }
  .filter-btn { padding: 8px 14px; font-size: 0.7rem; }
  .project-card-img { height: 180px; }
  .feature-card { padding: 24px 20px; }
  .map-container { height: 220px; }
}
