/* --------------------------------------------------
   GLOBAL
-------------------------------------------------- */
body {
    background: #000;
    color: #fff;
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: 420px;
}

body::before {
    content: "";
    position: fixed;
    top: 200px;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 1000px;
    background: url("../images/logo.png") no-repeat center center;
    background-size: contain;
    opacity: 0.12;
    z-index: -1;
    pointer-events: none;
}

main {
    padding: 20px;
}

.index-galleries-title {
    text-align: center;
    font-size: 2.2rem;
    margin: 20px 0;
    letter-spacing: 1px;
}

/* --------------------------------------------------
   HEADER
-------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999;
    background: #000;
    padding-bottom: 10px;
    transition: padding 0.3s, background 0.3s;
}

.site-header.shrink {
    padding: 5px 20px;
    background: rgba(0,0,0,0.85);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-left {
    flex-shrink: 0;
}

.logo {
    width: 300px;
    height: auto;
}

.header-carousel {
    flex-grow: 1;
    overflow: hidden;
}

/* --------------------------------------------------
   NAVIGATION
-------------------------------------------------- */
.main-nav {
    background: rgba(0,0,0,0.6);
    padding: 10px 20px;
    backdrop-filter: blur(4px);
}

.main-nav a {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    text-decoration: none;
    margin-right: 25px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.3s, color 0.3s;
}

.main-nav a:hover {
    background: rgba(255,255,255,0.15);
}

/* --------------------------------------------------
   CAROUSEL
-------------------------------------------------- */
.carousel {
    display: flex;
    overflow: hidden;
    width: 100%;
    gap: 10px;
    position: relative;
}

.carousel-track {
    display: flex;
    gap: 10px;
    animation: scrollCarousel 300s linear infinite;
    will-change: transform;
}

@keyframes scrollCarousel {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.carousel-item {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.carousel img {
    height: 350px;
    flex-shrink: 0;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s;
}

.header-carousel .carousel img {
    height: 300px;
}

.carousel img:hover {
    transform: scale(1.1);
}

/* Overlay hidden by default */
.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.65);
    color: #fff;
    padding: 6px 10px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Overlay appears ONLY on hovered image */
.carousel-item:hover .carousel-overlay {
    opacity: 1;
}

/* --------------------------------------------------
   GALLERY GRID
-------------------------------------------------- */
.gallery-title {
    text-align: center;
    font-size: 2.5rem;
    margin-top: 40px;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: auto;
    transition: transform 0.3s;
    cursor: pointer;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-info {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 11px;
    padding: 4px 6px;
    line-height: 1.3;
    box-sizing: border-box;
}

/* --------------------------------------------------
   LIGHTBOX
-------------------------------------------------- */
#lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

#lightbox-content {
    position: relative;
    text-align: center;
}

#lightbox-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 28px;
    padding: 6px 12px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    transition: background 0.3s;
}

#lightbox-close:hover {
    background: rgba(255,255,255,0.3);
}

#lightbox-caption {
    margin-top: 15px;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
}

#lightbox-filename {
    font-weight: bold;
    margin-bottom: 4px;
}

#lightbox-keywords {
    opacity: 0.8;
}

#lightbox-image-wrapper {
    position: relative;
    display: inline-block;
    width: fit-content;
}

#lightbox-image-wrapper::after {
    content: "© SeacologyNZ";
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 22px;
    color: rgba(255,255,255,0.4);
    pointer-events: none;
}

#lightbox-image {
    max-width: 50%;
    max-height: 50%;
}

/* --------------------------------------------------
   GALLERY CARDS
-------------------------------------------------- */
.gallery-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 40px auto;
    max-width: 1600px;
}

.gallery-card {
    display: block;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
    transition: transform 0.3s, box-shadow 0.3s;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
}

.gallery-card:nth-child(odd) { animation-delay: 0.1s; }
.gallery-card:nth-child(even) { animation-delay: 0.2s; }

.gallery-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.gallery-card-title {
    padding: 10px;
    font-size: 1.1rem;
    text-align: center;
    background: rgba(0,0,0,0.7);
}

.gallery-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------------------------------
   INSTAGRAM (FIXED + CENTERED)
-------------------------------------------------- */
.instagram-embed-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.instagram-embed-wrapper iframe {
    width: 100%;
    max-width: 900px;
    min-width: 320px;
    height: auto;
}

