:root {
  --bg-dark: #0d1a1f;
  --bg-soft: #f4f0ec;
  --panel: #ffffff;
  --ink: #1d2327;
  --muted: #5f676f;
  --line: rgba(16, 24, 31, 0.12);
  --accent: #ef4a2d;
  --accent-dark: #c7381e;
  --whatsapp: #25d366;
  --whatsapp-dark: #1ebe5b;
  --shadow: 0 22px 55px rgba(16, 24, 31, 0.14);
  --gap: 22px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --container-max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  background: #f7f3ee;
  color: var(--ink);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(var(--container-max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 26, 31, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 90px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: 200px;
}

.brand img {
  width: 100%;
  height: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.93rem;
  font-weight: 500;
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: #ffffff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 15px 28px rgba(239, 74, 45, 0.26);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: white;
  gap: 0.5rem;
  box-shadow: 0 15px 28px rgba(37, 211, 102, 0.28);
}

.btn-whatsapp:hover {
  background: var(--whatsapp-dark);
}

.btn-whatsapp svg {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: white;
  box-shadow: 0 12px 26px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease, background 0.2s ease;
}

.whatsapp-float:hover {
  background: var(--whatsapp-dark);
  transform: scale(1.06);
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
}

.whatsapp-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--whatsapp);
  opacity: 0.55;
  animation: whatsapp-pulse 2.2s ease-out infinite;
  z-index: -1;
}

@keyframes whatsapp-pulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-float::before {
    animation: none;
  }
}

.hero {
  position: relative;
  min-height: 740px;
  display: flex;
  align-items: center;
  background-image: url("EJEMPLOS/hero.jpg");
  background-image: image-set(url("webp/hero.webp") type("image/webp"), url("EJEMPLOS/hero.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 18, 23, 0.72) 0%, rgba(10, 18, 23, 0.42) 34%, rgba(10, 18, 23, 0.25) 100%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: calc(var(--gap) * 2);
  padding: 72px 0;
}

.eyebrow {
  margin: 0 0 18px;
  color: #d7dfe4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
}

.eyebrow-dark {
  color: var(--accent);
}

.hero-copy h1 {
  margin: 0;
  max-width: 680px;
  color: #fdfdfc;
  font-size: clamp(2.5rem, 4.2vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.lead {
  max-width: 600px;
  margin-top: 22px;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 32px;
}

.hero-stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding: 0;
  margin: 42px 0 0;
  color: #fff;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-stats strong {
  font-size: clamp(1.5rem, 2vw, 2.2rem);
  font-weight: 800;
}

.hero-stats span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
}

.hero-card {
  display: flex;
  justify-content: center;
}

.mini-card {
  width: min(420px, 100%);
  padding: 22px 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(13, 26, 31, 0.32);
  box-shadow: var(--shadow);
  color: #fff;
}

.mini-card span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.mini-card h3 {
  margin: 10px 0 0;
  font-size: clamp(1.6rem, 2vw, 2.4rem);
  line-height: 1.1;
}

.services,
.projects,
.about {
  padding: 80px 0;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-heading h2,
.about-copy h2,
.cta-wrap h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: var(--gap);
}

.service-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0 0 22px;
  overflow: hidden;
  box-shadow: 0 10px 18px rgba(19, 23, 32, 0.04);
}

.service-item-image {
  position: relative;
  aspect-ratio: 4 / 3;
}

.service-item-image picture,
.service-item-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 8px 18px rgba(13, 26, 31, 0.3);
}

.service-item-image .icon {
  position: absolute;
  top: 14px;
  left: 14px;
}

.service-item h3 {
  margin: 18px 18px 10px;
  font-size: 1.16rem;
}

.service-item p {
  margin: 0 18px;
  color: var(--muted);
  font-size: 0.96rem;
}

.about {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(244, 240, 236, 0.95));
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.about-visual img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.about-copy p {
  color: var(--muted);
  font-size: 1.02rem;
}

