/*
Theme Name: Trearddur Bay Holiday Homes
Theme URI: https://trearddurbayholidayhomes.co.uk
Author: Owen Sutton
Author URI: https://owensutton.com
Description: Custom theme for Trearddur Bay Holiday Homes — a holiday lettings agency on Anglesey, Wales.
Version: 1.0.0
License: Proprietary
Text Domain: tbhh
*/

/* ─── Photo Gallery Grid ─── */
/* Hero image */
.photo-gallery-hero { display: block !important; border-radius: 8px; overflow: hidden; margin-bottom: 8px !important; }
.photo-gallery-hero img { width: 100% !important; aspect-ratio: 16/9; object-fit: cover; display: block; }

/* Thumbnail grid — targets both .photo-gallery-grid div AND ul/li that WP may generate */
.photo-gallery-grid,
.entry-content .photo-gallery-grid,
.entry-content ul {
  list-style: none !important;
}
.photo-gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 2px !important;
  padding: 0 !important;
  margin: 0 !important;
}
@media (min-width: 768px) {
  .photo-gallery-grid { grid-template-columns: repeat(8, 1fr) !important; }
}
.photo-gallery-grid li,
.photo-gallery-grid a,
.photo-gallery-grid p {
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 0 !important;
  border-radius: 2px;
  overflow: hidden;
}
.photo-gallery-grid li::before { display: none !important; }
.photo-gallery-grid img {
  width: 100% !important;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block !important;
  transition: transform 0.2s ease;
}
.photo-gallery-grid a:hover img { transform: scale(1.05); }

/* ─── Pagination ─── */
.pagination,
nav.navigation .nav-links,
.page-numbers {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  list-style: none !important;
  padding: 0 !important;
  margin: 2rem 0 !important;
}
.page-numbers li {
  list-style: none !important;
}
.page-numbers a,
.page-numbers span,
a.page-numbers,
span.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid #D6B85C;
  color: #D6B85C;
  background: transparent;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.page-numbers a:hover,
a.page-numbers:hover {
  background: #D6B85C;
  color: #fff;
}
span.current,
.page-numbers .current {
  background: #D6B85C !important;
  color: #fff !important;
  border-color: #D6B85C !important;
}
.page-numbers .dots {
  border: none;
  color: #7A7468;
}

/* ─── Booking iframe ─── */
.booking-iframe { height: 1250px; }
@media (max-width: 768px) { .booking-iframe { height: 1500px; } }

/* ─── Fancybox close button ─── */
.fancybox__toolbar .f-button[data-fancybox-close] {
  background: rgba(255,255,255,0.9) !important;
  color: #3A3630 !important;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  margin: 8px;
}

/* ─── Section heading bars ─── */
.section-bar {
  background: #D6B85C;
  border-top: 3px solid #AD903E;
}

/* ─── Property Card Image Fix ─── */
.property-card-img {
  width: 100%;
  height: 0;
  padding-bottom: 55%;
  position: relative;
  overflow: hidden;
}
.property-card-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Blog/Page Content Typography ─── */
.entry-content h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: #3A3630;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.entry-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #D6B85C;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.entry-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
}
.entry-content > p:first-child {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #3A3630;
}
.entry-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1rem;
}
.entry-content ul li {
  padding-left: 1.25rem;
  position: relative;
  margin-bottom: 0.4rem;
}
.entry-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: #D6B85C;
  border-radius: 50%;
}
.entry-content blockquote {
  border-left: 3px solid #D6B85C;
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #7A7468;
}
.entry-content a {
  color: #D6B85C;
  font-weight: 600;
}
.entry-content a:hover {
  text-decoration: underline;
}

/* ─── Range Sliders ─── */
input[type="range"].gold-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: #E0D8C8;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
input[type="range"].gold-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: #D6B85C;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
input[type="range"].gold-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(214,184,92,0.4);
}
input[type="range"].gold-slider::-webkit-slider-thumb:active {
  transform: scale(1.05);
  background: #AD903E;
}
input[type="range"].gold-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: #D6B85C;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  cursor: pointer;
}
input[type="range"].gold-slider::-moz-range-track {
  height: 6px;
  background: #E0D8C8;
  border-radius: 3px;
}
input[type="range"].gold-slider:focus-visible {
  outline: 2px solid #D6B85C;
  outline-offset: 4px;
}

/* ─── Navigation Menu ─── */
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu { display: none; }

/* WordPress nav menu reset */
nav ul, nav ul.menu {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}
nav ul li, nav ul.menu li { list-style: none; }
nav ul li a, nav ul.menu li a {
  display: block;
  padding: 1rem 1.5rem;
  color: #FFFFFF;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  transition: background-color 0.15s;
}
nav ul li a:hover, nav ul.menu li a:hover {
  background-color: #D6B85C;
}

/* Sub-menus */
nav ul li.menu-item-has-children, nav ul.menu li.menu-item-has-children { position: relative; }
nav ul li.menu-item-has-children > ul.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-left: 4px solid #D6B85C;
  min-width: 220px;
  z-index: 100;
  padding: 0;
}
nav ul li.menu-item-has-children:hover > ul.sub-menu { display: block; }
nav ul li.menu-item-has-children > ul.sub-menu li a {
  color: #3A3630;
  font-size: 14px;
  padding: 0.625rem 1rem;
  text-transform: none;
  letter-spacing: 0;
}
nav ul li.menu-item-has-children > ul.sub-menu li a:hover {
  background-color: rgba(214,184,92,0.1);
  color: #D6B85C;
}

/* Mobile: slide-down menu animation */
/* Desktop nav: show inline at lg (1024px+) */
@media (min-width: 1024px) {
  nav ul, nav ul.menu {
    max-height: none !important;
    opacity: 1 !important;
    position: static;
    overflow: visible;
  }
}

@media (max-width: 1023px) {
  nav ul, nav ul.menu {
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #AD903E;
    z-index: 50;
    overflow: hidden;
    display: flex;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
  }
  nav ul.active, nav ul.menu.active {
    display: flex;
    max-height: 500px;
    opacity: 1;
  }
  nav ul li {
    width: 100%;
  }
  nav ul li a, nav ul.menu li a {
    display: block;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 1rem;
  }
}

/* Footer nav menu */
footer ul.menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
footer ul.menu li { list-style: none; }
footer ul.menu li a {
  opacity: 0.8;
  transition: opacity 0.15s, color 0.15s;
  text-decoration: none;
  color: inherit;
}
footer ul.menu li a:hover {
  opacity: 1;
  color: #D6B85C;
}
