/*
Theme Name: Deierenasyl
Theme URI: https://dev26.deierenasyl.lu
Author: Addedsense
Author URI: https://www.addedsense.lu
Description: Custom theme for Déierenasyl & LNPA
Version: 1.0.0
Text Domain: deierenasyl
*/

/* ==========================================================================
   FONTS
   ========================================================================== */

@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/poppins-v24-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/poppins-v24-latin-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/poppins-v24-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/poppins-v24-latin-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/poppins-v24-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   CSS VARIABLES
   ========================================================================== */

:root {
  --color-brown: #BB6A29;
  --color-brown-dark: #9a5620;
  --color-blue: #184287;
  --color-blue-dark: #12336b;
  --color-accent: #0093d3;
  --color-white: #ffffff;
  --color-black: #242424;
  --color-light-bg: #f5efe8;
  --color-grey: #666666;
  --color-heading: #4a4a4a;
  --font-family: 'Poppins', system-ui, sans-serif;
  --font-heading: 'Poppins', system-ui, sans-serif;
  --header-height: 120px;
  --transition: 0.3s ease;
  --radius-btn: 8px;

  --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
  --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-md: clamp(0.95rem, 0.88rem + 0.35vw, 1.1rem);
  --text-lg: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  --text-xl: clamp(1.4rem, 1.2rem + 1vw, 2rem);
  --text-2xl: clamp(1.8rem, 1.5rem + 1.5vw, 2.8rem);
  --text-3xl: clamp(2.2rem, 1.8rem + 2vw, 3.5rem);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: calc(var(--header-height) + 20px);
}

body {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-black);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

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

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

ul, ol {
  list-style: none;
}

.fl-rich-text ul,
.fl-rich-text ol,
.fl-html ul,
.fl-html ol,
.chien-single--no-image .chien-single__description ul,
.chien-single--no-image .chien-single__description ol {
  list-style: revert;
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.fl-rich-text li,
.fl-html li,
.chien-single--no-image .chien-single__description li {
  margin-bottom: 0.3em;
}

/* Content links: underlined. Theme components (cards, buttons, CTAs) all carry a
   class, so only plain text links match. :where() keeps specificity low so
   component rules like .contact-list a still win. */
:where(.fl-rich-text, .fl-html, .chien-single__description, .news-single__content) a:not([class]) {
  text-decoration: underline;
  text-decoration-color: var(--template-color);
  text-underline-offset: 3px;
}

:where(.fl-rich-text, .fl-html, .chien-single__description, .news-single__content) a:not([class]):hover {
  color: var(--template-color);
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-heading);
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

h1 {
  font-size: var(--text-3xl);
  letter-spacing: -0.02em;
  padding-top: 50px;
}

.single-chien h1,
.single-chat h1,
.single-job h1 {
  padding-top: 10px;
}

.page-title {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 30px;
  padding-right: 30px;
}

h2 {
  font-size: var(--text-2xl);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--text-xl);
}

p {
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   TEMPLATE BODY CLASSES — COLOR THEMING
   ========================================================================== */

body.template-deierenasyl {
  --template-color: var(--color-brown);
  --template-color-dark: var(--color-brown-dark);
}

body.template-lnpa {
  --template-color: var(--color-blue);
  --template-color-dark: var(--color-blue-dark);
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 30px;
  height: var(--header-height);
}

.site-logo img,
.site-logo svg {
  height: 50px;
  width: auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--color-black);
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.main-nav a:hover {
  color: var(--template-color);
  background: var(--color-light-bg);
}

.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-menu-ancestor > a {
  color: var(--template-color);
  background: var(--color-light-bg);
}

/* --- Desktop Dropdown --- */

.submenu-toggle {
  display: none;
}

.main-nav .menu-item-has-children {
  position: relative;
}

.main-nav .menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 6px;
  margin-bottom: 2px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.main-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--color-white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
  z-index: 100;
}

