/* style.css — Lanchonete main site (Modern theme recreation) */

/* ===== CSS Variables (matching live lanchonete.org) ===== */

:root {
  --color_accent: #ed1c24;
  --color_accent--a0: rgba(237,28,36,0);
  --color_accent_text: #000000;
  --color_header_background: #ffffff;
  --color_header_text: #ed1c24;
  --color_header_text--a20: rgba(237,28,36,0.2);
  --color_intro_background: #ffffff;
  --color_intro_text: #000000;
  --color_content_background: #ffffff;
  --color_content_text: #6a6c6e;
  --color_content_headings: #ed1c24;
  --color_footer_background: #ed1c24;
  --color_footer_text: #ffffff;
  --color_footer_text--a20: rgba(255,255,255,0.2);
  --color_footer_headings: #ffffff;
  --background_color: #ffffff;
  --custom_logo_height: 211px;
  --layout_width: 1200px;
}

/* ===== Base ===== */

@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,400;0,600;0,700;1,400&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.6;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Fira Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  color: var(--color_content_text);
  background-color: var(--background_color);
  background-image: url('/images/papel_toalha.jpg');
  background-repeat: repeat;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color_accent);
  text-decoration: none;
}

a:hover, a:focus {
  color: var(--color_accent);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color_content_headings);
  font-family: "Fira Sans", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.75em;
}

p {
  margin: 0 0 1em;
}

/* ===== Site wrapper ===== */

#page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== Hero Slideshow (homepage) ===== */

.intro {
  width: 100%;
  background: #fff;
}

.intro-inner {
  width: 100%;
}

.intro-slideshow {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1200 / 465;
}

/* --- Slides --- */

.intro-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 500ms ease;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.intro-slide.active {
  opacity: 1;
  z-index: 2;
}

.intro-slide-media {
  position: absolute;
  inset: 0;
}

.intro-slide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Logo overlay (upper-left of slideshow) --- */

.intro-logo {
  position: absolute;
  top: 6%;
  left: 3%;
  z-index: 8;
  display: block;
}

.intro-logo img {
  width: clamp(120px, 18vw, 220px);
  height: auto;
  display: block;
}

/* --- Social media icons (right side, above line) --- */

.intro-social {
  position: absolute;
  top: 28%;
  right: 3%;
  z-index: 8;
  display: flex;
  gap: 12px;
  align-items: center;
}

.intro-social a {
  display: block;
  width: 28px;
  height: 28px;
  color: #222;
  transition: color 0.2s;
}

.intro-social a:hover {
  color: var(--color_accent);
}

.intro-social svg {
  width: 100%;
  height: 100%;
}

/* --- Horizontal divider line --- */

.intro-divider {
  position: absolute;
  top: 50%;
  left: 3%;
  right: 3%;
  z-index: 7;
  border: none;
  border-top: 1.5px solid #fff;
  margin: 0;
  pointer-events: none;
}

/* --- Slide title --- */

.intro-slide-title {
  position: relative;
  z-index: 5;
  margin: 0;
  padding: 0 0 10% 3%;
  font-size: 4em;
  line-height: 1.2;
}

.intro-slide-title a {
  color: #ffffff;
  text-decoration: none;
  text-shadow: 0 0 0px rgba(255, 255, 255, 0.9), 0 0 24px rgb(0 0 0 / 70%), 0 1px 3px rgb(0 0 0 / 80%);
}

.intro-slide-title a:hover {
  text-decoration: none;
}

/* --- White gradient overlay --- */

.intro-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(255,255,255,0) 0%,
      rgba(255,255,255,0) 50%,
      rgba(255,255,255,0.5) 65%,
      rgba(255,255,255,0.75) 80%,
      rgba(255,255,255,0.9) 100%
    );
}

/* --- Navigation arrows --- */

.intro-arrow {
  position: absolute;
  bottom: 8%;
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #333;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  padding: 0;
}

.intro-arrow:hover {
  background: var(--color_accent);
  border-color: var(--color_accent);
}

.intro-arrow:hover .intro-arrow-icon {
  color: #fff;
}

.intro-arrow-icon {
  font-size: 1.6rem;
  line-height: 1;
  color: #333;
  display: block;
  margin-top: -2px;
}

.intro-prev {
  left: 3%;
}

.intro-next {
  left: calc(3% + 60px);
}

/* --- Numbered pagination --- */

.intro-dots {
  position: absolute;
  bottom: 8%;
  right: 3%;
  z-index: 10;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
}

.intro-dots li button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #555;
  background: transparent;
  color: #555;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  padding: 0;
  line-height: 1;
}

