/**
 * UI Premium — Tam sistem tasarım mükemmelleştirmesi
 * Frontend: tipografi, kartlar, formlar, sayfa şablonları, animasyonlar
 */

:root {
  --ui-radius-xl: 28px;
  --ui-radius: 18px;
  --ui-radius-sm: 12px;
  --ui-blur: blur(20px) saturate(1.25);
  --ui-gradient-brand: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 50%, var(--brand-dark) 100%);
  --ui-gradient-dark: linear-gradient(165deg, var(--dark) 0%, var(--dark-soft) 55%, #1a1208 100%);
  --ui-gradient-surface: linear-gradient(180deg, #ffffff 0%, var(--surface-alt) 100%);
  --ui-shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --ui-shadow-card-hover: 0 4px 8px rgba(15, 23, 42, 0.04), 0 20px 48px rgba(15, 23, 42, 0.12);
  --ui-shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  --ui-transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Global ─── */
html {
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body.ui-premium {
  background: var(--surface-alt);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(232, 93, 4, 0.06), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(244, 140, 6, 0.04), transparent 40%);
  background-attachment: fixed;
}

#main-content {
  animation: uiPageIn 0.5s var(--ui-transition) both;
}

@keyframes uiPageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ─── Typography scale ─── */
h1, h2, h3, h4 {
  font-family: var(--display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head.text-center {
  margin-left: auto;
  margin-right: auto;
}

.section-head p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--dark);
}

/* ─── Buttons premium ─── */
.btn {
  position: relative;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--ui-gradient-brand);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-brand), var(--ui-shadow-inset);
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15), transparent 50%);
  pointer-events: none;
}

.btn-outline {
  border-width: 1.5px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

/* ─── Header premium ─── */
.site-header {
  background: rgba(255, 255, 255, 0.78);
  border-bottom-color: rgba(226, 232, 240, 0.6);
}

.top-bar {
  background: var(--ui-gradient-dark);
  font-size: 0.8125rem;
}

.nav-wrap {
  height: auto;
  min-height: var(--header-h);
  padding: 0.35rem 0;
}

.main-nav a.active {
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(232, 93, 4, 0.12);
}

.nav-actions .btn-primary {
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
}

/* ─── Hero premium ─── */
.hero {
  background: var(--ui-gradient-dark);
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--surface-alt), transparent);
  pointer-events: none;
}

.hero h1 {
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.2);
}

.hero-float-card.main {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
}

.hero-float-card.sub1,
.hero-float-card.sub2 {
  background: rgba(255, 255, 255, 0.95);
  color: var(--dark);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.stat-item {
  padding: 0.5rem 0;
}

.stat-item strong {
  background: var(--ui-gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Page hero (inner pages) ─── */
.page-hero {
  background: var(--ui-gradient-dark);
  padding: clamp(3rem, 8vw, 5rem) 0;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  background:
    radial-gradient(ellipse 70% 80% at 80% 20%, rgba(232, 93, 4, 0.2), transparent 55%),
    radial-gradient(ellipse 40% 50% at 10% 90%, rgba(244, 140, 6, 0.08), transparent 50%) !important;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--surface-alt), transparent);
  pointer-events: none;
}

.page-hero h1 {
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  font-weight: 800;
  color: #fff;
  margin-top: 0.5rem;
}

.page-hero p {
  font-size: 1.0625rem;
  max-width: 540px;
  line-height: 1.65;
}

.page-hero .section-label {
  color: #fdba74 !important;
  background: rgba(232, 93, 4, 0.12);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(251, 146, 60, 0.2);
}

.page-hero .section-label::before {
  display: none;
}

/* ─── Breadcrumbs ─── */
.breadcrumbs {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
}

.breadcrumbs a:hover {
  color: var(--brand);
}

/* ─── Cards system ─── */
.card,
.feature-card,
.product-card,
.article-card,
.testimonial-card,
.info-card {
  background: var(--surface);
  box-shadow: var(--ui-shadow-card);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.product-card,
.article-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--ui-radius);
  overflow: hidden;
  transition: transform var(--ui-transition), box-shadow var(--ui-transition), border-color var(--ui-transition);
}

.product-card:hover,
.article-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--ui-shadow-card-hover);
  border-color: var(--brand-muted);
}

.product-card .card-body,
.article-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.35rem;
}

.product-card h3,
.article-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0.5rem 0 0.35rem;
  line-height: 1.35;
}

.product-card .card-body p,
.article-card .card-body p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.card-foot {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-price {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--brand-dark);
}

.card-link,
.card-read {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  color: var(--brand);
  transition: gap 0.2s;
}

.product-card:hover .card-link,
.article-card:hover .card-read {
  gap: 0.5rem;
}

.tag {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
}

.tag.kum { background: #fef3c7; color: #b45309; }
.tag.cimento { background: #e2e8f0; color: #475569; }

.card-img {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(145deg, var(--brand-soft), #fff);
  position: relative;
  overflow: hidden;
}

.card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 18, 34, 0.04), transparent 40%);
  pointer-events: none;
}

