/*
Theme Name: Ritter
Description: Tema a medida para Ritter - chemische Laborgeraete (staging DGLabs)
Author: DGLabs
Version: 1.0
*/

:root {
  --gold: #fec900;
  --gold-dark: #af7c01;
  --amber: #eaa800;
  --gray: #989898;
  --charcoal: #424140;
  --brown: #6d510a;
  --carbon: #241d11;
  --font: "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--carbon);
  background: #fff;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 800;
  margin: 0 0 .5em;
  color: var(--carbon);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--carbon);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo img {
  height: 44px;
  width: auto;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  color: var(--gold);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  transition: color .15s ease;
}

.primary-nav a:hover,
.primary-nav a:focus {
  color: var(--amber);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 34px;
  height: 28px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--carbon);
    border-top: 1px solid var(--brown);
  }

  .primary-nav.is-open { display: block; }

  .primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 1rem 1.5rem 1.5rem;
  }

  .primary-nav li { padding: .6rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }

  .site-header { position: relative; }
}

/* ---------- Showcase images (renders reales del cliente, con texto ya incluido en la imagen) ---------- */
/* No se superpone texto HTML sobre estas imagenes: cada render ya trae su propio titular
   compuesto por el cliente (ver clientes/ritter/material/). Superponer texto duplicaba o
   contradecia el titular de la imagen. */
.showcase img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-cta-band {
  background: var(--carbon);
  text-align: center;
  padding: 2.6rem 1.5rem;
}

.hero-cta-band p {
  color: var(--gray);
  font-weight: 200;
  font-size: 1.1rem;
  margin: 0 0 1.3em;
}

/* ---------- Carrusel del hero (primeras 2 imagenes) ---------- */
.hero-carousel {
  position: relative;
  width: 100%;
  height: 82vh;
  min-height: 420px;
  max-height: 820px;
  overflow: hidden;
  background: var(--carbon);
}

.hero-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .7s ease;
}

.hero-carousel-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Cada slide ya trae su titular compuesto en un borde distinto de la imagen:
   se ajusta el recorte para no cortarlo. */
.hero-carousel-slide.slide-text-bottom img { object-position: center bottom; }
.hero-carousel-slide.slide-text-top img { object-position: center top; }

.hero-carousel-prev,
.hero-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(36,29,17,.55);
  color: var(--gold);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease;
}

.hero-carousel-prev:hover,
.hero-carousel-next:hover { background: rgba(36,29,17,.85); }

.hero-carousel-prev { left: 1rem; }
.hero-carousel-next { right: 1rem; }

.hero-carousel-dots {
  position: absolute;
  bottom: 1.3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: .6rem;
}

.hero-carousel-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
}

.hero-carousel-dots button.is-active { background: var(--gold); }

@media (max-width: 640px) {
  .hero-carousel { height: 60vh; min-height: 320px; }
  .hero-carousel-prev, .hero-carousel-next { width: 36px; height: 36px; font-size: 1rem; }
}

/* ---------- Texto al lado de imagen (mismo aspecto/relacion que el render original del
   cliente antes de quitarle el texto horneado: panel de texto ~38%, foto ~62%) ---------- */
.text-image-split {
  display: grid;
  grid-template-columns: 38% 62%;
  min-height: 420px;
}

.text-image-split .split-text {
  display: flex;
  align-items: center;
  background: #fff;
  padding: 2.5rem 2.5rem 2.5rem 4vw;
}

.text-image-split .split-text h2 {
  text-transform: uppercase;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  line-height: 1.15;
  margin: 0;
}

.text-image-split .split-media {
  overflow: hidden;
}

.text-image-split .split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 860px) {
  .text-image-split {
    grid-template-columns: 1fr;
  }
  .text-image-split .split-media {
    order: -1;
    min-height: 260px;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .9rem 2rem;
  background: var(--gold);
  color: var(--carbon);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .9rem;
  border-radius: 3px;
  transition: background .15s ease, transform .15s ease;
}

.btn:hover { background: var(--amber); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}

.btn-outline:hover { background: var(--gold); color: var(--carbon); }

/* ---------- Categorias de producto ---------- */
/* Igual que el resto de las imagenes de marketing: el titular ya viene compuesto en la imagen,
   asi que el link solo agrega un borde/hover, sin texto superpuesto. */
.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--carbon);
}

.products-grid a {
  display: block;
  overflow: hidden;
}

.products-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease, opacity .25s ease;
}

.products-grid a:hover img {
  transform: scale(1.03);
  opacity: .92;
}

@media (max-width: 860px) {
  .products-grid { grid-template-columns: 1fr; }
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--gold);
  color: var(--carbon);
  text-align: center;
  padding: 3.5rem 1.5rem;
}

.cta-band h2 { text-transform: uppercase; }

.cta-band .btn {
  background: var(--carbon);
  color: var(--gold);
}

.cta-band .btn:hover { background: var(--brown); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--carbon);
  color: var(--gray);
  padding: 2.5rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-inner img { height: 34px; }

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  color: var(--gray);
  font-size: .9rem;
}

.footer-nav a:hover { color: var(--gold); }

.footer-bottom {
  max-width: 1180px;
  margin: 1.5rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .8rem;
  color: var(--gray);
}

/* ---------- Generic page content ---------- */
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.page-content h1 {
  text-transform: uppercase;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.pending-note {
  display: inline-block;
  margin-top: 1rem;
  padding: .6rem 1rem;
  background: #f4f0e6;
  border-left: 4px solid var(--gold-dark);
  color: var(--brown);
  font-size: .9rem;
}

/* ---------- Blog / Noticias ---------- */
.posts-list {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.post-excerpt {
  padding: 2rem 0;
  border-bottom: 1px solid #e5e0d5;
}

.post-excerpt h2 { text-transform: none; font-size: 1.5rem; }
.post-excerpt h2 a:hover { color: var(--gold-dark); }

/* ---------- Contact form ---------- */
.wpcf7-form p { margin-bottom: 1.1rem; }

.wpcf7-form label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .9rem; }

.wpcf7-form input[type=text],
.wpcf7-form input[type=email],
.wpcf7-form input[type=tel],
.wpcf7-form select,
.wpcf7-form textarea {
  width: 100%;
  padding: .7rem .8rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-family: var(--font);
  font-size: 1rem;
}

.wpcf7-form input[type=submit] {
  background: var(--gold);
  color: var(--carbon);
  border: none;
  padding: .9rem 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: 3px;
  cursor: pointer;
}

.wpcf7-form input[type=submit]:hover { background: var(--amber); }