.main-nav .menu-item-has-children:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-nav .sub-menu {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.main-nav .sub-menu li {
  display: block;
}

.main-nav .sub-menu a {
  padding: 10px 24px;
  font-size: var(--text-base);
  font-weight: 400;
  white-space: nowrap;
  border-radius: 0;
}

.main-nav .sub-menu a:hover {
  background: var(--color-light-bg);
  color: var(--template-color);
}

/* ==========================================================================
   LANGUAGE SWITCHER
   ========================================================================== */

.lang-switcher {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-grey);
}

.lang-switcher a {
  color: var(--color-grey);
  padding: 4px 6px;
}

.lang-switcher a:hover {
  color: var(--template-color);
}

.lang-switcher .current-lang {
  color: var(--template-color);
}

/* WPML switcher integration */
.wpml-ls-legacy-list-horizontal {
  padding: 0;
}

.wpml-ls-legacy-list-horizontal a {
  padding: 4px 6px;
  font-size: var(--text-sm);
  font-weight: 600;
}

.wpml-ls-legacy-list-horizontal .wpml-ls-current-language a {
  color: var(--template-color);
}

/* ==========================================================================
   MOBILE MENU
   ========================================================================== */

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-black);
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 992px) {
  :root {
    --header-height: 72px;
  }

  .menu-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px 30px;
    transform: translateY(-110%);
    transition: transform var(--transition), visibility 0s linear var(--transition);
    z-index: 999;
    visibility: hidden;
    pointer-events: none;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }

  .main-nav.is-open {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform var(--transition), visibility 0s;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .main-nav li {
    width: 100%;
  }

  .main-nav a {
    padding: 12px 16px;
    font-size: var(--text-md);
    width: 100%;
    white-space: normal;
    word-wrap: break-word;
  }

  .site-logo {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 60%;
  }

  .site-logo img,
  .site-logo svg {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 36px;
    display: block;
  }

  .header-inner {
    padding: 0 14px;
  }

  .header-right {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
  }

  .lang-switcher {
    font-size: var(--text-base);
    font-weight: 700;
  }

  /* Mobile: override desktop dropdown positioning */
  .main-nav .menu-item-has-children {
    position: relative;
  }

  .main-nav .menu-item-has-children > a::after {
    display: none;
  }

  .main-nav .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: none;
    border-radius: 0;
    padding: 0;
    min-width: 0;
    display: none;
    padding-left: 16px;
  }

  .main-nav .menu-item-has-children.submenu-open > .sub-menu {
    display: block;
  }

  .main-nav .sub-menu a {
    padding: 8px 16px;
    padding-left: 20px;
    font-size: var(--text-base);
    white-space: normal;
  }

  .submenu-toggle {
    display: block;
    position: absolute;
    top: 6px;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    color: var(--color-black);
    transition: transform var(--transition);
  }

  .submenu-toggle::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform var(--transition);
  }

  .menu-item-has-children.submenu-open > .submenu-toggle::after {
    transform: rotate(-135deg);
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: var(--template-color);
  color: var(--color-white);
  padding-top: 50px;
  font-size: var(--text-sm);
  line-height: 1.8;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 60px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 30px;
  align-items: start;
}

.footer-col a {
  color: var(--color-white);
}

.footer-col a:hover {
  opacity: 0.75;
}

.footer-col p {
  margin-bottom: 8px;
}

.footer-link-underline {
  text-decoration: underline;
}

.footer-col--hours {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-hours-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.footer-hours-item p {
  line-height: 1.6;
  margin: 0;
}

.footer-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  margin-top: 2px;
  stroke-width: 2.5px;
}

.footer-col--label {
  display: flex;
  align-items: start;
  justify-content: flex-end;
}

.footer-label {
  max-width: 120px;
  height: auto;
}

