/* ===========================================================
   Terenc Pepa Photography — main stylesheet
   Dark / gold editorial theme. Built on top of Bootstrap 5.
   =========================================================== */

:root {
  --tp-dark: #0d0d0d;
  --tp-dark-2: #171712;
  --tp-gold: #c9a15a;
  --tp-gold-dim: #8a6f3f;
  --tp-cream: #f4f1ea;
  --tp-text-muted: #a7a396;
  --tp-serif: 'Playfair Display', Georgia, serif;
  --tp-sans: 'Jost', Arial, sans-serif;
  --tp-script: 'Dancing Script', cursive;
}

body {
  font-family: var(--tp-sans);
  color: #1c1c1c;
  background: #fff;
}

h1, h2, h3, h4, .font-serif { font-family: var(--tp-serif); }
.font-script { font-family: var(--tp-script); }
.text-gold { color: var(--tp-gold) !important; }
.bg-dark-tp { background-color: var(--tp-dark) !important; }
.bg-dark-2 { background-color: var(--tp-dark-2) !important; }
.letter-spaced { letter-spacing: .12em; }

a { color: var(--tp-gold); text-decoration: none; }
a:hover { color: var(--tp-gold-dim); }

.btn-gold {
  background: transparent;
  border: 1px solid var(--tp-gold);
  color: var(--tp-cream);
  padding: .75rem 1.75rem;
  letter-spacing: .1em;
  font-size: .85rem;
  text-transform: uppercase;
  transition: all .25s ease;
}
.btn-gold:hover {
  background: var(--tp-gold);
  color: var(--tp-dark);
}

.section-eyebrow {
  color: var(--tp-gold);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.section-eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--tp-gold);
  display: inline-block;
}

/* ---------- Navbar ---------- */
.tp-navbar {
  background: rgba(13,13,13,.92);
  backdrop-filter: blur(6px);
  padding: 1rem 0;
}
.tp-navbar .navbar-brand img { height: 34px; }
.tp-navbar .nav-link {
  color: var(--tp-cream) !important;
  text-transform: uppercase;
  font-size: .82rem;
  letter-spacing: .1em;
  margin: 0 .6rem;
  position: relative;
}
.tp-navbar .nav-link:hover,
.tp-navbar .nav-link.active { color: var(--tp-gold) !important; }
@media (max-width: 991.98px) {
  /* Below lg, the nav collapses into a stacked mobile menu (Bootstrap's
     own navbar-toggler-icon is also fixed in header.php via the
     navbar-dark class — without it, the hamburger's three lines default
     to a dark color meant for a light navbar, nearly invisible here).
     Slightly bigger text + more vertical padding per row for an easier
     touch target than the inline desktop size. */
  .tp-navbar .nav-link { font-size: 1rem; margin: 0; padding: .6rem 0; }
}

/* ---------- Hero ---------- */
.hero-slide {
  height: 92vh;
  min-height: 560px;
  position: relative;
  overflow: hidden;
}
@media (max-width: 767.98px) {
  /* 92vh on a phone leaves a lot of empty dark gradient above/below the
     (vertically centered, short) heading/subheading text. A shorter hero
     still reads as a hero but cuts that empty space down. */
  .hero-slide { height: 62vh; min-height: 420px; }
}
/* A real <img> (not a CSS background), so search engines can see and
   index each slide photo, with alt text carried over from the Media
   Library — or, for a video slide, a muted looping <video> with the same
   fill-the-frame treatment. */
.hero-slide-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  z-index: 0;
}
.hero-slide::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(13,13,13,.55) 0%, rgba(13,13,13,.35) 40%, rgba(13,13,13,.85) 100%);
}
.hero-caption { position: relative; z-index: 2; }
.hero-caption h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: #fff;
  line-height: 1.1;
}
.hero-caption p { color: var(--tp-text-muted); font-size: 1.05rem; }
.carousel-indicators [data-bs-target] { background-color: var(--tp-gold); }
.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: var(--tp-cream); font-size: .8rem; letter-spacing: .15em;
  text-transform: uppercase;
}

/* ---------- Partners / clients ---------- */
/* Black text on white — reads as a clearly separate strip against the
   hero photo above it rather than blending into it. More than one page
   of partners auto-fades between pages (see sections/partners.php for
   why this is a hand-built animation rather than Bootstrap's own
   carousel-fade: it's what stops two pages' cards showing at once
   mid-transition). */