/* --------------------------------------------------
   TRIPS PAGE
-------------------------------------------------- */
.trips-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin: 20px auto 40px auto;
    max-width: 700px;
    justify-content: center;
    justify-items: center;
}

.trips-image-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 6px;
}

.trips-caption {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #ddd;
    text-align: center;
}

/* --------------------------------------------------
   BIO PAGE
-------------------------------------------------- */
.bio-box {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px 40px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 25px rgba(0,0,0,0.6);
}

.bio-box h2 {
    margin-top: 0;
    font-size: 2rem;
    text-align: center;
}

.bio-box p {
    font-size: 1.15rem;
    line-height: 1.7;
    text-align: center;
    color: #ddd;
}

.bio-image {
    width: 100%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 50px 40px;
    border-radius: 14px;
    background:
        linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)),
        url("../images/bio-bg.jpg") center/cover no-repeat;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 30px rgba(0,0,0,0.6);
    text-align: center;
}

.bio-image h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.bio-image p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #e6e6e6;
    max-width: 750px;
    margin: 0 auto;
}

/* --------------------------------------------------
   SOCIAL LINKS
-------------------------------------------------- */
.bio-social {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.bio-social a {
    color: #4da6ff;
    font-size: 1.2rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s;
}

.bio-social a:hover {
    color: #82c7ff;
}

.social-icon {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* --------------------------------------------------
   SEARCH BAR
-------------------------------------------------- */
.search-bar {
    text-align: center;
    margin: 40px 0;
}

.search-bar input[type="text"] {
    width: 60%;
    padding: 14px 20px;
    font-size: 1.1rem;
    border-radius: 50px;
    border: none;
    outline: none;
    background: rgba(255,255,255,0.1);
    color: #fff;
    backdrop-filter: blur(4px);
    transition: background 0.3s;
}

.search-bar input[type="text"]:focus {
    background: rgba(255,255,255,0.2);
}

.search-bar button {
    padding: 14px 28px;
    font-size: 1.1rem;
    border-radius: 50px;
    border: none;
    margin-left: 10px;
    background: #4da6ff;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: #1e90ff;
}

/* --------------------------------------------------
   FOOTER
-------------------------------------------------- */
.site-footer {
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    color: #ccc;
}

.footer-social {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-social a {
    color: #4da6ff;
    text-decoration: none;
    font-size: 1.1rem;
}

.footer-social a:hover {
    color: #82c7ff;
}

/* --------------------------------------------------
   WOLFIE SECTION
-------------------------------------------------- */
.wolfie-title {
    text-align: center;
    margin-top: 40px;
    font-size: 2rem;
}

.wolfie-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    max-width: 1400px;
    margin: 20px auto 40px auto;
}

.wolfie-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
}

.wolfie-textbox {
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.wolfie-age {
    margin-top: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    animation: wolfiePulse 2s ease-in-out infinite;
}

.paw-print {
    display: inline-block;
    margin-left: 10px;
    font-size: 1.4rem;
    animation: wolfiePulse 2s ease-in-out infinite;
}

@keyframes wolfiePulse {
    0%   { opacity: 1; transform: scale(1); }
    50%  { opacity: 0.6; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* --------------------------------------------------
   HOME SECTION
-------------------------------------------------- */
.myhome-title {
    text-align: center;
    margin-top: 40px;
    font-size: 2.2rem;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    max-width: 1400px;
    margin: 20px auto 40px auto;
}

.home-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 6px;
}

.home-textbox {
    max-width: 1400px;
    margin: 20px auto 50px auto;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* --------------------------------------------------
   AWARDS GRID
-------------------------------------------------- */
.awards-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px 40px;
    max-width: 1400px;
    margin: 40px auto;
    align-items: start;
}

.award-image img {
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.award-text {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.award-text a {
    color: #4da6ff;
    text-decoration: none;
    font-weight: bold;
}

.award-text a:hover {
    color: #82c7ff;
}

/* --------------------------------------------------
   AWARDS ANIMATION
-------------------------------------------------- */
@keyframes awardFadeUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.award-image,
.award-text {
    opacity: 0;
    animation: awardFadeUp 0.8s ease forwards;
}
/* --------------------------------------------------
   STORIES — SINGLE ROW (NO WRAP)
-------------------------------------------------- */
.stories-grid {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 25px;
    margin: 40px auto;
    padding: 0 20px;
    flex-wrap: nowrap; /* keep all thumbnails on one line */
}

.stories-grid a {
    display: block;
    text-decoration: none;
    color: white;
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    width: 220px;          /* consistent width */
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
    transition: transform 0.3s, box-shadow 0.3s;
    flex-shrink: 0;        /* prevents shrinking */
}

.stories-grid a:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.stories-grid img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.story-title {
    padding: 12px;
    text-align: center;
    font-size: 1.1rem;
    background: rgba(0,0,0,0.7);
}

/* --------------------------------------------------
   STORY PAGES — CENTER TITLES & SUBTITLES
-------------------------------------------------- */

.story-page-title {
    text-align: center;
    margin-top: 40px;
    font-size: 2.2rem;
}

.story-page-subtitle {
    text-align: center;
    margin-top: 10px;
    font-size: 1.2rem;
    color: #ccc;
}
/* Fix: Left-align the trip log section */
.story-page.trip-log p {
    text-align: left !important;
}

/* --------------------------------------------------
   STORY PAGES — CENTER H1 + FIRST PARAGRAPH
-------------------------------------------------- */

.story-page h1 {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 10px;
    font-size: 2.2rem;
}

.story-page > p:first-of-type {
    text-align: center;
    margin: 10px auto 30px;
    font-size: 1.2rem;
    color: #ccc;
    max-width: 800px;
}


/* --------------------------------------------------
   SEO HIDDEN BLOCK
-------------------------------------------------- */
.seo-hidden {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    font-size: 1px !important;
    line-height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: transparent !important;
    pointer-events: none !important;
}
/* --------------------------------------------------
   INSTAGRAM — FIXED, CENTERED, FULL WIDTH
-------------------------------------------------- */
.instagram-feed {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.instagram-feed iframe {
    width: 100%;
    max-width: 900px;
    min-width: 320px;
    height: auto;
}
/* --------------------------------------------------
   FIX: CENTER HOME PAGE TITLES
-------------------------------------------------- */

.stories-title {
    text-align: center;
}

.social-title {
    text-align: center;
}

/* --------------------------------------------------
   SEARCH RESULTS PAGE — CONSISTENT HOME BUTTON
-------------------------------------------------- */

.search-results-page .back-home-link {
    display: inline-block;
    margin-bottom: 20px;
    padding: 10px 18px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.search-results-page .back-home-link:hover {
    background: rgba(255,255,255,0.2);
}
/* --------------------------------------------------
   INATURALIST WIDGET — CENTER ALIGNMENT
-------------------------------------------------- */

.inat-widget {
    margin: 0 auto;          /* centers the whole block */
    text-align: center;      /* centers inline content */
    max-width: 900px;        /* optional but keeps it tidy */
}

.inat-widget table {
    margin: 0 auto;          /* centers the footer table */
}
/* --------------------------------------------------
   MY PORTFOLIO PAGE
-------------------------------------------------- */

.portfolio-grid {
    max-width: 1400px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.portfolio-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.portfolio-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.portfolio-image img:hover {
    transform: scale(1.03);
}

.portfolio-text {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 10px;
    line-height: 1.6;
    font-size: 1.1rem;
}
/* --------------------------------------------------
   MY PORTFOLIO PAGE — FIXED 2‑COLUMN LAYOUT
-------------------------------------------------- */

.portfolio-grid {
    max-width: 1400px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.portfolio-row {
    display: grid;
    grid-template-columns: 1fr 1fr;   /* two equal columns */
    gap: 30px;
    align-items: start;
}

.portfolio-image img {
    width: 100%;                     /* fill the left column */
    max-width: 50vw;                 /* never exceed 50% of screen width */
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.portfolio-image img:hover {
    transform: scale(1.03);
}

.portfolio-text {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 10px;
    line-height: 1.6;
    font-size: 1.1rem;
}

/* --------------------------------------------------
   MY PORTFOLIO PAGE — FIXED 2‑COLUMN LAYOUT
-------------------------------------------------- */

.portfolio-grid {
    max-width: 1400px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.portfolio-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.portfolio-image img {
    width: 100%;
    max-width: 50vw;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}


.portfolio-image img:hover {
    transform: scale(1.03);
}

.portfolio-text {
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 10px;
    line-height: 1.6;
    font-size: 1.1rem;
}

.stories-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch; /* smooth scrolling on iPhone */
}

.stories-grid::-webkit-scrollbar {
    display: none; /* hide scrollbar on mobile */
}

.stories-grid a {
    flex: 0 0 auto; /* prevents shrinking */
}