.intro-dots li button:hover {
  border-color: var(--color_accent);
  color: var(--color_accent);
}

.intro-dots li.active button {
  background: var(--color_accent);
  border-color: var(--color_accent);
  color: #fff;
}

/* --- Responsive --- */

@media (max-width: 767px) {
  .intro-slideshow {
    aspect-ratio: 16 / 10;
  }

  .intro-slide-title {
    font-size: clamp(1.4rem, 7vw, 2.5rem);
    padding-bottom: 18%;
  }

  .intro-arrow {
    width: 38px;
    height: 38px;
    bottom: 5%;
  }

  .intro-arrow-icon {
    font-size: 1.3rem;
  }

  .intro-next {
    left: calc(3% + 48px);
  }

  .intro-dots li button {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }

  .intro-logo img {
    width: 90px;
  }

  .intro-social {
    top: 12%;
    gap: 8px;
  }

  .intro-social a {
    width: 20px;
    height: 20px;
  }
}

/* ===== Header / Navigation ===== */

.site-header-navigation {
  background-color: var(--color_header_background);
  color: var(--color_header_text);
  border-bottom: 1px solid var(--color_header_text--a20);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.site-header-navigation-inner {
  max-width: var(--layout_width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
}

/* Site branding */
.site-branding {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.site-branding a {
  text-decoration: none;
}

.custom-logo {
  height: var(--custom_logo_height);
  width: auto;
  max-height: 80px; /* constrain in nav */
}

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.site-title a {
  color: var(--color_header_text);
  text-decoration: none;
}

.site-description {
  font-size: 0.8rem;
  color: var(--color_header_text);
  opacity: 0.7;
  margin: 0;
}

/* Main navigation */
.main-navigation-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.main-navigation ul li a {
  color: var(--color_header_text);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 10px;
  display: block;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: opacity 0.15s;
}

.main-navigation ul li a:hover {
  opacity: 0.75;
  text-decoration: none;
}

/* Language switcher */
.lang-switcher {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-switcher a {
  color: var(--color_header_text);
  padding: 2px 5px;
  border: 1px solid var(--color_header_text--a20);
  border-radius: 2px;
}

.lang-switcher a:hover {
  background: var(--color_accent);
  color: #fff;
  text-decoration: none;
  border-color: transparent;
}

.lang-switcher .lang-btn {
  padding: 2px 5px;
  border: 1px solid var(--color_header_text--a20);
  border-radius: 2px;
  font-size: 0.8rem;
  line-height: 1.4;
}

.lang-switcher .lang-current {
  background: var(--color_accent);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}

.lang-switcher .lang-disabled {
  color: #bbb;
  border-color: #ddd;
  text-decoration: line-through;
  cursor: default;
}

/* Post card: other-language-only badge and muted style */
.entry-other-lang {
  opacity: 0.85;
}

.lang-only-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 2px;
  background: var(--color_accent);
  color: #fff;
  margin-left: 6px;
  vertical-align: middle;
}

/* ===== Main content area ===== */

#content {
  max-width: var(--layout_width);
  margin: 32px auto;
  padding: 0 24px;
  display: flex;
  gap: 32px;
  flex: 1;
  width: 100%;
}

.content-area {
  flex: 1;
  min-width: 0;
}

/* ===== Posts / entries ===== */

.entry {
  background-color: var(--color_content_background);
  margin-bottom: 24px;
  border: 1px solid rgba(0,0,0,0.06);
}

.entry-header {
  padding: 20px 24px 0;
}

.entry-title {
  font-size: 1.3rem;
  margin: 0 0 8px;
}

.entry-title a {
  color: var(--color_content_headings);
  text-decoration: none;
}

.entry-title a:hover {
  text-decoration: underline;
}

.entry-meta {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 12px;
}

.entry-media {
  overflow: hidden;
}

.entry-media img {
  width: 100%;
  height: auto;
}

.entry-summary {
  padding: 16px 24px 20px;
  font-size: 0.95rem;
  line-height: 1.65;
}

.more-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color_accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Posts grid (homepage) */
.posts-grid {
  position: relative;
}

.posts-grid .entry {
  margin-bottom: 0;
}

/* ===== Single post ===== */

.single-entry {
  background: var(--color_content_background);
  padding: 32px;
  border: 1px solid rgba(0,0,0,0.06);
}

.single-entry .entry-title {
  font-size: 1.8rem;
}

.single-entry .entry-media {
  margin: 0 0 24px;
}

.single-entry .entry-media img {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
}

.entry-content {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color_content_text);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--color_content_headings);
}

.entry-content a {
  color: var(--color_accent);
}

.entry-content img {
  max-width: 100%;
  float: left;
  margin: 0 1.5em 1em 0;
}

