/* Flickr tour photo gallery
   Uses the site's existing --darkBlue / --teal / --orange / --gray
   custom properties and 'Reckless' / 'BasisGrotesquePro-*' font faces —
   both already registered globally, nothing to load here. */

.flickr-gallery {
    /* Break out of the page template's boxed container so the gallery
       runs full width, regardless of which page template this shortcode
       sits on. */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.flickr-gallery__inner {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 48px;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .flickr-gallery__inner {
        padding: 0 20px;
    }
}

.flickr-gallery__eyebrow {
    font-family: 'BasisGrotesquePro-Bold', sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 14px;
}

.flickr-gallery__hero {
    /* Full-bleed background band, matching how the rest of the site runs its
       hero/inner-page bands under the nav (.desktop-nav is position:absolute
       by default, floating over the top of the page rather than pushing
       content down — see theme-before-wrappers.php). The big top padding is
       what actually keeps the headline/search clear of the floating nav and
       logo, not a gap before the coloured band itself. */
    padding: 180px 0 64px;
    margin: 0 0 40px;
    /* Matches the overlay on /about-exmouth/'s .home-hero:after exactly:
       rgba(2, 26, 49, 0.6), a flat navy scrim rather than a gradient. */
    background-image: linear-gradient(rgba(2, 26, 49, 0.6), rgba(2, 26, 49, 0.6)), url('https://www.whalesharkdive.com/wp-content/uploads/2021/11/about-us-bg.jpg');
    background-size: cover;
    background-position: center;
}

/* The album view has no colour band to fall back on, so it needs the same
   top clearance applied directly to its content instead. */
.flickr-gallery--album .flickr-gallery__inner {
    padding-top: 180px;
}

@media (max-width: 600px) {
    .flickr-gallery__hero {
        padding-top: 130px;
    }
    .flickr-gallery--album .flickr-gallery__inner {
        padding-top: 130px;
    }
}

.flickr-gallery__title {
    font-family: 'Reckless', serif;
    font-size: 42px;
    color: #fff;
    margin: 0 0 14px;
    max-width: 640px;
}

.flickr-gallery__subtitle {
    font-family: 'BasisGrotesquePro-Regular', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    max-width: 520px;
    margin: 0 0 28px;
}

.flickr-gallery__search {
    display: flex;
    gap: 12px;
    max-width: 600px;
}

.flickr-gallery__search input {
    flex: 1;
    border: none;
    border-radius: 2px;
    padding: 14px 18px;
    font-size: 14px;
    font-family: 'BasisGrotesquePro-Regular', sans-serif;
    color: var(--darkBlue);
}

.flickr-gallery__search button {
    background: var(--orange);
    color: #fff;
    border: none;
    font-family: 'BasisGrotesquePro-Bold', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 14px 26px;
    border-radius: 2px;
    cursor: pointer;
    white-space: nowrap;
}

.flickr-gallery__search button:hover {
    background: var(--darkBlue);
}

.flickr-gallery__results-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
}

.flickr-gallery__results-header h2 {
    font-family: 'Reckless', serif;
    font-size: 24px;
    color: var(--darkBlue);
    margin: 0;
    text-transform: none;
    padding-bottom: 0 !important;
}

.flickr-gallery__count,
.flickr-gallery__clear {
    font-family: 'BasisGrotesquePro-Regular', sans-serif;
    font-size: 13px;
    color: var(--gray);
}

.flickr-gallery__clear {
    color: var(--teal);
    text-decoration: none;
}

.flickr-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 64px;
}

@media (max-width: 900px) {
    .flickr-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .flickr-gallery__grid {
        grid-template-columns: 1fr;
    }
    .flickr-gallery__title {
        font-size: 30px;
    }
}

.flickr-gallery__card {
    display: block;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 3px;
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.flickr-gallery__card:hover {
    box-shadow: 0 8px 24px rgba(4, 36, 73, 0.12);
    transform: translateY(-2px);
}

.flickr-gallery__card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    background-color: var(--teal);
    background-size: cover;
    background-position: center;
}