.footer-col--donate {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.footer-col a.footer-donate-btn,
.footer-col a.footer-donate-btn:hover {
  background: var(--color-white);
  color: var(--template-color);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  opacity: 1;
}

.footer-col a.footer-donate-btn:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.footer-donate-btn svg {
  width: 30px;
  height: 30px;
  color: #e63946;
  fill: #e63946;
  stroke: #e63946;
}

.footer-social {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  max-width: 1400px;
  margin: 40px auto 0;
  padding: 30px 30px 0;
}

.footer-social a {
  color: var(--color-white);
  transition: opacity var(--transition);
}

.footer-social a:hover {
  opacity: 0.7;
}

.footer-social svg {
  width: 32px;
  height: 32px;
}

.footer-hr {
  margin: 30px 0 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: var(--text-xs);
  opacity: 0.7;
}

.footer-bottom__legal {
  display: inline-flex;
  gap: 16px;
}

.footer-bottom a {
  color: var(--color-white);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .footer-bottom {
    justify-content: center;
    text-align: center;
    gap: 10px;
  }
  .footer-bottom__legal {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-col--label,
  .footer-col--donate {
    justify-content: flex-start;
  }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  font-family: var(--font-family);
  font-size: var(--text-md);
  font-weight: 500;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.btn-primary {
  background: var(--template-color);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--template-color-dark);
}

.btn-brown { background: var(--color-brown); color: var(--color-white); }
.btn-brown:hover { background: var(--color-brown-dark); }

.btn-blue { background: var(--color-blue); color: var(--color-white); }
.btn-blue:hover { background: var(--color-blue-dark); }

.btn-pdf {
  background: transparent;
  color: var(--template-color);
  border: 1.5px solid var(--template-color);
  margin: 0 10px 10px 0;
}

.btn-pdf:hover {
  background: var(--template-color);
  color: var(--color-white);
}

.pdf-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  padding-right: 10px;
  box-sizing: content-box;
}

.btn-icon {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

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

.btn-outline:hover {
  background: var(--template-color);
  color: var(--color-white);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-accent:hover {
  background: #007ab3;
}

/* ==========================================================================
   KICKER (dates and small labels above titles: news, jobs)
   ========================================================================== */

.kicker {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
  color: var(--template-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  position: relative;
  width: 100%;
  min-height: 500px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 30px;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
}

/* --- News / Info Box --- */

.hero-news {
  position: absolute;
  bottom: -30px;
  left: 30px;
  max-width: 420px;
  background: var(--color-accent);
  color: var(--color-white);
  padding: 38px 42px 38px 74px;
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.5;
  border-radius: var(--radius-btn);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  z-index: 10;
}

.hero-news::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0' fill='none'/%3E%3C/svg%3E") no-repeat center / contain;
  flex-shrink: 0;
}

.hero-news p {
  margin: 0;
}

.hero-news a {
  color: var(--color-white);
  text-decoration: underline;
  font-weight: 600;
}

.hero-news a:hover {
  opacity: 0.85;
}

/* --- Floating CTA Circles --- */

.floating-ctas {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 10;
}

.cta-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 12px;
  font-weight: 600;
  font-size: var(--text-md);
  color: var(--color-white);
  text-align: center;
  line-height: 1.15;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.cta-circle small {
  font-size: 0.75em;
  font-weight: 500;
  opacity: 0.9;
  white-space: nowrap;
}

.cta-circle:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.cta-circle--brown {
  background: rgba(187, 106, 41, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* --- Slim CTA bar (single animal pages) --- */

.ctas-bar {
  background: var(--color-light-bg);
}

.ctas-bar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 30px;
}

.ctas-bar__right {
  display: flex;
  gap: 10px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 30px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--template-color);
  border: 1.5px solid var(--template-color);
  border-radius: var(--radius-btn);
  background: transparent;
  transition: background var(--transition), color var(--transition);
}

.back-link:hover {
  background: var(--template-color);
  color: var(--color-white);
}

.cta-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 30px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-white);
  border-radius: var(--radius-btn);
  transition: transform var(--transition);
}

.cta-pill:hover {
  transform: translateY(-1px);
}

.cta-pill--brown  { background: var(--color-brown); }
.cta-pill--blue   { background: var(--color-blue); }
.cta-pill--accent { background: var(--color-accent); }

/* --- Floating side CTAs (vertical tabs on right) --- */

.side-ctas {
  position: fixed;
  right: 0;
  top: 40%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-cta {
  writing-mode: vertical-rl;
  padding: 22px 14px;
  color: var(--color-white);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  border-top-left-radius: var(--radius-btn);
  border-bottom-left-radius: var(--radius-btn);
  transition: transform var(--transition);
}

.side-cta:hover {
  transform: translateX(-10px);
  color: var(--color-white);
}

.side-cta--brown  { background: var(--color-brown); }
.side-cta--blue   { background: var(--color-blue); }
.side-cta--accent { background: var(--color-accent); }


.cta-circle--blue {
  background: rgba(24, 66, 135, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cta-circle--accent {
  background: rgba(0, 147, 211, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: var(--text-sm);
}

/* --- Hero Responsive --- */

@media (max-width: 768px) {
  .hero {
    min-height: 300px;
  }

  .hero-inner {
    min-height: 300px;
  }

  .hero {
    margin-bottom: 60px;
  }

  .hero-news {
    bottom: -40px;
    left: 16px;
    right: 16px;
    max-width: none;
    font-size: var(--text-sm);
    padding: 18px 20px 18px 60px;
  }

  .hero-news::before {
    left: 16px;
    width: 28px;
    height: 28px;
  }

  .floating-ctas {
    top: 16px;
    bottom: auto;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-direction: row;
    transform: none;
  }

  .cta-circle {
    width: 84px;
    height: 84px;
    font-size: var(--text-xs);
    padding: 0 6px;
    line-height: 1.15;
  }

  .cta-circle small {
    font-size: 0.72em;
    display: block;
    margin-top: 2px;
  }
}

/* ==========================================================================
   TROUVE CARDS (found animals — uses .chien-card/grid classes)
   ========================================================================== */

.trouve-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 992px) {
  .trouve-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .trouve-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.chien-card.trouve-card {
  cursor: default;
}

/* ==========================================================================
   CHIEN CARDS
   ========================================================================== */

.animal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1400px;
  margin: 0 auto 30px;
  align-items: center;
}

.filter-control {
  font-family: var(--font-family);
  font-size: var(--text-sm);
  padding: 10px 14px;
  border: 1.5px solid #ddd;
  border-radius: var(--radius-btn);
  background: var(--color-white);
  cursor: pointer;
  min-width: 140px;
}

.filter-control:focus {
  outline: none;
  border-color: var(--template-color);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 10px 16px;
  border: 1.5px solid #ddd;
  border-radius: var(--radius-btn);
  background: var(--color-white);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.filter-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filter-chip:has(input:checked) {
  background: var(--template-color);
  color: var(--color-white);
  border-color: var(--template-color);
}

.filter-reset {
  font-family: var(--font-family);
  font-size: var(--text-sm);
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--color-grey);
  cursor: pointer;
  text-decoration: underline;
  margin-left: auto;
}

.filter-reset:hover {
  color: var(--template-color);
}

.animal-filters__empty {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 0;
  text-align: center;
  color: var(--color-grey);
  font-size: var(--text-md);
}

.chien-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.chien-grid__cta {
  margin-top: 20px;
  text-align: right;
}

a.chien-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.chien-card {
  background: var(--color-white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}

.chien-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.chien-card__image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.chien-card__body {
  padding: 24px;
}

.chien-card__name {
  font-family: var(--font-family);
  font-weight: 700;
  font-size: var(--text-xl);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 8px;
  line-height: 1.2;
}

/* Jobs + news: titles in normal case (must come after .chien-card__name) */
.chien-card--normal-case .chien-card__name {
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 16px;
}

.chien-card__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--text-base);
  color: var(--color-grey);
  margin-bottom: 16px;
}

.chien-card__icons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chien-icon {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  cursor: default;
  color: var(--template-color);
}

.chien-icon svg {
  width: 100%;
  height: 100%;
}

.chien-icon::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  background: var(--color-black);
  color: var(--color-white);
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.chien-icon:hover::after {
  opacity: 1;
}

@media (max-width: 992px) {
  .chien-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .chien-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ==========================================================================
   NEWS CARDS
   ========================================================================== */

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

/* News cards reuse .chien-card; body stretches so "Lire la suite" sits at the bottom */
a.news-card {
  display: flex;
  flex-direction: column;
}

.news-card .chien-card__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-grey);
  line-height: 1.6;
  margin: 0 0 16px;
  flex-grow: 1;
}

.news-card__more {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--template-color);
}

a.news-card:hover .news-card__more {
  text-decoration: underline;
}

@media (max-width: 992px) {
  .news-grid {
    gap: 20px;
  }
}

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

/* ==========================================================================
   NEWS SINGLE PAGE
   ========================================================================== */

.news-single {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 30px;
}

.news-single__title {
  margin-bottom: 24px;
}

.news-single__image {
  margin-bottom: 30px;
}

.news-single__image img {
  width: 100%;
  border-radius: var(--radius-btn);
}

.news-single__content {
  font-size: var(--text-md);
  line-height: 1.7;
}

/* ==========================================================================
   CHIEN SINGLE PAGE
   ========================================================================== */

.chien-single {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 50px 30px 60px;
}

/* Jobs: no image, content uses the full width (must come after .chien-single) */
.chien-single--no-image {
  grid-template-columns: 1fr;
}

.chien-single--no-image .chien-single__name {
  text-transform: none;
}

.chien-single__gallery img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.chien-single__name {
  text-transform: uppercase;
  margin-bottom: 0.3em;
}

.chien-single__details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
  font-size: var(--text-base);
  color: var(--color-grey);
}

