/* pix.css - shared styles for hub pages, cards, navigation, footer (v3) */

/* ---------- image grid (CSS columns masonry) ---------- */
.pix-grid { column-count: 2; column-gap: 12px; width: 100%; }
@media (min-width: 640px)  { .pix-grid { column-count: 3; column-gap: 16px; } }
@media (min-width: 1024px) { .pix-grid { column-count: 4; column-gap: 20px; } }
.pix-card { break-inside: avoid; margin: 0 0 14px; position: relative; border-radius: 12px; overflow: hidden; background: #f0f0f0; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.pix-card-link { display: block; }
.pix-card img { width: 100%; height: auto; display: block; transition: transform .3s ease; }
.pix-card:hover img { transform: scale(1.03); }
.pix-card-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; font-size: .78rem; line-height: 1.3;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.72) 100%); opacity: 0; transition: opacity .2s; }
.pix-card-cap a { color: #fff; text-decoration: none; }
.pix-card:hover .pix-card-cap, .pix-card:focus-within .pix-card-cap { opacity: 1; }
@media (hover: none) { .pix-card-cap { opacity: 1; } }

/* ---------- breadcrumbs ---------- */
.pix-crumbs { font-size: .85rem; color: #6b7280; margin: 18px 0 14px; }
.pix-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 0; margin: 0; }
.pix-crumbs li + li::before { content: "›"; margin-right: 8px; color: #9ca3af; }
.pix-crumbs a { color: #374151; text-decoration: none; font-weight: 500; }
.pix-crumbs a:hover { color: #d32f2f; }
.pix-crumbs [aria-current="page"] { color: #6b7280; }

/* ---------- hub header ---------- */
.pix-hub-head { max-width: 900px; margin: 0 0 26px; }
.pix-hub-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 14px; color: #111; }
.pix-hub-head p { font-size: 1.05rem; line-height: 1.7; color: #374151; margin: 0 0 12px; }
.pix-count { display: inline-block; font-size: .85rem; color: #6b7280; margin-bottom: 10px; }

.pix-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.pix-pills a, .pix-pill { display: inline-block; padding: 7px 14px; background: #fff; border: 1px solid #e5e7eb; border-radius: 50px; font-size: .88rem; font-weight: 500; color: #374151; text-decoration: none; }
.pix-pills a:hover { background: #111; color: #fff; border-color: #111; }
.pix-pills small { color: #9ca3af; margin-left: 4px; }
.pix-pills a:hover small { color: #d1d5db; }
.pix-h2 { font-size: 1.15rem; margin: 30px 0 12px; color: #111; }

/* ---------- pagination ---------- */
.pix-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 34px 0 10px; }
.pix-pager a, .pix-pager span { min-width: 40px; text-align: center; padding: 9px 14px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; color: #374151; text-decoration: none; font-size: .92rem; }
.pix-pager a:hover { background: #111; color: #fff; }
.pix-pager .is-current { background: #111; color: #fff; border-color: #111; }

/* ---------- FAQ / text blocks ---------- */
.pix-faq { max-width: 860px; margin: 40px 0 10px; }
.pix-faq details { border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; margin-bottom: 10px; padding: 0 16px; }
.pix-faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: #111; }
.pix-faq p { margin: 0 0 14px; color: #374151; line-height: 1.7; }

/* ---------- category cards (home + lists) ---------- */
.pix-cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 768px)  { .pix-cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .pix-cat-grid { grid-template-columns: repeat(4, 1fr); } }
.pix-cat-card { position: relative; display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; background: #e5e7eb; text-decoration: none; }
.pix-cat-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.pix-cat-card:hover img { transform: scale(1.05); }
.pix-cat-card span { position: absolute; inset: auto 0 0 0; padding: 26px 14px 12px; color: #fff; font-weight: 600; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.75)); }
.pix-cat-card small { display: block; font-weight: 400; opacity: .85; font-size: .8rem; }
.pix-topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pix-topic-grid a { display: block; padding: 12px 14px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; color: #111; text-decoration: none; font-weight: 500; }
.pix-topic-grid a:hover { border-color: #d32f2f; color: #d32f2f; }
.pix-topic-grid small { display: block; color: #6b7280; font-weight: 400; margin-top: 2px; }

/* ---------- home ---------- */
.pix-hero { background: linear-gradient(to right, #fdfbfb, #ebedee); padding: 42px 0 30px; text-align: center; }
.pix-hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 800; color: #111; line-height: 1.2; margin: 0 0 12px; }
.pix-hero p { max-width: 720px; margin: 0 auto 24px; color: #4b5563; font-size: 1.05rem; line-height: 1.6; }
.pix-section { padding: 34px 0 6px; }
.pix-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.pix-section-head h2 { font-size: 1.5rem; margin: 0; color: #111; }
.pix-section-head a { font-size: .92rem; color: #d32f2f; text-decoration: none; font-weight: 600; white-space: nowrap; }
.pix-about { max-width: 860px; margin: 30px auto 40px; color: #374151; line-height: 1.75; }
.pix-about h2 { font-size: 1.4rem; color: #111; margin: 0 0 12px; }
.pix-post-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 768px) { .pix-post-grid { grid-template-columns: repeat(3, 1fr); } }
.pix-post-grid a { display: block; padding: 16px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; text-decoration: none; color: #111; }
.pix-post-grid a:hover { border-color: #d32f2f; }
.pix-post-grid strong { display: block; margin-bottom: 6px; }
.pix-post-grid span { color: #6b7280; font-size: .9rem; line-height: 1.5; }

/* ---------- image detail extras ---------- */
.pix-img-head { margin: 4px 0 18px; }
.pix-img-head h1 { font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.25; margin: 0 0 10px; color: #111; }
.pix-img-desc { font-size: 1.02rem; line-height: 1.75; color: #374151; max-width: 900px; margin: 0 0 12px; }
.pix-ai-note { display: inline-block; font-size: .8rem; color: #6b7280; background: #f3f4f6; border-radius: 6px; padding: 5px 9px; margin: 0 0 8px; }
.pix-img-details { max-width: 900px; margin: 26px 0 0; }
.pix-img-details h2 { font-size: 1.15rem; margin: 0 0 8px; color: #111; }
.pix-img-details p, .pix-img-details li { color: #374151; line-height: 1.7; }
.pix-img-details ul { padding-left: 18px; margin: 0 0 14px; }

/* ---------- footer (better contrast on the black footer) ---------- */
.pix-footer-grid { grid-template-columns: 1fr; }
@media (min-width: 640px)  { .pix-footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .pix-footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr 1fr 1fr; } }
.pix-foot-h { font-size: 1rem !important; }
.footer ul a { color: #c7ccd3 !important; }
.footer ul a:hover { color: #ff6b6b !important; }
.footer .text-muted { color: #aeb4bd !important; }
.pix-footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid #333; display: flex; flex-direction: column; gap: 10px; align-items: center; }
@media (min-width: 768px) { .pix-footer-bottom { flex-direction: row; justify-content: space-between; } }

/* ---------- mosaic gallery (mixed big / small / wide / tall tiles) ---------- */
.pix-mosaic { column-count: 2; column-gap: 10px; }                /* fallback before the script runs / without JS */
@media (min-width: 640px)  { .pix-mosaic { column-count: 3; } }
@media (min-width: 1024px) { .pix-mosaic { column-count: 4; } }
.pix-mosaic .pix-tile { break-inside: avoid; margin: 0 0 10px; }

.pix-mosaic.is-grid { display: grid; column-count: auto; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 8px; gap: 10px; grid-auto-flow: dense; }
@media (min-width: 640px)  { .pix-mosaic.is-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .pix-mosaic.is-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1500px) { .pix-mosaic.is-grid { grid-template-columns: repeat(5, 1fr); } }
.pix-mosaic.is-grid .pix-tile { margin: 0; }
.pix-mosaic.is-grid .pix-tile--big { grid-column: span 2; }

.pix-tile { position: relative; border-radius: 12px; overflow: hidden; background: #eee; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.pix-tile-link { display: block; height: 100%; }
.pix-mosaic.is-grid .pix-tile img { width: 100% !important; height: 100% !important; object-fit: cover; object-position: 50% 30%; display: block; transition: transform .35s ease; }
.pix-tile:hover img { transform: scale(1.04); }
.pix-tile .pix-card-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; font-size: .8rem; line-height: 1.3;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.7)); opacity: 0; transition: opacity .2s; }
.pix-tile .pix-card-cap a { color: #fff; text-decoration: none; }
.pix-tile:hover .pix-card-cap, .pix-tile:focus-within .pix-card-cap { opacity: 1; }
@media (hover: none) { .pix-tile .pix-card-cap { opacity: 1; } }

/* ---------- loading polish: never show the long alt text while a photo is still loading ---------- */
.pix-card img, .pix-tile img, .pix-cat-card img { font-size: 0; color: transparent; }


/* ---------- v3.3: photos are clean (no title laid over them); the WHOLE tile is one tap target ---------- */
.pix-card-cap { display: none !important; }
.pix-card, .pix-tile { -webkit-tap-highlight-color: transparent; }
.pix-card-link, .pix-tile-link { position: static; touch-action: manipulation; }
.pix-card-link::after, .pix-tile-link::after { content: ""; position: absolute; inset: 0; z-index: 2; }   /* stretched link: any tap on the tile opens the photo */
@media (hover: hover) { .pix-card:hover img, .pix-tile:hover img { transform: scale(1.03); } }
@media (hover: none)  { .pix-card:hover img, .pix-tile:hover img { transform: none; } }

/* ---------- text block that now sits BELOW the photos ---------- */
.pix-hub-about { max-width: 900px; margin: 44px 0 10px; }
.pix-hub-about h2 { font-size: 1.25rem; margin: 0 0 12px; color: #111; }
.pix-hub-about p { font-size: 1rem; line-height: 1.75; color: #374151; margin: 0 0 12px; }
.pix-guides { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0 0 8px; }
@media (min-width: 768px) { .pix-guides { grid-template-columns: repeat(3, 1fr); } }
.pix-guides a { display: block; padding: 14px 16px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; text-decoration: none; color: #111; }
.pix-guides a:hover { border-color: #d32f2f; }
.pix-guides strong { display: block; margin-bottom: 4px; font-size: .95rem; }
.pix-guides span { color: #6b7280; font-size: .85rem; line-height: 1.5; }

/* sub-category chips: one swipeable row on phones so the photos start higher on the screen */
@media (max-width: 767px) {
  .pix-pills--scroll { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 6px; margin-bottom: 14px; }
  .pix-pills--scroll::-webkit-scrollbar { display: none; }
  .pix-pills--scroll li { flex: 0 0 auto; }
}