.card-img.kum { background: linear-gradient(145deg, #fef3c7, #fff7ed); }
.card-img.cimento { background: linear-gradient(145deg, #f1f5f9, #e2e8f0); }

/* ─── Feature cards ─── */
.feature-card {
  padding: 1.75rem;
  border-radius: var(--ui-radius);
  text-align: left;
  transition: transform var(--ui-transition), box-shadow var(--ui-transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--ui-shadow-card-hover);
}

.feature-card h3 {
  font-size: 1.0625rem;
  margin: 1rem 0 0.5rem;
}

.filters-wrap {
  margin-bottom: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filters-wrap::-webkit-scrollbar { display: none; }

.section-products .section-head,
.section-blog .section-head {
  margin-left: auto;
  margin-right: auto;
}

.filters {
  padding: 0.35rem;
  background: var(--surface);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.filter {
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  padding: 0.55rem 1.15rem;
}

.filter.active {
  box-shadow: var(--shadow-brand);
}

/* ─── Contact ─── */
.contact-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

@media (min-width: 992px) {
  .contact-grid {
    grid-template-columns: 0.95fr 1.05fr;
    align-items: start;
  }
}

.contact-info {
  display: grid;
  gap: 0.875rem;
}

.info-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.35rem;
  border-radius: var(--ui-radius-sm);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.info-card:hover {
  transform: translateX(4px);
  box-shadow: var(--ui-shadow-card-hover);
  border-color: var(--brand-muted);
}

.info-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--ui-gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--brand-glow);
}

.info-card h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.contact-form {
  background: var(--surface);
  border-radius: var(--ui-radius);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: var(--ui-shadow-card);
  border: 1px solid var(--border-light);
}

.contact-form h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.contact-form label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
  display: block;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--ui-radius-sm);
  font-family: inherit;
  font-size: 0.9375rem;
  background: var(--surface-alt);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  margin-bottom: 1rem;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(232, 93, 4, 0.12);
}

.form-row {
  display: grid;
  gap: 0;
}

@media (min-width: 600px) {
  .form-row { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .form-row > div { min-width: 0; }
}

.contact-form .alert-error {
  background: linear-gradient(135deg, #fef2f2, #fff);
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.875rem 1rem;
  border-radius: var(--ui-radius-sm);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.form-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0.5rem 0 1rem;
}

.form-note a {
  color: var(--brand);
  text-decoration: underline;
}
  text-align: center;
  padding: 3rem 2rem !important;
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

.map-embed {
  border-radius: var(--ui-radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-top: 0.5rem;
}

.map-embed iframe {
  width: 100%;
  height: 220px;
  border: 0;
  display: block;
}

/* ─── Testimonials ─── */
.testimonial-card {
  padding: 1.75rem;
  border-radius: var(--ui-radius);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-family: var(--display);
  font-size: 4rem;
  line-height: 1;
  color: var(--brand-muted);
  opacity: 0.5;
  pointer-events: none;
}

.testimonial-stars {
  letter-spacing: 0.1em;
}

.testimonial-card footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.testimonial-card footer::before {
  content: '';
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ui-gradient-brand);
  flex-shrink: 0;
}

/* ─── FAQ ─── */
.faq-item summary {
  font-weight: 600;
  padding: 1.15rem 1.25rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--dark);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--brand);
  transition: transform 0.25s;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.9375rem;
}

/* ─── CTA section ─── */
.cta-section {
  background: var(--ui-gradient-dark);
  padding: clamp(3rem, 6vw, 4.5rem) 2rem;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(232, 93, 4, 0.25), transparent 55%);
  pointer-events: none;
}

.cta-section h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  color: #fff;
  position: relative;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.75);
  position: relative;
}

/* ─── Showcase & split ─── */
.showcase-card {
  border-radius: var(--ui-radius-sm);
  transition: transform 0.3s, box-shadow 0.3s;
}

.showcase-card:hover {
  transform: scale(1.02);
  box-shadow: var(--ui-shadow-card-hover);
}

.check-list li {
  padding-left: 1.75rem;
  position: relative;
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 700;
}

/* ─── Prose ─── */
.prose {
  font-size: 1.0625rem;
  line-height: 1.75;
}

.prose h2 {
  font-size: 1.5rem;
  margin: 2rem 0 0.75rem;
  color: var(--dark);
}

.prose h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.5rem;
}

.prose p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.prose strong {
  color: var(--text);
}

.narrow {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Cookie banner ─── */
.cookie-banner {
  background: rgba(12, 18, 34, 0.92);
  backdrop-filter: var(--ui-blur);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-inner p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  max-width: 640px;
}

.cookie-inner a {
  color: #fdba74;
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ─── Stagger grid animation ─── */
.grid-3 > *,
.features > *,
.testimonial-grid > * {
  animation: uiStaggerIn 0.6s var(--ui-transition) both;
}

.grid-3 > *:nth-child(1), .features > *:nth-child(1), .testimonial-grid > *:nth-child(1) { animation-delay: 0.05s; }
.grid-3 > *:nth-child(2), .features > *:nth-child(2), .testimonial-grid > *:nth-child(2) { animation-delay: 0.1s; }
.grid-3 > *:nth-child(3), .features > *:nth-child(3), .testimonial-grid > *:nth-child(3) { animation-delay: 0.15s; }
.grid-3 > *:nth-child(4) { animation-delay: 0.2s; }
.grid-3 > *:nth-child(5) { animation-delay: 0.25s; }
.grid-3 > *:nth-child(6) { animation-delay: 0.3s; }

@keyframes uiStaggerIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.reveal.visible .grid-3 > *,
.reveal.visible .features > * {
  animation: uiStaggerIn 0.6s var(--ui-transition) both;
}

/* ─── Empty state ─── */
.empty-state {
  border-radius: var(--ui-radius);
  background: var(--surface);
  box-shadow: var(--ui-shadow-card);
}

/* ─── Mobile polish ─── */
@media (max-width: 991px) {
  .section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
  .filters {
    width: 100%;
    border-radius: var(--ui-radius-sm);
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex-shrink: 0; }
  .cookie-inner { flex-direction: column; text-align: center; }
  .cookie-actions { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  #main-content,
  .grid-3 > *,
  .features > * {
    animation: none !important;
  }
}