.chien-detail strong {
  color: var(--color-black);
  margin-right: 8px;
}

.chien-single__description {
  margin-top: 24px;
  font-size: var(--text-md);
  line-height: 1.7;
}

/* Jobs: section headings one step smaller than the site h2 */
.chien-single--no-image .chien-single__description h2 {
  font-size: var(--text-xl);
}

@media (max-width: 768px) {
  .chien-single {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px 16px;
  }
}

/* ==========================================================================
   WORDPRESS CORE
   ========================================================================== */

.alignwide {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100%;
  max-width: 100%;
}

.wp-block-image img {
  height: auto;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* ==========================================================================
   BEAVER BUILDER OVERRIDES
   ========================================================================== */

.fl-builder .site-content {
  padding: 0;
}

.fl-row-content-wrap {
  padding-left: 30px;
  padding-right: 30px;
}

.fl-photo img {
  border-radius: 10px;
}

.fl-photo-gallery .fl-photo-content,
.fl-mosaicflow .fl-photo-content {
  overflow: hidden;
  border-radius: 10px;
}

.fl-photo-gallery .fl-photo img,
.fl-mosaicflow .fl-photo img {
  width: 100%;
  height: auto;
  transition: transform var(--transition);
}

.fl-photo-gallery .fl-photo:hover img,
.fl-mosaicflow .fl-photo:hover img {
  transform: scale(1.05);
}


/* ==========================================================================
   ANIMAL PREV/NEXT NAV
   ========================================================================== */

.animal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 1400px;
  margin: 40px auto 60px;
  padding: 0 30px;
}

