/*
Theme Name: Inten
Theme URI: https://inten.ee
Description: Inten OÜ - Turvalised piirdelahendused alates 2006
Version: 1.0.0
Author: Inten OÜ
Author URI: https://inten.ee
Requires at least: 6.4
Requires PHP: 8.2
Text Domain: inten
*/

/* ──────────────────────────────────────────────────────────────────
   CSS CUSTOM PROPERTIES (from React index.css)
────────────────────────────────────────────────────────────────── */
:root {
  --background: 0 0% 100%;
  --foreground: 220 20% 10%;
  --card: 0 0% 100%;
  --card-foreground: 220 20% 10%;
  --popover: 0 0% 100%;
  --popover-foreground: 220 20% 10%;
  --primary: 53 100% 50%;
  --primary-foreground: 220 20% 10%;
  --secondary: 220 15% 95%;
  --secondary-foreground: 220 20% 10%;
  --muted: 220 15% 95%;
  --muted-foreground: 220 10% 45%;
  --accent: 53 100% 50%;
  --accent-foreground: 220 20% 10%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 220 15% 90%;
  --input: 220 15% 90%;
  --ring: 53 100% 50%;
  --radius: 0.5rem;
  --surface-dark: 0 0% 0%;
  --surface-dark-foreground: 0 0% 98%;
  --surface-elevated: 0 0% 98%;
}

/* ──────────────────────────────────────────────────────────────────
   BASE RESETS
────────────────────────────────────────────────────────────────── */
html,
body {
  overflow-x: hidden;
}

body {
  font-family: 'DM Sans', sans-serif;
  background-color: hsl(0 0% 100%);
  color: hsl(220 20% 10%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
}

* {
  border-color: hsl(220 15% 90%);
  box-sizing: border-box;
}

/* ──────────────────────────────────────────────────────────────────
   CARD HOVER EFFECTS (from React CategoryCard)
────────────────────────────────────────────────────────────────── */
.card-hover {
  transition: transform 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
}
.card-hover .card-img {
  transition: transform 0.5s ease;
}
.card-hover:hover .card-img {
  transform: scale(1.05);
}

/* ──────────────────────────────────────────────────────────────────
   PAGE HERO (yellow banner)
────────────────────────────────────────────────────────────────── */
.page-hero {
  background-color: hsl(53 100% 50%);
  padding: 4rem 0;
}
@media (min-width: 768px) {
  .page-hero {
    padding: 5rem 0;
  }
}
.page-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 2.25rem;
  color: hsl(220 20% 10%);
  animation: fadeInUp 0.5s ease forwards;
}
@media (min-width: 768px) {
  .page-hero h1 {
    font-size: 3rem;
  }
}
.page-hero p {
  margin-top: 0.75rem;
  color: hsl(220 20% 10% / 0.7);
  font-size: 1.125rem;
  max-width: 42rem;
  animation: fadeInUp 0.5s 0.1s ease both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ──────────────────────────────────────────────────────────────────
   VIDEO HERO
────────────────────────────────────────────────────────────────── */
.hero-section {
  position: relative;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, hsl(220 20% 10% / 0.85), hsl(220 20% 10% / 0.5), transparent);
}

/* ──────────────────────────────────────────────────────────────────
   SCROLLBAR HIDE (horizontal scroll areas)
────────────────────────────────────────────────────────────────── */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ──────────────────────────────────────────────────────────────────
   GALLERY THUMBNAIL STRIP
