/*
Theme Name: Ronnie Affee Photography
Theme URI: https://www.ronnieaffee.com/
Author: Yuppify
Author URI: https://www.yuppify.com/
Description: Custom photo-first theme for Ronnie Affee's travel photography portfolio. Large full-width scrolling images on the homepage, continent to country navigation, modern gallery grids with lightbox.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ronnieaffee
*/

/* =Reset
----------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: #101010; color: #f2f2f2; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: #f2f2f2; text-decoration: none; }
a:hover, a:focus { color: #ffffff; text-decoration: underline; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }

/* =Layout
----------------------------------------------- */
.ra-wrap { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.ra-main { min-height: 60vh; }

/* =Header
----------------------------------------------- */
.ra-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(10, 10, 10, 0.82); backdrop-filter: blur(6px); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.ra-header-inner { max-width: 1600px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.ra-brand { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }
.ra-brand:hover { text-decoration: none; }
.ra-menu-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,0.35); color: #fff; padding: 8px 14px; border-radius: 4px; font-size: 0.9rem; letter-spacing: 0.08em; }

/* =Primary nav (continent > country)
----------------------------------------------- */
.ra-nav ul { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ra-nav li { position: relative; }
.ra-nav > ul > li > a, .ra-nav > ul > li > button.ra-nav-parent { display: block; padding: 10px 14px; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: #e8e8e8; background: none; border: 0; }
.ra-nav > ul > li > a:hover, .ra-nav > ul > li > button.ra-nav-parent:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,0.07); border-radius: 4px; }
.ra-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: #161616; border: 1px solid rgba(255,255,255,0.1); border-radius: 0 0 6px 6px; padding: 8px; z-index: 200; flex-direction: column; }
.ra-nav li:hover > .sub-menu, .ra-nav li:focus-within > .sub-menu, .ra-nav li.sub-open > .sub-menu { display: flex; }
.ra-nav .sub-menu a { display: block; padding: 8px 12px; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: none; border-radius: 4px; }
.ra-nav .sub-menu a:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.ra-nav .submenu-toggle { display: none; }

/* =Homepage scrolling image sections
----------------------------------------------- */
.ra-hero-scroll { margin-top: 64px; }
.ra-hero { position: relative; min-height: 92vh; display: flex; align-items: flex-end; overflow: hidden; background: #000; }
.ra-hero img.ra-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ra-hero-caption { position: relative; z-index: 2; width: 100%; padding: 48px 24px 40px; background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0)); }
.ra-hero-caption-inner { max-width: 1400px; margin: 0 auto; }
.ra-hero-kicker { font-size: 0.78rem; letter-spacing: 0.28em; text-transform: uppercase; color: rgba(255,255,255,0.75); margin-bottom: 8px; }
.ra-hero-title { font-size: clamp(1.8rem, 4.5vw, 3.2rem); font-weight: 700; letter-spacing: 0.02em; line-height: 1.1; }
.ra-hero-title a:hover { text-decoration: none; }
.ra-hero-link { display: inline-block; margin-top: 14px; font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase; background: #c0392b; border: 1px solid #c0392b; color: #fff; padding: 12px 28px; border-radius: 999px; }
.ra-hero-link:hover { background: #e74c3c; border-color: #e74c3c; color: #fff; text-decoration: none; }
.ra-hero-count { font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.7); margin-top: 6px; }
.ra-hero-empty { padding: 120px 24px 80px; text-align: center; color: #bbb; }

/* =Section headings
----------------------------------------------- */
.ra-section-head { max-width: 1400px; margin: 0 auto; padding: 56px 24px 8px; }
.ra-section-head h2 { font-size: 1.4rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; }
.ra-section-head p { color: #aaa; font-size: 0.95rem; margin-top: 6px; }

/* =Gallery grid (single posts)
----------------------------------------------- */
.ra-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; max-width: 1600px; margin: 0 auto; padding: 32px 24px 64px; }
.ra-gallery a { display: block; overflow: hidden; border-radius: 6px; background: #1a1a1a; }
.ra-gallery img { width: 100%; height: 260px; object-fit: cover; transition: transform 0.35s ease; }
.ra-gallery a:hover img, .ra-gallery a:focus img { transform: scale(1.04); }
.ra-gallery a:hover { text-decoration: none; }

/* =Post header (gallery pages)
----------------------------------------------- */
.ra-post-head { max-width: 1400px; margin: 0 auto; padding: 120px 24px 8px; }
.ra-post-head .ra-kicker { font-size: 0.78rem; letter-spacing: 0.28em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 10px; }
.ra-post-head h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; line-height: 1.15; }
.ra-post-meta { color: #999; font-size: 0.9rem; margin-top: 10px; }
.ra-video { max-width: 960px; margin: 32px auto; padding: 0 24px; }
.ra-video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #000; }
.ra-story { max-width: 860px; margin: 0 auto; padding: 8px 24px 16px; color: #d8d8d8; }
.ra-story p { margin-bottom: 1em; }

/* =Archive cards (country / continent indexes)
----------------------------------------------- */
.ra-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; max-width: 1400px; margin: 0 auto; padding: 32px 24px 64px; }
.ra-card { background: #181818; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,0.06); }
.ra-card a.ra-card-link { display: block; }
.ra-card a.ra-card-link:hover { text-decoration: none; }
.ra-card img { width: 100%; height: 220px; object-fit: cover; }
.ra-card-body { padding: 16px 18px 20px; }
.ra-card-body h3 { font-size: 1.05rem; font-weight: 600; }
.ra-card-count { color: #999; font-size: 0.85rem; margin-top: 4px; }
.ra-child-links { max-width: 1400px; margin: 0 auto; padding: 24px 24px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ra-child-links a { border: 1px solid rgba(255,255,255,0.25); border-radius: 999px; padding: 8px 18px; font-size: 0.85rem; letter-spacing: 0.06em; }
.ra-child-links a:hover { background: #fff; color: #111; text-decoration: none; }

/* =Destinations page
----------------------------------------------- */
.ra-dest { max-width: 1100px; margin: 0 auto; padding: 120px 24px 80px; }
.ra-dest h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 8px; }
.ra-dest-intro { color: #aaa; margin-bottom: 40px; }
.ra-dest-continent { margin-bottom: 36px; }
.ra-dest-continent h2 { font-size: 1.15rem; letter-spacing: 0.2em; text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,0.14); padding-bottom: 10px; margin-bottom: 16px; }
.ra-dest-countries { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 24px; }
.ra-dest-countries a { display: flex; justify-content: space-between; padding: 8px 4px; border-bottom: 1px dotted rgba(255,255,255,0.12); font-size: 0.95rem; }
.ra-dest-countries a:hover { text-decoration: none; color: #fff; border-bottom-color: #fff; }
.ra-dest-countries .count { color: #888; font-size: 0.82rem; }

/* =Generic page
----------------------------------------------- */
.ra-page { max-width: 900px; margin: 0 auto; padding: 120px 24px 80px; }
.ra-page h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 20px; }
.ra-page .ra-entry p { margin-bottom: 1em; color: #d8d8d8; }
.ra-page .ra-entry ul, .ra-page .ra-entry ol { margin: 0 0 1em 1.4em; color: #d8d8d8; }
.ra-page .ra-entry a { text-decoration: underline; }

/* =Lightbox
----------------------------------------------- */
.ra-lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.92); display: none; align-items: center; justify-content: center; flex-direction: column; }
.ra-lightbox.open { display: flex; }
.ra-lightbox img { max-width: 92vw; max-height: 82vh; object-fit: contain; border-radius: 4px; }
.ra-lightbox-caption { color: #ddd; margin-top: 14px; font-size: 0.9rem; text-align: center; padding: 0 20px; }
.ra-lightbox-count { color: #888; font-size: 0.8rem; margin-top: 4px; letter-spacing: 0.1em; }
.ra-lightbox button { position: absolute; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.3rem; line-height: 1; display: flex; align-items: center; justify-content: center; }
.ra-lightbox button:hover { background: rgba(255,255,255,0.25); }
.ra-lb-close { top: 20px; right: 20px; }
.ra-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.ra-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* =Footer
----------------------------------------------- */
.ra-footer { border-top: 1px solid rgba(255,255,255,0.1); padding: 40px 24px; text-align: center; color: #999; font-size: 0.85rem; }
.ra-footer nav { margin-bottom: 16px; }
.ra-footer nav ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.ra-footer nav a { color: #bbb; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* =Pagination
----------------------------------------------- */
.ra-pagination { text-align: center; padding: 0 24px 64px; }
.ra-pagination .page-numbers { display: inline-block; padding: 8px 14px; border: 1px solid rgba(255,255,255,0.2); border-radius: 4px; margin: 0 4px; }
.ra-pagination .page-numbers.current { background: #fff; color: #111; border-color: #fff; }
.ra-pagination a:hover { text-decoration: none; background: rgba(255,255,255,0.12); }

/* =404
----------------------------------------------- */
.ra-404 { text-align: center; padding: 160px 24px 100px; }
.ra-404 h1 { font-size: 3rem; margin-bottom: 12px; }
.ra-404 p { color: #aaa; margin-bottom: 24px; }

/* =Responsive
----------------------------------------------- */
@media (max-width: 900px) {
  .ra-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .ra-menu-toggle { display: inline-block; }
  .ra-nav { display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0; background: rgba(12,12,12,0.98); overflow-y: auto; padding: 12px 20px 40px; }
  body.nav-open .ra-nav { display: block; z-index: 999; }
  .ra-nav ul { flex-direction: column; align-items: stretch; }
  .ra-nav > ul > li > a, .ra-nav > ul > li > button.ra-nav-parent { font-size: 1rem; padding: 12px 4px; width: 100%; text-align: left; }
  .ra-nav li { border-bottom: 1px solid rgba(255,255,255,0.07); }
  .ra-nav .sub-menu { position: static; display: none; border: 0; background: none; padding: 0 0 8px 16px; }
  .ra-nav li.sub-open > .sub-menu { display: flex; }
  .ra-nav li:hover > .sub-menu { display: none; }
  .ra-nav li.sub-open:hover > .sub-menu { display: flex; }
  .ra-nav .submenu-toggle { display: inline-flex; background: none; border: 1px solid rgba(255,255,255,0.25); color: #fff; border-radius: 4px; padding: 4px 12px; font-size: 0.8rem; margin-left: 8px; }
  .ra-nav > ul > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .ra-nav > ul > li > a, .ra-nav > ul > li > button.ra-nav-parent { flex: 1; }
  .ra-hero { min-height: 78vh; }
  .ra-gallery { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; padding: 24px 12px 48px; }
  .ra-gallery img { height: 170px; }
  .ra-lightbox .ra-lb-prev { left: 6px; }
  .ra-lightbox .ra-lb-next { right: 6px; }
}

/* =Reduced motion
----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ra-gallery img { transition: none; }
}