.flickr-gallery__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #fff;
    font-family: 'BasisGrotesquePro-Bold', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 5px 10px;
    border-radius: 20px;
}

.flickr-gallery__card-body {
    padding: 14px 16px;
}

.flickr-gallery__card-date {
    font-family: 'Reckless', serif;
    font-size: 17px;
    color: var(--darkBlue);
}

.flickr-gallery__card-count {
    font-family: 'BasisGrotesquePro-Regular', sans-serif;
    font-size: 12px;
    color: var(--gray);
    margin-top: 4px;
}

.flickr-gallery__empty,
.flickr-gallery__error,
.flickr-gallery__admin-notice {
    font-family: 'BasisGrotesquePro-Regular', sans-serif;
    font-size: 14px;
    color: var(--gray);
    padding: 40px;
    text-align: center;
    background: #f7f7f7;
    border-radius: 3px;
}

.flickr-gallery__admin-notice {
    background: #fff7ed;
    color: #92400e;
    text-align: left;
}

/* Album view
   ------------------------------------------------------------------ */
.flickr-gallery__back {
    display: inline-block;
    font-family: 'BasisGrotesquePro-Regular', sans-serif;
    font-size: 13px;
    color: var(--gray);
    text-decoration: none;
    margin: 32px 0 20px;
}

.flickr-gallery__back:hover {
    color: var(--teal);
}

.flickr-gallery__album-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 28px;
    margin-bottom: 32px;
    border-bottom: 1px solid #e2e2e2;
}

.flickr-gallery__album-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.flickr-gallery__album-title-row h1 {
    font-family: 'Reckless', serif;
    font-size: 32px;
    color: var(--darkBlue);
    margin: 0;
    padding-bottom: 0 !important;
    text-transform: none;
}

.flickr-gallery__disclaimer {
    font-family: 'BasisGrotesquePro-Regular', sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: var(--gray);
    max-width: 520px;
    margin: 12px 0 0;
}

.flickr-gallery__download-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'BasisGrotesquePro-Bold', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--orange);
    padding: 14px 22px;
    border-radius: 2px;
    text-decoration: none;
    white-space: nowrap;
}

.flickr-gallery__download-all:hover {
    background: var(--darkBlue);
    color: #fff;
}

.flickr-gallery__photo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 72px;
}