.about-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.about-points span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(13, 26, 31, 0.1);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font-weight: 600;
}

.gallery-slideshow {
  position: relative;
  padding: 8px 0 12px;
}

.gallery-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0 max(16px, calc((100% - var(--container-max)) / 2)) 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-track:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.gallery-slide {
  flex: 0 0 min(680px, 80vw);
  scroll-snap-align: center;
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(18, 22, 29, 0.12);
  aspect-ratio: 4 / 3;
}

.gallery-slide picture,
.gallery-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-arrow {
  position: absolute;
  top: 44%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 22px rgba(18, 22, 29, 0.14);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.gallery-arrow:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-50%) scale(1.06);
}

.gallery-arrow svg {
  width: 22px;
  height: 22px;
}

.gallery-arrow-prev {
  left: 12px;
}

.gallery-arrow-next {
  right: 12px;
}

.gallery-counter {
  text-align: center;
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}

@media (min-width: 640px) {
  .gallery-arrow-prev {
    left: max(8px, calc((100% - var(--container-max)) / 2 - 24px));
  }
  .gallery-arrow-next {
    right: max(8px, calc((100% - var(--container-max)) / 2 - 24px));
  }
}

@media (max-width: 640px) {
  .gallery-arrow {
    width: 40px;
    height: 40px;
  }
  .gallery-slide {
    flex-basis: 86vw;
  }
}

.cta-strip {
  background: #101c22;
  color: #fff;
  padding: 36px 0;
}

.cta-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cta-wrap h2 {
  color: #fff;
}

.site-footer {
  background: #0d1a1f;
  color: rgba(255, 255, 255, 0.8);
  padding-top: 52px;
}

/* Responsive adjustments */
@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1.05fr 1fr;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding: 48px 0;
    gap: 18px;
  }
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .service-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    min-height: 520px;
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 32px;
  padding-bottom: 26px;
}

.footer-brand img {
  width: 210px;
  margin-bottom: 18px;
}

.footer-brand p,
.footer-contact ul,
.footer-social a {
  color: rgba(255, 255, 255, 0.74);
}

.footer-contact h3,
.footer-social h3 {
  margin: 0 0 16px;
  color: white;
  font-size: 1.08rem;
}

.footer-contact ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 0 28px;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 980px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .about-grid,
  .hero-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 620px;
  }
}

@media (max-width: 720px) {
  .nav-wrap {
    flex-wrap: wrap;
    justify-content: center;
    padding: 16px 0;
  }

  .main-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    font-size: 0.8rem;
  }

  .brand {
    width: 170px;
  }

  .hero {
    min-height: 540px;
  }

  .hero-copy h1 {
    font-size: 3rem;
  }

  .cta-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }
}

/* Blog */
.blog-hero {
  background: linear-gradient(135deg, #0d1a1f, #16262c);
  color: #fff;
  padding: 64px 0 48px;
}

.blog-hero h1 {
  margin: 6px 0 0;
  font-size: clamp(2rem, 3.4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 760px;
}

.blog-hero .lead {
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
}

.blog-listing {
  padding: 56px 0 80px;
  background: #f7f3ee;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(18, 22, 29, 0.07);
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(18, 22, 29, 0.1);
}

.blog-card-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-body {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.blog-card-body h3 {
  margin: 4px 0 0;
  font-size: 1.12rem;
  line-height: 1.3;
  color: var(--ink);
}

.blog-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  flex: 1;
}

.author-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(239, 74, 45, 0.12);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.blog-card-date {
  color: var(--muted);
  font-size: 0.8rem;
}

/* Article page */
.article-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
}

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 18, 23, 0.55) 0%, rgba(10, 18, 23, 0.85) 100%);
}

.article-hero-content {
  position: relative;
  z-index: 1;
  padding: 60px 0 40px;
  color: #fff;
}

.back-to-blog {
  display: inline-block;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
  font-weight: 600;
}

.back-to-blog:hover {
  color: #fff;
}