.animal-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-weight: 600;
  color: var(--template-color);
  border: 1.5px solid var(--template-color);
  border-radius: var(--radius-btn);
  background: transparent;
  transition: background var(--transition), color var(--transition);
}

.animal-nav__link:hover {
  background: var(--template-color);
  color: var(--color-white);
}

.animal-nav__arrow {
  font-size: 1.2em;
  line-height: 1;
}

/* ==========================================================================
   ANIMAL GALLERY + LIGHTBOX
   ========================================================================== */

.animal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  max-width: 1400px;
  margin: 40px auto 60px;
  padding: 0 30px;
}

.animal-gallery__item {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-btn);
  transition: transform var(--transition);
}

.animal-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.animal-gallery__item:hover img {
  transform: scale(1.06);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-btn);
}

.lightbox__btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: var(--color-white);
  font-size: var(--text-xl);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__next  { right: 20px; top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   CONTACT BLOCK
   ========================================================================== */

.contact-block__logo img {
  max-width: 220px;
  margin-bottom: 24px;
}

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

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 10px 0;
}

.contact-list svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--template-color);
  margin-top: 3px;
}

.contact-list a {
  color: var(--color-black);
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.2);
  text-underline-offset: 3px;
  transition: color var(--transition), text-decoration-color var(--transition);
}