/* Post navigation */
.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(0,0,0,0.1);
  gap: 16px;
}

.post-navigation a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color_accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== Page template ===== */

.page-entry {
  background: var(--color_content_background);
  padding: 32px;
  border: 1px solid rgba(0,0,0,0.06);
}

.page-title {
  font-size: 1.8rem;
  margin-bottom: 24px;
}

.page-content {
  font-size: 1rem;
  line-height: 1.75;
}

.page-content a {
  color: var(--color_accent);
}

/* ===== Section list ===== */

.section-list {
  background: var(--color_content_background);
  padding: 32px;
  border: 1px solid rgba(0,0,0,0.06);
}

.section-list h1 {
  margin-bottom: 24px;
}

.section-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.section-list ul li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.section-list ul li a {
  color: var(--color_content_headings);
  font-weight: 600;
}

/* ===== Sidebar ===== */

.sidebar {
  width: 280px;
  flex-shrink: 0;
}

.widget {
  background-color: var(--color_content_background);
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid rgba(0,0,0,0.06);
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color_content_headings);
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color_accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget ul li {
  padding: 5px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 0.9rem;
}

.widget ul li a {
  color: var(--color_content_text);
}

.widget ul li a:hover {
  color: var(--color_accent);
}

/* ===== Pagination ===== */

.pagination {
  display: flex;
  justify-content: space-between;
  margin: 24px 0;
  padding: 16px 0;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.pagination a {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== Footer ===== */

.site-footer {
  background-color: var(--color_footer_background);
  color: var(--color_footer_text);
  padding: 32px 0;
  margin-top: auto;
}

.site-footer-inner {
  max-width: var(--layout_width);
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer a {
  color: rgba(255,255,255,0.8);
}

.site-footer a:hover {
  color: #fff;
  text-decoration: none;
}

/* ===== Responsive ===== */

@media (max-width: 900px) {
  #content {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }

  .site-header-navigation-inner {
    flex-direction: column;
    padding: 12px 24px;
    min-height: auto;
    gap: 8px;
  }

  .main-navigation ul {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .posts-grid .entry {
    position: static !important;
    width: 100% !important;
    left: auto !important;
    top: auto !important;
  }
}

/* ===== Gallery & Slideshow Shortcodes (Issue 11) ===== */

/* Gallery grid */
.wp-gallery {
  display: grid;
  gap: 6px;
  margin: 1.5em 0;
}
.wp-gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wp-gallery-cols-3 { grid-template-columns: repeat(3, 1fr); }
.wp-gallery-cols-4 { grid-template-columns: repeat(4, 1fr); }
.wp-gallery-cols-5 { grid-template-columns: repeat(5, 1fr); }
.wp-gallery-cols-6 { grid-template-columns: repeat(6, 1fr); }

.gallery-item {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 1;
}
.gallery-item a {
  display: block;
  width: 100%;
  height: 100%;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}
.gallery-item img:hover { opacity: 0.85; }

@media (max-width: 600px) {
  .wp-gallery-cols-4,
  .wp-gallery-cols-5,
  .wp-gallery-cols-6 { grid-template-columns: repeat(3, 1fr); }
  .wp-gallery-cols-2,
  .wp-gallery-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

/* Slideshow */
.wp-slideshow {
  position: relative;
  margin: 1.5em 0;
}
.wp-slideshow-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 6px;
  scrollbar-width: none;
}
.wp-slideshow-track::-webkit-scrollbar { display: none; }
.slideshow-item {
  flex: 0 0 auto;
  width: calc(100% - 80px);
  max-height: 520px;
  scroll-snap-align: start;
  margin: 0;
  overflow: hidden;
}
.slideshow-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wp-slideshow-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}
.slideshow-prev, .slideshow-next {
  background: #372490;
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  font-size: 1.4em;
  cursor: pointer;
  border-radius: 50%;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slideshow-prev:hover, .slideshow-next:hover { background: #E12D1E; }

/* Caption (figure with caption) */
figure.wp-caption {
  margin: 1em 0;
  max-width: 100%;
}
figure.wp-caption.alignleft {
  float: left;
  margin-right: 1.5em;
  margin-bottom: 0.5em;
}
figure.wp-caption.alignright {
  float: right;
  margin-left: 1.5em;
  margin-bottom: 0.5em;
}
figure.wp-caption.aligncenter { margin: 1em auto; text-align: center; }
figure.wp-caption img { display: block; max-width: 100%; height: auto; }
figure.wp-caption figcaption {
  font-size: 0.8em;
  color: #666;
  margin-top: 4px;
  font-style: italic;
}