────────────────────────────────────────────────────────────────── */
.thumb-strip {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.thumb-strip::-webkit-scrollbar { display: none; }

.thumb-btn {
  border-radius: 0.5rem;
  overflow: hidden;
  border: 2px solid transparent;
  flex-shrink: 0;
  width: 5rem;
  transition: all 0.2s;
  cursor: pointer;
  padding: 0;
  background: none;
}
.thumb-btn.active {
  border-color: hsl(53 100% 50%);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}
.thumb-btn:not(.active) {
  opacity: 0.7;
}
.thumb-btn:not(.active):hover {
  opacity: 1;
}
.thumb-btn img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

/* ──────────────────────────────────────────────────────────────────
   REFERENCE GRID CARD HOVER
────────────────────────────────────────────────────────────────── */
.ref-card-overlay {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.ref-card-title {
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.ref-card:hover .ref-card-overlay {
  opacity: 1;
}
.ref-card:hover .ref-card-title {
  transform: translateY(0);
}

/* ──────────────────────────────────────────────────────────────────
   ALPINE MODAL OVERLAY
────────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgb(0 0 0 / 0.5);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-box {
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  width: 100%;
  max-width: 36rem;
  max-height: 90vh;
  overflow-y: auto;
}

/* ──────────────────────────────────────────────────────────────────
   BREADCRUMB STRIP
────────────────────────────────────────────────────────────────── */
.breadcrumb-strip {
  padding: 1.5rem 0;
  background-color: hsl(220 15% 95% / 0.3);
  border-bottom: 1px solid hsl(220 15% 90%);
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: hsl(220 10% 45%);
}
.breadcrumb-list a {
  color: hsl(220 10% 45%);
  transition: color 0.15s;
  text-decoration: none;
}
.breadcrumb-list a:hover {
  color: hsl(53 100% 50%);
}
.breadcrumb-list .sep::before { content: '/'; }
.breadcrumb-list .current { color: hsl(220 20% 10%); font-weight: 500; }

/* ──────────────────────────────────────────────────────────────────
   FORM INPUTS (match React styling)
────────────────────────────────────────────────────────────────── */
.form-input {
  width: 100%;
  background-color: white;
  border: 1px solid hsl(220 15% 90%);
  border-radius: 0.375rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: hsl(220 20% 10%);
  outline: none;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.form-input::placeholder {
  color: hsl(220 10% 45%);
}
.form-input:focus {
  box-shadow: 0 0 0 2px hsl(53 100% 50%);
  border-color: hsl(53 100% 50%);
}

/* Rental inquiry form inputs (underline style) */
.form-input-underline {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid hsl(220 15% 90%);
  border-radius: 0;
  padding: 0.5rem 2.5rem 0.5rem 0;
  font-size: 0.875rem;
  color: hsl(220 20% 10%);
  outline: none;
  transition: border-color 0.15s;
}
.form-input-underline::placeholder { color: hsl(220 10% 45%); }
.form-input-underline:focus { border-color: hsl(53 100% 50%); }

/* ──────────────────────────────────────────────────────────────────
   NOTICE BANNERS (form success/error)
────────────────────────────────────────────────────────────────── */
.notice-success {
  background-color: hsl(142 76% 36% / 0.1);
  border: 1px solid hsl(142 76% 36% / 0.3);
  color: hsl(142 76% 25%);
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
.notice-error {
  background-color: hsl(0 84% 60% / 0.1);
  border: 1px solid hsl(0 84% 60% / 0.3);
  color: hsl(0 70% 35%);
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

/* ──────────────────────────────────────────────────────────────────
   SPECS TABLE
────────────────────────────────────────────────────────────────── */
.specs-table {
  border: 1px solid hsl(220 15% 90%);
  border-radius: 0.5rem;
  overflow: hidden;
}
.specs-row {
  display: flex;
  justify-content: space-between;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
}
.specs-row:nth-child(odd)  { background-color: hsl(220 15% 95%); }
.specs-row:nth-child(even) { background-color: white; }
.specs-row .label { color: hsl(220 10% 45%); }
.specs-row .value { color: hsl(220 20% 10%); font-weight: 500; }

/* ──────────────────────────────────────────────────────────────────
   BADGE TAG (like shadcn Badge)
────────────────────────────────────────────────────────────────── */
.badge-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: hsl(220 15% 95%);
  color: hsl(220 20% 10%);
}

/* ──────────────────────────────────────────────────────────────────
   REFERENCE GALLERY – desktop thumbnail sidebar
────────────────────────────────────────────────────────────────── */
.ref-thumb-sidebar {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  width: 11rem;
  flex-shrink: 0;
  max-height: 500px;
  overflow-y: auto;
  scrollbar-width: thin;
}
@media (min-width: 640px) {
  .ref-thumb-sidebar {
    display: flex;
  }
}
.ref-thumb-btn {
  border-radius: 0.5rem;
  overflow: hidden;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: all 0.2s;
  cursor: pointer;
  padding: 0;
  background: none;
  width: 100%;
}
.ref-thumb-btn.active { border-color: hsl(53 100% 50%); box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); }
.ref-thumb-btn:not(.active) { opacity: 0.7; }
.ref-thumb-btn:not(.active):hover { opacity: 1; }
.ref-thumb-btn img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }

/* Mobile thumbnails for ref gallery */
.ref-thumb-mobile {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.ref-thumb-mobile::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .ref-thumb-mobile { display: none; } }

/* ──────────────────────────────────────────────────────────────────
   ALPINE.JS — hide x-cloak elements until Alpine initialises
────────────────────────────────────────────────────────────────── */
[x-cloak] { display: none !important; }

/* ──────────────────────────────────────────────────────────────────
   OPENING HOURS TABLE
────────────────────────────────────────────────────────────────── */
.hours-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: hsl(220 20% 10%);
}
.hours-row.closed { color: hsl(220 10% 45%); }

/* ──────────────────────────────────────────────────────────────────
   ENTRY CONTENT — Gutenberg block defaults (page.php fallback)
────────────────────────────────────────────────────────────────── */

/* Vertical rhythm between all top-level blocks */
.entry-content > * + * {
  margin-top: 1.5rem;
}

/* ── Headings ─────────────────────────────────────────────────── */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: hsl(220 20% 10%);
  line-height: 1.25;
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
}
/* First heading needs no extra top margin (already below hero) */
.entry-content > :first-child { margin-top: 0; }

.entry-content h1 { font-size: 2.25rem; }
.entry-content h2 { font-size: 1.75rem; }
.entry-content h3 { font-size: 1.375rem; }
.entry-content h4 { font-size: 1.125rem; }
.entry-content h5 { font-size: 1rem;     font-weight: 600; }
.entry-content h6 { font-size: 0.9375rem; font-weight: 600; }

/* ── Paragraphs ───────────────────────────────────────────────── */
.entry-content p {
  color: hsl(220 20% 10%);
  line-height: 1.8;
}

/* ── Inline elements ──────────────────────────────────────────── */
.entry-content strong { font-weight: 600; }
.entry-content em     { font-style: italic; }

/* Links — dark text, yellow underline for visibility without
   sacrificing contrast on white backgrounds */
.entry-content a:not(.wp-block-button__link) {
  color: hsl(220 20% 10%);
  text-decoration: underline;
  text-decoration-color: hsl(53 100% 50%);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.entry-content a:not(.wp-block-button__link):hover {
  text-decoration-color: hsl(220 20% 10%);
}

/* ── Lists ────────────────────────────────────────────────────── */
.entry-content ul,
.entry-content ol {
  padding-left: 1.5rem;
  color: hsl(220 20% 10%);
  line-height: 1.8;
}
.entry-content ul { list-style-type: disc; }
.entry-content ol { list-style-type: decimal; }
.entry-content li + li { margin-top: 0.375rem; }
.entry-content ul ul,
.entry-content ol ol,
.entry-content ul ol,
.entry-content ol ul {
  margin-top: 0.375rem;
  margin-bottom: 0;
}

/* ── Separator ────────────────────────────────────────────────── */
.entry-content hr,
.entry-content .wp-block-separator {
  border: none;
  border-top: 1px solid hsl(220 15% 90%);
  margin: 2.5rem 0;
}

/* ── Images ───────────────────────────────────────────────────── */
.entry-content img,
.entry-content figure img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}
.entry-content figure { margin: 0; }
.entry-content figcaption {
  font-size: 0.875rem;
  color: hsl(220 10% 45%);
  text-align: center;
  margin-top: 0.5rem;
}
.entry-content .wp-block-image.alignleft  { float: left;  margin: 0 1.5rem 1rem 0; }
.entry-content .wp-block-image.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.entry-content .wp-block-image.aligncenter,
.entry-content .wp-block-image.aligncenter img { margin-inline: auto; }

/* ── Columns ──────────────────────────────────────────────────── */
.entry-content .wp-block-columns {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.entry-content .wp-block-column {
  flex: 1 1 0;
  min-width: 0;
}
@media (max-width: 599px) {
  .entry-content .wp-block-columns { flex-direction: column; }
}

/* ── Buttons ──────────────────────────────────────────────────── */
.entry-content .wp-block-button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  background-color: hsl(53 100% 50%);
  color: hsl(220 20% 10%);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 1.375rem;
  border-radius: 0.25rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: filter 0.15s;
  cursor: pointer;
}
.entry-content .wp-block-button .wp-block-button__link:hover {
  filter: brightness(1.1);
}
.entry-content .wp-block-button.is-style-outline .wp-block-button__link {
  background-color: transparent;
  border-color: hsl(53 100% 50%);
  color: hsl(220 20% 10%);
}
.entry-content .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: hsl(53 100% 50%);
  filter: none;
}
.entry-content .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ── Blockquote / Quote ───────────────────────────────────────── */
.entry-content blockquote,
.entry-content .wp-block-quote {
  border-left: 4px solid hsl(53 100% 50%);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 0;
}
.entry-content blockquote p,
.entry-content .wp-block-quote p {
  font-size: 1.0625rem;
  font-style: italic;
  color: hsl(220 20% 10%);
  margin: 0;
}
.entry-content .wp-block-quote cite,
.entry-content blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-style: normal;
  color: hsl(220 10% 45%);
}