.contact-list a:hover {
  color: var(--template-color);
  text-decoration-color: currentColor;
}

/* ==========================================================================
   MAP ([map] shortcode, pre-rendered image, shelter in the centre)
   ========================================================================== */

.map {
  position: relative;
  aspect-ratio: 1400 / 540;
  margin-top: 40px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-light-bg);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.map__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.map__pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 70px;
  transform: translate(-50%, -100%);
  color: var(--template-color);
}

.map__pin svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25));
}

.map__label {
  position: absolute;
  left: calc(100% + 8px);
  top: 12px;
  padding: 6px 12px;
  white-space: nowrap;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--template-color);
  background: var(--color-white);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.map__credit {
  position: absolute;
  right: 10px;
  bottom: 8px;
  margin: 0;
  padding: 2px 8px;
  font-size: var(--text-xs);
  line-height: 1.4;
  color: var(--color-grey);
  background: color-mix(in srgb, var(--color-light-bg) 85%, transparent);
  border-radius: 4px;
}

.map__credit a {
  color: inherit;
  text-decoration: underline;
}

.map__actions {
  margin-top: 20px;
}

@media (max-width: 600px) {
  .map {
    aspect-ratio: auto;
    height: 340px;
  }

  .map__credit {
    left: 8px;
    right: 8px;
    text-align: center;
  }
}

/* ==========================================================================
   SHOP HEADER (cart icon, logo link)
   ========================================================================== */

.site-logo__link {
  display: block;
}

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--template-color);
  transition: color var(--transition);
}

.cart-link:hover {
  color: var(--template-color-dark);
}

.cart-link svg {
  width: 26px;
  height: 26px;
}

.cart-link__count {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--template-color);
  color: var(--color-white);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.cart-link__count--empty {
  display: none;
}

/* ==========================================================================
   WOOCOMMERCE
   ========================================================================== */
/* WooCommerce renders its own templates; nothing is copied into the theme.
   Everything below only restyles its default classes. */

.woo-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 50px 30px 60px;
}

.woocommerce .page-title,
.woocommerce-products-header__title {
  padding-left: 0;
  padding-right: 0;
}

/* Cart, checkout and account are ordinary pages: their content sits in a Beaver
   Builder row, which carries its own width from the shop's BB settings. Line it
   up with .woo-content (1400px box, 30px gutters, so 1340px of content). Scoped
   to the shop, so Beaver Builder on the main site is untouched. */
body.site-shop .fl-builder-content .fl-row-content.fl-row-fixed-width {
  max-width: 1340px;
}

body.site-shop .fl-builder-content .fl-row-content-wrap {
  padding-left: 30px;
  padding-right: 30px;
}

/* Product grid: two per row, one per row on phones. */
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
  content: none;
}

.woocommerce ul.products li.product {
  width: 100%;
  margin: 0;
  float: none;
  text-align: left;
}

/* The product photos are landscape (1920x1080). A fixed 16:9 box keeps every
   card the same height whatever is uploaded, and object-fit crops instead of
   distorting. WooCommerce must be set to match: see Product Images in the
   Customizer (16:9 cropping, thumbnail width 800). */
.woocommerce ul.products li.product img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 15px;
  border-radius: var(--radius-btn);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  padding: 0;
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-heading);
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--template-color);
  font-weight: 600;
  font-size: var(--text-md);
}

/* Buttons: same look as the rest of the theme */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  font-family: var(--font-family);
  font-size: var(--text-md);
  font-weight: 500;
  line-height: 1.2;
  border: none;
  border-radius: var(--radius-btn);
  background: var(--template-color);
  color: var(--color-white);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce #respond input#submit.alt:hover {
  background: var(--template-color-dark);
  color: var(--color-white);
}

/* Single product */
.woocommerce div.product .product_title {
  font-size: var(--text-2xl);
  color: var(--color-heading);
}