.partners-strip { padding: 2.5rem 0; border-top: 1px solid #ececec; border-bottom: 1px solid #ececec; }

/* All pages stacked in the same grid cell — the strip's height then
   naturally matches whichever page is tallest, instead of jumping
   around as pages of different lengths fade in and out. */
.partners-fade { display: grid; }
.partners-fade-page {
  grid-area: 1 / 1;
  animation-name: partnersFade;
  animation-duration: var(--partners-total, 12s);
  animation-iteration-count: infinite;
  animation-timing-function: ease;
}
@media (prefers-reduced-motion: reduce) {
  .partners-fade-page { animation: none; opacity: 0; }
  .partners-fade-page:first-child { opacity: 1; }
}
.partners-page { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; gap: 1.25rem; padding: 1.1rem 1rem; }

.partners-fade-dots { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: 1.75rem; }
.partners-fade-dot {
  width: 7px; height: 7px; border-radius: 50%; background-color: #d9d5c8;
  animation-name: partnersFadeDot;
  animation-duration: var(--partners-total, 12s);
  animation-iteration-count: infinite;
  animation-timing-function: steps(1);
}
@media (prefers-reduced-motion: reduce) {
  .partners-fade-dot { animation: none; }
  .partners-fade-dot:first-child { background-color: var(--tp-gold); }
}

.partner-card {
  /* !important: the site-wide "a { color: <accent> !important }" rule
     (includes/header.php) would otherwise force every linked partner
     card to the gold accent color instead of black — this is a
     deliberate, targeted override of that rule, not a shortcut. */
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: .5rem; width: 190px; flex-shrink: 0; padding: 1.5rem 1.1rem;
  background: #fff; color: #14140f !important; text-decoration: none;
  border: 1px solid #ececde; border-radius: 12px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
a.partner-card:hover, a.partner-card:focus {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(20,20,15,.09);
  border-color: var(--tp-gold);
  color: #14140f !important;
}
.partner-badge {
  width: 56px; height: 56px; border-radius: 14px; margin-bottom: .25rem;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--tp-cream); border: 1px solid #e5e1d6;
}
.partner-badge img { max-width: 78%; max-height: 78%; object-fit: contain; filter: grayscale(1); opacity: .85; transition: opacity .2s ease, filter .2s ease; }
a.partner-card:hover .partner-badge img, a.partner-card:focus .partner-badge img { filter: none; opacity: 1; }
.partner-badge-text { font-family: var(--tp-serif); font-size: 1.3rem; font-weight: 600; color: var(--tp-gold-dim); }
/* Name on top, location underneath — its own line, not inline. */
.partner-name { display: block; font-family: var(--tp-serif); font-weight: 700; font-size: 1rem; line-height: 1.25; }
.partner-location { display: block; font-size: .7rem; color: #6b6b62; letter-spacing: .05em; text-transform: uppercase; margin-top: .15rem; }

/* Smaller cards + tighter gaps below ~576px so two comfortably fit per
   row on a phone instead of one big card per row with wasted space on
   either side. */
@media (max-width: 576px) {
  .partners-strip { padding: 1.75rem 0; }
  /* Grid instead of wrapping flex here — guarantees exactly 2 cards per
     row on every phone width (including a 320px-wide iPhone SE) instead
     of dropping to 1 per row and making the strip unnecessarily tall. */
  .partners-page { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; padding: .85rem .75rem; }
  .partner-card { width: auto; padding: 1rem .6rem; gap: .3rem; }
  .partner-badge { width: 42px; height: 42px; border-radius: 10px; }
  .partner-badge-text { font-size: 1.05rem; }
  .partner-name { font-size: .82rem; }
  .partner-location { font-size: .58rem; }
}

/* ---------- About intro ---------- */
.about-photo-frame {
  border: 1px solid #e5e1d6; padding: 10px;
}
.stat-block { border-left: 1px solid #e5e1d6; padding-left: 1.25rem; }
.stat-number { font-family: var(--tp-serif); font-size: 2rem; color: var(--tp-dark); }
.stat-label { color: #8a8578; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }

/* Credential pills (Photographer / IT Engineer / EASA Certified Drone
   Pilot / Travel Promoter) — the merged About section's replacement for
   the old dark "badge strip" that used to live in its own section below. */
.credential-badges { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.5rem; }
.credential-badges .cred-pill {
  display: inline-flex; align-items: center;
  border: 1px solid #e5e1d6; border-radius: 999px; padding: .4rem .95rem;
  font-size: .8rem; color: #333; background: var(--tp-cream);
}

/* ---------- What I do ---------- */
.wid-card {
  background: var(--tp-dark-2);
  border: 1px solid #2a2a22;
  padding: 1.35rem 1.25rem;
  height: 100%;
  transition: border-color .2s ease, transform .2s ease;
}
.wid-card:hover { border-color: var(--tp-gold); transform: translateY(-4px); }
.wid-card h5 { color: #fff; margin-top: 0; font-size: 1rem; }
.wid-card p { color: var(--tp-text-muted); font-size: .88rem; margin-bottom: 0; }

/* ---------- Portfolio ---------- */
.portfolio-tile {
  position: relative; overflow: hidden; display: block; aspect-ratio: 4/3;
}
.portfolio-tile img {
  width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease;
}
/* Basic image protection: makes portfolio photos a little more annoying to
   drag-save. This is a deterrent, not real DRM — anyone who wants the file
   badly enough can still get it via devtools — see the contextmenu-blocking
   script in footer.php for the other half of this. */
.portfolio-tile img,
.modal-content .img-fluid {
  -webkit-user-drag: none; user-drag: none; user-select: none; -webkit-touch-callout: none;
}
.portfolio-tile:hover img { transform: scale(1.08); }
.portfolio-tile .tile-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(13,13,13,.85) 0%, rgba(13,13,13,0) 55%);
  display: flex; align-items: flex-end; padding: 1rem 1.1rem;
  opacity: 0; transition: opacity .3s ease;
}
.portfolio-tile:hover .tile-overlay { opacity: 1; }
.tile-overlay h6 { color: #fff; margin: 0; }
.tile-overlay small { color: var(--tp-gold); text-transform: uppercase; letter-spacing: .08em; }

/* Reels (video / reel-link) tiles use a tall 9:16 frame instead of 4:3. */
.portfolio-tile.reel-tile { aspect-ratio: 9/16; }
.reel-play-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(13,13,13,.55); border: 1px solid rgba(244,241,234,.6);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.4rem; pointer-events: none;
  transition: background .25s ease;
}
.portfolio-tile:hover .reel-play-badge { background: var(--tp-gold); color: var(--tp-dark); }
.media-type-chip {
  position: absolute; top: .6rem; right: .6rem; z-index: 2;
  background: rgba(13,13,13,.65); color: #fff; border-radius: 999px;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: .9rem;
}

/* Video reel player, used inside the portfolio lightbox modal */
.reel-player-frame {
  aspect-ratio: 9/16; max-width: 380px; margin: 0 auto; background: #000;
}
.reel-player-frame video { width: 100%; height: 100%; object-fit: contain; }

.filter-pills .btn {
  border: 1px solid #ddd8ca; color: #333; text-transform: uppercase; font-size: .78rem;
  letter-spacing: .08em; padding: .4rem 1rem; margin: 0 .25rem .5rem 0;
}
.filter-pills .btn.active, .filter-pills .btn:hover {
  background: var(--tp-dark); color: var(--tp-gold); border-color: var(--tp-dark);
}

/* ---------- About detail (dark) ---------- */
.about-detail { position: relative; overflow: hidden; }
.about-detail-img { min-height: 420px; background-size: cover; background-position: center; }
.badge-strip { border-top: 1px solid #2a2a22; }
.badge-strip .row { align-items: stretch; }
.badge-strip [class*="col-"] { display: flex; }
.badge-strip .badge-item {
  height: 100%; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1.1rem .75rem; text-align: center; color: var(--tp-cream);
  border-right: 1px solid #2a2a22; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em;
}
.badge-strip .badge-item:last-child { border-right: none; }
.badge-strip i { display: block; font-size: 1.4rem; color: var(--tp-gold); margin-bottom: .4rem; }

/* ---------- Services ---------- */
.service-card { border: 1px solid #eee; height: 100%; }
.service-card img { height: 220px; width: 100%; object-fit: cover; }
.service-card .body { padding: 1.25rem; }
.service-card h5 { margin-bottom: .35rem; }
.service-card p { color: #6d6a60; font-size: .92rem; }

/* ---------- Awards ---------- */
.award-row { border-bottom: 1px solid #2a2a22; padding: 1.25rem 0; color: var(--tp-cream); }
.award-row i { color: var(--tp-gold); font-size: 1.4rem; }

/* ---------- Contact ---------- */
.contact-cta {
  background-size: cover; background-position: center; position: relative;
}
.contact-cta::before { content:""; position:absolute; inset:0; background: rgba(13,13,13,.82); }
.contact-cta .content { position: relative; z-index: 1; }
.form-control-tp {
  background: transparent; border: 1px solid #3a3a30; color: #fff; padding: .85rem 1rem;
}
.form-control-tp:focus { border-color: var(--tp-gold); box-shadow: none; background: transparent; color: #fff; }
.form-control-tp::placeholder { color: #8a8578; }

/* ---------- Footer ---------- */
footer.tp-footer { background: var(--tp-dark); color: var(--tp-text-muted); }
footer.tp-footer a { color: var(--tp-text-muted); }
footer.tp-footer a:hover { color: var(--tp-gold); }
.social-circle {
  width: 38px; height: 38px; border: 1px solid #3a3a30; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; color: var(--tp-cream);
  margin-right: .5rem;
}
.social-circle:hover { border-color: var(--tp-gold); color: var(--tp-gold); }

/* Drone certification trust badges (footer) — replaces raw "EASA User ID:
   ..." style text with a clean pill: icon, the credential name, and the
   actual ID underneath in smaller muted text. Hidden entirely (see
   footer.php) until both/either ID is filled in from Admin → Site Settings. */
.trust-badges { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.trust-badge {
  display: inline-flex; align-items: center; gap: .55rem;
  border: 1px solid #2a2a22; border-radius: 8px; padding: .55rem .9rem;
  background: var(--tp-dark-2);
}
.trust-badge i { color: var(--tp-gold); font-size: 1.1rem; }
.trust-badge strong { display: block; font-size: .78rem; color: #fff; font-weight: 600; line-height: 1.3; }
.trust-badge small { display: block; font-size: .7rem; color: var(--tp-text-muted); letter-spacing: .03em; }

/* ---------- Generic page header (inner pages) ---------- */
.page-header {
  background: var(--tp-dark); padding: 7rem 0 3.5rem; color: #fff;
}
.page-header h1 { color: #fff; }
.breadcrumb-tp a { color: var(--tp-text-muted); }
.breadcrumb-tp .active { color: var(--tp-gold); }

/* ---------- Blog ---------- */
.blog-card img { height: 220px; object-fit: cover; width: 100%; }
.blog-card .meta { color: #8a8578; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }

/* Images/embeds inside article body copy (including imported articles) —
   keep them from overflowing on mobile regardless of their original
   width/height attributes. */
.blog-content img,
.blog-content video,
.blog-content iframe { max-width: 100%; height: auto; }
.blog-content figure.wp-caption { margin: 1.5rem auto; text-align: center; max-width: 100%; }
.blog-content figure.wp-caption img { display: block; margin: 0 auto; }
.blog-content figure.wp-caption figcaption {
  font-size: .82rem; color: #8a8578; margin-top: .5rem; font-style: italic;
}

/* ---------- Blog post video embeds (YouTube/Vimeo/Instagram/TikTok/Facebook) ---------- */
/* Real shape for embedded players — set from admin/blog-form.php's "Video
   Shape" field (auto-detected for YouTube/Vimeo, manual for the rest), so
   a vertical Reel/Short isn't forced into a horizontal 16:9 box. */
.video-embed { position: relative; overflow: hidden; }
.video-embed.video-ratio-16x9 { aspect-ratio: 16 / 9; }
.video-embed.video-ratio-9x16 { aspect-ratio: 9 / 16; max-width: 400px; margin-left: auto; margin-right: auto; }
.video-embed.video-ratio-1x1 { aspect-ratio: 1 / 1; max-width: 500px; margin-left: auto; margin-right: auto; }
.video-embed iframe { width: 100%; height: 100%; border: 0; position: absolute; top: 0; left: 0; }
.video-embed.instagram-media,
blockquote.instagram-media.video-embed,
blockquote.tiktok-embed.video-embed { width: 100%; }
.video-embed-fallback { text-align: center; padding: 2rem; background: #f4f5f7; border-radius: .5rem; }
.video-embed-fallback a { text-decoration: none; font-weight: 600; }

/* Uploaded videos always use their own real dimensions — no forced ratio,
   so a vertical upload displays vertically and a horizontal one displays
   horizontally, exactly as recorded. */
.video-embed-native { text-align: center; }
.video-embed-native video { max-width: 100%; max-height: 80vh; width: auto; height: auto; border-radius: .25rem; background: #000; }

/* ---------- Misc ---------- */
.section-py { padding: 5.5rem 0; }
@media (max-width: 767px) {
  .section-py { padding: 3.5rem 0; }
  .badge-strip .badge-item { border-right: none; border-bottom: 1px solid #2a2a22; }
}

/* ---------- Instagram feed section (widget-service embed) ---------- */
.instagram-feed-embed { max-width: 100%; overflow-x: auto; }
.instagram-feed-embed img { max-width: 100%; height: auto; }

/* Placeholder banner shown in admin when demo/placeholder content is still active */
.placeholder-flag {
  display: inline-block; background: #fff3cd; color: #664d03; border: 1px solid #ffe69c;
  padding: .2rem .5rem; font-size: .7rem; border-radius: 4px; margin-left: .4rem; text-transform: none; letter-spacing: 0;
}