@media (max-width: 900px) {
    .flickr-gallery__photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 500px) {
    .flickr-gallery__photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.flickr-gallery__photo {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: none;
    border-radius: 2px;
    background-color: var(--teal);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    padding: 0;
}

.flickr-gallery__photo:hover {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

/* Real <img> tiles (SEO: indexable images + ALT text), replacing CSS background-images.
   Container aspect-ratio handles sizing, so these cause no layout shift. (Dilate, 2026-10-09) */
.flickr-gallery__card-img,
.flickr-gallery__photo-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lightbox
   ------------------------------------------------------------------ */
.flickr-gallery__lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(4, 36, 73, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
}

.flickr-gallery__lightbox[hidden] {
    display: none;
}

.flickr-gallery__lightbox-image {
    max-width: 82vw;
    max-height: 72vh;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    border-radius: 2px;
}

.flickr-gallery__lightbox-close,
.flickr-gallery__lightbox-prev,
.flickr-gallery__lightbox-next {
    position: fixed;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.flickr-gallery__lightbox-close {
    top: 28px;
    right: 32px;
}

.flickr-gallery__lightbox-prev {
    top: 50%;
    left: 28px;
    transform: translateY(-50%);
}

.flickr-gallery__lightbox-next {
    top: 50%;
    right: 28px;
    transform: translateY(-50%);
}

.flickr-gallery__lightbox-caption {
    position: fixed;
    left: 50%;
    bottom: 48px;
    transform: translateX(-50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.flickr-gallery__lightbox-caption > div:first-child {
    font-family: 'BasisGrotesquePro-Regular', sans-serif;
    font-size: 14px;
    color: #fff;
}

.flickr-gallery__lightbox-count {
    font-family: 'BasisGrotesquePro-Regular', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

.flickr-gallery__lightbox-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'BasisGrotesquePro-Bold', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--orange);
    padding: 10px 20px;
    border-radius: 2px;
    text-decoration: none;
}

.flickr-gallery__lightbox-download:hover {
    background: var(--darkBlue);
    color: #fff;
}

/* ------------------------------------------------------------------
 * Photo Gallery page template (page-photo-gallery.php) — Dilate 2026-10-09
 * Content sections managed via the "Photo Gallery Page" ACF fields.
 * ------------------------------------------------------------------ */

/* When the page template owns the H1, the gallery renders a slim search bar
   instead of its own hero. */
.flickr-gallery__searchbar {
    padding: 0 0 10px;
}
.flickr-gallery__searchbar .flickr-gallery__search {
    margin: 0 auto;
    max-width: 640px;
}
.flickr-gallery--no-hero {
    padding-top: 10px;
}

/* Supporting content + related-links sections */
.gallery-info-section .gallery-info-block {
    max-width: 860px;
    margin: 0 auto 40px;
}
.gallery-info-section .gallery-info-block:last-child {
    margin-bottom: 0;
}
.gallery-info-section h2,
.gallery-links-section h2,
.gallery-faqs h2 {
    color: var(--darkBlue);
    margin-bottom: 16px;
}
.gallery-info-body {
    line-height: 1.7;
}
.gallery-info-body p {
    margin-bottom: 1em;
}

/* Photo FAQs accordion (scoped so it doesn't rely on other FAQ CSS) */
.gallery-faqs .et_pb_accordion {
    max-width: 860px;
    margin: 24px auto 0;
}
.gallery-faqs .et_pb_accordion_item {
    border-bottom: 1px solid rgba(2, 26, 49, 0.12);
}
.gallery-faqs .et_pb_toggle_title {
    cursor: pointer;
    padding: 18px 32px 18px 0;
    margin: 0 !important;
    color: var(--darkBlue) !important;
    font-family: 'Reckless', serif !important;
    font-size: 20px !important;
    line-height: 1.35 !important;
    font-weight: 500 !important;
    text-transform: none !important;
    position: relative;
}
.gallery-faqs .et_pb_toggle_title::after {
    content: '+';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--teal);
    font-size: 24px;
    line-height: 1;
}
.gallery-faqs .et_pb_toggle_title.active::after {
    content: '–';
}
.gallery-faqs .et_pb_toggle_content {
    padding: 0 0 20px;
    line-height: 1.7;
}

/* Related internal links */
.gallery-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-top: 24px;
}

@media (max-width: 600px) {
    .gallery-links { flex-direction: column; align-items: center; }
    .gallery-links .btn { width: 100%; max-width: 320px; text-align: center; }
}

/* Photo Gallery page hero (self-contained; does not rely on single-tours inline CSS) */
.photo-gallery-banner {
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: var(--darkBlue);
    padding: 200px 24px 90px;   /* top padding clears the floating/absolute nav */
    text-align: center;
    overflow: hidden;
}
.photo-gallery-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(2, 26, 49, 0.6);
}
.photo-gallery-banner__inner {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    color: #fff;
}
.photo-gallery-banner .sup-title {
    display: block;
    color: #fff;
    margin-bottom: 12px;
}
.photo-gallery-banner h1 {
    color: #fff;
    margin: 0 0 16px;
    text-transform: uppercase;
}
.photo-gallery-banner__intro {
    max-width: 680px;
    margin: 0 auto;
    color: #fff;
    line-height: 1.6;
}
.photo-gallery-banner__intro p { margin: 0; }
@media (max-width: 768px) {
    .photo-gallery-banner { padding: 140px 18px 60px; }
}

/* ------------------------------------------------------------------
 * Photo Gallery page — section polish to match the site's inner pages
 * (sup-title eyebrow + heading + curly-wave divider). Dilate 2026-10-09
 * ------------------------------------------------------------------ */
.gallery-page-section,
.gallery-info-section,
.gallery-faqs,
.gallery-links-section {
    padding: 70px 0;
}

.gallery-section-head {
    max-width: 820px;
    margin: 0 auto 40px;
}
.gallery-section-head .sup-title {
    display: block;
    margin-bottom: 10px;
}
.gallery-section-head h3 {
    color: var(--darkBlue);
    margin: 0;
}
.gallery-section-head .curly-wave-container {
    margin: 18px auto 0;
    line-height: 0;
}
.gallery-section-head .curly-wave-container svg {
    width: 46px;
    height: auto;
    display: inline-block;
}
.gallery-section-head .curly-waves .st0 {
    fill: var(--teal);
}

/* Search bar on a light section: make the input visible and keep it tidy */
.flickr-gallery__searchbar .flickr-gallery__search {
    margin: 0 auto;
    max-width: 560px;
}
.flickr-gallery__searchbar .flickr-gallery__search input {
    border: 1px solid #d5dede;
    background: #fff;
}

/* Related-links buttons shouldn't wrap */
.gallery-links .btn {
    white-space: nowrap;
}

/* Supporting section body stays readable/centred under its heading */
.gallery-info-section .gallery-info-block {
    max-width: 820px;
    margin: 0 auto 56px;
}
.gallery-info-section .gallery-info-body {
    text-align: center;
}

/* ------------------------------------------------------------------
 * Photo Gallery page — heading/hero/button refinements (Dilate 2026-10-09)
 * ------------------------------------------------------------------ */
/* Extra breathing room at the top of the hero */
.photo-gallery-banner { padding-top: 260px; }
@media (max-width: 768px) { .photo-gallery-banner { padding-top: 160px; } }

/* Bigger hero H1 in the site's display serif */
.photo-gallery-banner h1 {
    font-family: 'Reckless', serif !important;
    font-size: clamp(36px, 5vw, 64px) !important;
    line-height: 1.05 !important;
    letter-spacing: 0.5px;
}

/* Section headings were inheriting an oversized theme size — bring them down */
.gallery-section-head h3 {
    font-size: clamp(26px, 3.4vw, 40px) !important;
    line-height: 1.12 !important;
}

/* Related-links buttons: hug their text instead of the theme's fixed width */
.gallery-links .btn {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 16px 30px !important;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    overflow: visible;
}

/* Force hero top spacing over Divi's default section padding, and white intro */
.et_pb_section.photo-gallery-banner {
    padding: 290px 24px 90px !important;
}
@media (max-width: 768px) {
    .et_pb_section.photo-gallery-banner { padding: 150px 18px 60px !important; }
}
.photo-gallery-banner__intro,
.photo-gallery-banner__intro p,
.photo-gallery-banner__intro * {
    color: #fff !important;
}

/* Album view embedded in the page template: drop the standalone nav-clearance padding */
.flickr-gallery--album.flickr-gallery--no-hero .flickr-gallery__inner {
    padding-top: 0 !important;
}

/* Tighten spacing below the gallery when embedded in the page template */
.flickr-gallery--no-hero .flickr-gallery__grid { margin-bottom: 0 !important; }
.gallery-page-section { padding-bottom: 24px; }

/* November gallery content: explicit hierarchy and readable text, scoped to this template. */
body.page-template-page-photo-gallery .gallery-section-head h2 {
 font-family:'Reckless',serif!important;font-weight:400!important;
 font-size:clamp(30px,3.4vw,40px)!important;line-height:1.2!important;
 color:var(--darkBlue)!important;text-transform:none!important;margin:0!important;padding:0!important;
}
body.page-template-page-photo-gallery .gallery-info-body h3 {
 font-family:'BasisGrotesquePro-Bold',sans-serif!important;font-weight:400!important;
 font-size:26px!important;line-height:1.3!important;color:var(--darkBlue)!important;
 text-transform:none!important;margin:32px 0 16px!important;padding:0!important;
}
body.page-template-page-photo-gallery .gallery-info-body {
 max-width:860px;margin:0 auto;text-align:left!important;font-size:18px;line-height:1.7;
}
body.page-template-page-photo-gallery .gallery-info-body p,
body.page-template-page-photo-gallery .gallery-info-body li {font-size:inherit;line-height:inherit;}
body.page-template-page-photo-gallery .gallery-info-body ul,
body.page-template-page-photo-gallery .gallery-info-body ol {padding-left:24px;margin:0 0 24px;}
body.page-template-page-photo-gallery .gallery-info-body li {padding-left:4px;margin-bottom:12px;}
body.page-template-page-photo-gallery .gallery-info-body a {color:#147f87;text-decoration:underline;text-underline-offset:3px;}
body.page-template-page-photo-gallery .gallery-find-section {width:90%;max-width:860px;margin:0 auto 36px;}
body.page-template-page-photo-gallery .gallery-section-head {margin-bottom:28px;}
body.page-template-page-photo-gallery .gallery-links-section {background:#f0f5f5;}
body.page-template-page-photo-gallery .gallery-albums-cta {text-align:center;margin:32px auto 0;padding:0 20px;}
body.page-template-page-photo-gallery .gallery-albums-cta .btn,
body.page-template-page-photo-gallery .gallery-links .btn {
 display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;
 width:auto!important;max-width:100%!important;height:auto!important;min-height:52px;
 padding:16px 28px!important;margin:0!important;font-size:14px;line-height:1.4;
 white-space:normal;text-align:center;
}
body.page-template-page-photo-gallery .photo-gallery-banner__intro p+p {margin-top:18px;}
@media(max-width:600px){
 body.page-template-page-photo-gallery .gallery-info-body {font-size:17px;}
 body.page-template-page-photo-gallery .gallery-info-body h3 {font-size:23px!important;}
 body.page-template-page-photo-gallery .gallery-page-section,
 body.page-template-page-photo-gallery .gallery-info-section,
 body.page-template-page-photo-gallery .gallery-faqs,
 body.page-template-page-photo-gallery .gallery-links-section {padding:48px 0;}
}

body.page-template-page-photo-gallery .gallery-info-body ul {list-style:disc outside!important;}
body.page-template-page-photo-gallery .gallery-info-body ol {list-style:decimal outside!important;}

/* Gallery FAQ typography follows the content subheadings and body copy. */
body.page-template-page-photo-gallery .gallery-faqs .et_pb_toggle_title {
 font-family:'BasisGrotesquePro-Bold',sans-serif!important;
 font-size:26px!important;font-weight:400!important;line-height:1.3!important;
 letter-spacing:normal!important;
}
body.page-template-page-photo-gallery .gallery-faqs .et_pb_toggle_content,
body.page-template-page-photo-gallery .gallery-faqs .et_pb_toggle_content p,
body.page-template-page-photo-gallery .gallery-faqs .et_pb_toggle_content li {
 font-family:'BasisGrotesquePro-Regular',sans-serif!important;
 font-size:18px!important;line-height:1.7!important;
}
@media(max-width:600px){
 body.page-template-page-photo-gallery .gallery-faqs .et_pb_toggle_title {font-size:23px!important;}
 body.page-template-page-photo-gallery .gallery-faqs .et_pb_toggle_content,
 body.page-template-page-photo-gallery .gallery-faqs .et_pb_toggle_content p,
 body.page-template-page-photo-gallery .gallery-faqs .et_pb_toggle_content li {font-size:17px!important;line-height:1.7!important;}
}