.woocommerce div.product div.images img {
  border-radius: var(--radius-btn);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
  color: var(--template-color);
}

.woocommerce .related > h2,
.woocommerce .upsells > h2,
.woocommerce .cross-sells > h2 {
  font-size: var(--text-2xl);
}

/* Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-top-color: var(--template-color);
  background: var(--color-light-bg);
  color: var(--color-black);
}

.woocommerce-message::before,
.woocommerce-info::before {
  color: var(--template-color);
}

/* Cart, checkout, account */
.woocommerce table.shop_table {
  border-radius: var(--radius-btn);
}

.woocommerce table.shop_table th {
  font-weight: 600;
  color: var(--color-heading);
}

.woocommerce-cart table.cart img {
  width: 70px;
  border-radius: var(--radius-btn);
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .select2-container .select2-selection--single {
  padding: 12px 14px;
  font-family: var(--font-family);
  font-size: var(--text-md);
  border: 1px solid var(--color-grey);
  border-radius: var(--radius-btn);
  background: var(--color-white);
}

.woocommerce form .form-row label {
  font-weight: 500;
  color: var(--color-heading);
}

.woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
}

.woocommerce-MyAccount-navigation li.is-active a {
  color: var(--template-color);
  font-weight: 600;
}

@media (max-width: 768px) {
  .woo-content {
    padding: 30px 20px 40px;
  }

  body.site-shop .fl-builder-content .fl-row-content-wrap {
    padding-left: 20px;
    padding-right: 20px;
  }

  .woocommerce ul.products {
    gap: 30px;
  }

  /* woocommerce-smallscreen.css forces 48% floats below 768px, which fights
     the grid and leaves the cards half empty. !important is the only way to
     beat it, since the plugin rule carries it too. */
  .woocommerce ul.products li.product {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
  }
}

/* One per row on phones: two columns leave the titles breaking on every word. */
@media (max-width: 600px) {
  .woocommerce ul.products {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   WPFORMS
   ========================================================================== */
/* WPForms is set to base styling only; the look comes from here. */

.wpforms-container .wpforms-field-label {
  font-family: var(--font-family);
  font-weight: 500;
  color: var(--color-heading);
}

.wpforms-container input[type=text],
.wpforms-container input[type=email],
.wpforms-container input[type=tel],
.wpforms-container input[type=number],
.wpforms-container input[type=url],
.wpforms-container select,
.wpforms-container textarea {
  padding: 12px 14px;
  font-family: var(--font-family);
  font-size: var(--text-md);
  border: 1px solid var(--color-grey);
  border-radius: var(--radius-btn);
  background: var(--color-white);
}

.wpforms-container input:focus,
.wpforms-container select:focus,
.wpforms-container textarea:focus {
  border-color: var(--template-color);
  outline: none;
}

.wpforms-container button[type=submit],
.wpforms-container input[type=submit] {
  padding: 16px 32px;
  font-family: var(--font-family);
  font-size: var(--text-md);
  font-weight: 500;
  border: none;
  border-radius: var(--radius-btn);
  background: var(--template-color);
  color: var(--color-white);
  cursor: pointer;
  transition: background var(--transition);
}

.wpforms-container button[type=submit]:hover,
.wpforms-container input[type=submit]:hover {
  background: var(--template-color-dark);
}

/* ==========================================================================
   UTILITY
   ========================================================================== */

.homebkg {
  background: linear-gradient(to bottom, #f5f0e6, var(--color-white));
}

.text-center { text-align: center; }
.text-white { color: var(--color-white); }
.bg-light { background: var(--color-light-bg); }
.bg-template { background: var(--template-color); }
.accent-word { color: var(--color-brown); }

/* ==========================================================================
   WP ADMIN BAR FIX
   ========================================================================== */

body.admin-bar .site-header {
  top: 32px;
}

body.admin-bar .main-nav {
  top: calc(var(--header-height) + 32px);
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  body.admin-bar .main-nav {
    top: calc(var(--header-height) + 46px);
  }
}