/* Pullquote */
.entry-content .wp-block-pullquote {
  border-top: 4px solid hsl(53 100% 50%);
  border-bottom: 4px solid hsl(53 100% 50%);
  border-left: none;
  padding: 2rem 1rem;
  text-align: center;
}
.entry-content .wp-block-pullquote p {
  font-size: 1.25rem;
  font-weight: 600;
  font-style: italic;
  margin: 0;
}

/* ── Tables ───────────────────────────────────────────────────── */
.entry-content table,
.entry-content .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  border-radius: 0.5rem;
  overflow: hidden;
}
.entry-content th,
.entry-content .wp-block-table th {
  background-color: hsl(53 100% 50%);
  color: hsl(220 20% 10%);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  border: 1px solid hsl(220 15% 90%);
}
.entry-content td,
.entry-content .wp-block-table td {
  padding: 0.625rem 1rem;
  border: 1px solid hsl(220 15% 90%);
  color: hsl(220 20% 10%);
  vertical-align: top;
}
.entry-content tbody tr:nth-child(even) td {
  background-color: hsl(220 15% 95%);
}

/* ── Code ─────────────────────────────────────────────────────── */
.entry-content code {
  font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
  font-size: 0.875em;
  background-color: hsl(220 15% 95%);
  color: hsl(220 20% 10%);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}
.entry-content pre {
  background-color: hsl(220 15% 95%);
  border-radius: 0.5rem;
  padding: 1.25rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7;
}
.entry-content pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* ── Group block with background ──────────────────────────────── */
.entry-content .wp-block-group.has-background {
  border-radius: 0.5rem;
  padding: 2rem;
}

/* ── Cover block ──────────────────────────────────────────────── */
.entry-content .wp-block-cover {
  border-radius: 0.5rem;
  overflow: hidden;
}

/* ── Clearfix for floated images ──────────────────────────────── */
.entry-content::after {
  content: '';
  display: table;
  clear: both;
}