.article-hero-content h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 820px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.86rem;
}

.article-meta .author-tag {
  background: var(--accent);
  color: #fff;
}

.article-body-wrap {
  max-width: 760px;
  padding: 52px 0 72px;
}

.prose {
  font-size: 1.03rem;
  line-height: 1.75;
  color: var(--ink);
}

.prose h2 {
  margin: 2.2em 0 0.7em;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 1.8em 0 0.6em;
  font-size: 1.18rem;
}

.prose p {
  margin: 0 0 1.15em;
  color: #333a3f;
}

.prose ul {
  margin: 0 0 1.3em;
  padding-left: 1.3em;
  color: #333a3f;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose strong {
  color: var(--ink);
}

.author-box {
  margin-top: 40px;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--panel);
  border: 1px solid var(--line);
}

.author-box-name {
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--ink);
}

.author-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.article-cta {
  margin-top: 24px;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: #101c22;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.article-cta h3 {
  margin: 4px 0 0;
  color: #fff;
  font-size: 1.3rem;
}

.article-pager {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.pager-link {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  max-width: 45%;
}

.pager-prev {
  text-align: left;
}

.pager-next {
  text-align: right;
}

.pager-link:hover {
  color: var(--accent);
}

/* Contact section */
.contact-section {
  padding: 80px 0;
  background: var(--panel);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.contact-info h2 {
  margin: 6px 0 14px;
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
  letter-spacing: -0.03em;
  color: var(--ink);
}

.contact-lead {
  color: var(--muted);
  max-width: 440px;
  margin: 0 0 28px;
}

.contact-details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.contact-details li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-details span {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.contact-details a {
  font-weight: 600;
  color: var(--ink);
}

.contact-details a:hover {
  color: var(--accent);
}

.contact-form {
  display: grid;
  gap: 16px;
  background: var(--bg-soft);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

.form-row {
  display: grid;
  gap: 6px;
}

.form-row label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}

.form-row input,
.form-row select,
.form-row textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  resize: vertical;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-submit {
  justify-self: start;
}

.form-status {
  margin: 0;
  font-size: 0.88rem;
  min-height: 1.2em;
}

.form-status-ok {
  color: #1a7a43;
}

.form-status-error {
  color: var(--accent-dark);
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }
}

/* Dedicated gallery page */
.gallery-page-section {
  padding: 56px 0 80px;
  background: #f7f3ee;
}

.gallery-filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.gallery-filter {
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gallery-filter:hover {
  border-color: var(--accent);
}

.gallery-filter.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.gallery-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.gallery-item-btn {
  all: unset;
  cursor: pointer;
  display: block;
  border-radius: 18px;
}

.gallery-item-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.gallery-page-item {
  position: relative;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 10px 22px rgba(18, 22, 29, 0.08);
}

.gallery-page-item picture,
.gallery-page-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item-btn:hover .gallery-page-item img {
  transform: scale(1.05);
}

.gallery-item-tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(13, 26, 31, 0.72);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .gallery-page-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .gallery-page-grid {
    grid-template-columns: 1fr;
  }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 16, 20, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: min(90vw, 1100px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  padding: 0 20px;
}

.lightbox-close {
  position: absolute;
  top: env(safe-area-inset-top, 18px);
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: var(--accent);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.lightbox-nav:hover {
  background: var(--accent);
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

@media (max-width: 640px) {
  .lightbox-nav {
    width: 42px;
    height: 42px;
  }
  .lightbox-prev {
    left: 8px;
  }
  .lightbox-next {
    right: 8px;
  }
}

/* Homepage blog preview */
.blog-preview {
  padding: 80px 0;
  background: #f7f3ee;
}

.blog-preview-footer {
  text-align: center;
  margin-top: 36px;
}

@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .article-body-wrap {
    padding: 40px 0 56px;
  }

  .article-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-pager {
    flex-direction: column;
  }

  .pager-link {
    max-width: 100%;
  }
}
