/*
Theme Name: Miami Places to Go
Theme URI: https://www.miamiplacestogo.com/
Author: Gables Tech LLC
Description: Lightweight directory theme for Miami Places to Go. Works with the MPG Directory plugin.
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: mpg-theme
*/

:root {
    --accent: #168e88;
    --accent-dark: #11706b;
    --orange: #e8851a;
    --slate: #363f48;
    --ink: #2b3138;
    --text: #4a525a;
    --muted: #7d868e;
    --line: #e6e9eb;
    --soft: #f5f7f7;
    --radius: 12px;
    --shadow: 0 6px 22px rgba(30, 40, 50, .08);
    --font: 'Quicksand', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--text); font-size: 16px; line-height: 1.6; background: #fff; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
button { font-family: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; background: #fff; padding: 10px 14px; z-index: 1000; }
.mpg-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.mpg-narrow { max-width: 860px; }
.mpg-center { text-align: center; }
.mpg-muted { color: var(--muted); }
.mpg-ic { flex-shrink: 0; vertical-align: middle; }

/* Buttons */
.mpg-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; border: 2px solid var(--accent); padding: 10px 20px; border-radius: 8px; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s, transform .15s; line-height: 1.2; }
.mpg-btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.mpg-btn-ghost { background: transparent; color: var(--accent-dark); }
.mpg-btn-ghost:hover { background: var(--soft); color: var(--accent-dark); }
.mpg-btn-lg { padding: 14px 28px; font-size: 17px; }
.mpg-btn-orange { background: var(--orange); border-color: var(--orange); }
.mpg-btn-orange:hover { background: #c96f10; border-color: #c96f10; }

/* Header */
.mpg-header { background: var(--accent); position: relative; z-index: 50; }
.mpg-header-over { position: absolute; top: 0; left: 0; right: 0; background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,0)); }
.admin-bar .mpg-header-over { top: 32px; }
.mpg-header-in { display: flex; align-items: center; gap: 22px; min-height: 76px; }
.mpg-brand img { max-height: 56px; width: auto; }
.mpg-sitename { color: #fff; font-weight: 700; font-size: 22px; text-decoration: none; white-space: nowrap; }
.mpg-header-search { flex: 1; max-width: 560px; }
.mpg-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.mpg-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.mpg-menu a { color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; }
.mpg-menu a:hover { text-decoration: underline; text-underline-offset: 5px; }
.mpg-menu .sub-menu { display: none; }
.mpg-btn-cta { background: #fff; color: var(--accent-dark); border-color: #fff; padding: 8px 16px; font-size: 14px; }
.mpg-btn-cta:hover { background: var(--orange); border-color: var(--orange); color: #fff; }
.mpg-burger { display: none; margin-left: auto; background: none; border: 0; color: #fff; cursor: pointer; padding: 6px; }

/* Search */
.mpg-search { display: flex; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); overflow: hidden; max-width: 760px; margin: 0 auto; }
.mpg-search label { display: flex; align-items: center; gap: 10px; padding: 0 16px; flex: 1.4; min-width: 0; margin: 0; }
.mpg-search label span { font-weight: 700; color: var(--slate); font-size: 14px; }
.mpg-search .mpg-search-where { flex: 1; border-left: 1px solid var(--line); }
.mpg-search input, .mpg-search select { border: 0; outline: none; font: inherit; font-size: 15px; color: var(--ink); background: transparent; width: 100%; min-width: 0; padding: 16px 0; }
.mpg-search select { cursor: pointer; }
.mpg-search button { display: flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; border: 0; padding: 0 26px; font-weight: 700; font-size: 16px; cursor: pointer; }
.mpg-search button:hover { background: var(--accent-dark); }
.mpg-search-compact { box-shadow: none; border-radius: 8px; }
.mpg-search-compact label { padding: 0 12px; }
.mpg-search-compact input, .mpg-search-compact select { padding: 11px 0; font-size: 14px; }
.mpg-search-compact button { padding: 0 16px; background: var(--slate); }
.mpg-search-compact button span { display: none; }

/* Hero */
.mpg-hero { position: relative; min-height: 640px; display: flex; align-items: center; background: #1d2a33 center/cover no-repeat; color: #fff; text-align: center; padding: 130px 0 70px; }
.mpg-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,20,28,.55), rgba(10,20,28,.45) 60%, rgba(10,20,28,.7)); }
.mpg-hero-in { position: relative; }
.mpg-hero h1 { color: #fff; font-size: clamp(34px, 5vw, 52px); margin-bottom: 8px; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.mpg-hero-sub { font-size: clamp(16px, 2vw, 19px); margin: 0 0 30px; opacity: .95; }
.mpg-hero-hint { margin: 40px 0 18px; font-size: 15px; opacity: .9; }
.mpg-cat-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.mpg-cat-btn { width: 128px; padding: 18px 10px 14px; background: rgba(54,63,72,.92); border-radius: 10px; color: #fff; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; box-shadow: 0 8px 20px rgba(0,0,0,.25); transition: transform .2s, background .2s; }
.mpg-cat-btn:hover { transform: translateY(-4px); background: var(--accent); color: #fff; }

/* Sections */
.mpg-section { padding: 70px 0; }
.mpg-soft { background: var(--soft); }
.mpg-sec-head { text-align: center; margin-bottom: 36px; }
.mpg-sec-head h2 { font-size: clamp(26px, 3.2vw, 34px); margin-bottom: 4px; }
.mpg-sec-head p { margin: 0; color: var(--muted); }

.mpg-areas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.mpg-area { position: relative; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; background: var(--slate) center/cover no-repeat; color: #fff; text-decoration: none; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; box-shadow: var(--shadow); transition: transform .25s; }
.mpg-area::before { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(0,0,0,.72)); }
.mpg-area:hover { transform: translateY(-4px); }
.mpg-area span { position: relative; }
.mpg-area-name { font-weight: 700; font-size: 20px; }
.mpg-area-count { font-size: 14px; opacity: .9; }

.mpg-cat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mpg-cat-tile { position: relative; aspect-ratio: 16/10; border-radius: var(--radius); background: var(--slate) center/cover; overflow: hidden; display: flex; align-items: flex-end; padding: 16px; text-decoration: none; box-shadow: var(--shadow); }
.mpg-cat-tile::before { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 50%, rgba(0,0,0,.55)); transition: background .25s; }
.mpg-cat-tile:hover::before { background: linear-gradient(rgba(22,142,136,.2), rgba(22,142,136,.75)); }
.mpg-cat-tile span { position: relative; background: var(--accent); color: #fff; font-weight: 700; padding: 5px 12px; border-radius: 6px; font-size: 14px; }

/* Cards */
.mpg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mpg-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 2px 8px rgba(30,40,50,.04); transition: box-shadow .25s, transform .25s; }
.mpg-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.mpg-card-img { position: relative; display: block; aspect-ratio: 16/10; background: var(--soft); overflow: hidden; }
.mpg-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.mpg-card:hover .mpg-card-img img { transform: scale(1.04); }
.mpg-flag { position: absolute; top: 12px; left: 12px; background: var(--orange); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.mpg-card-body { padding: 16px 18px 10px; flex: 1; }
.mpg-card-title { font-size: 19px; margin: 0 0 4px; }
.mpg-card-title a { color: var(--ink); text-decoration: none; }
.mpg-card-title a:hover { color: var(--accent-dark); }
.mpg-card-cat { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.mpg-card-tag { margin: 0; font-size: 14px; display: flex; gap: 6px; align-items: flex-start; }
.mpg-card-tag .mpg-ic { margin-top: 3px; color: var(--muted); }
.mpg-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.mpg-card-foot span:first-child { display: flex; align-items: center; gap: 4px; }
.mpg-ph { width: 100%; height: 100%; min-height: 160px; display: flex; align-items: center; justify-content: center; color: #b9c2c8; background: linear-gradient(135deg, #eef2f3, #e2e8ea); }

.mpg-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 700; background: var(--soft); color: var(--slate); text-decoration: none; border: 1px solid var(--line); }
.mpg-pill-cat { background: #e4f3f2; color: var(--accent-dark); border-color: #cbe8e6; }
.mpg-open { background: #e5f6ea; color: #1b7a3c; border-color: #cdebd6; }
.mpg-closed { background: #fdeeee; color: #b42318; border-color: #f6d4d4; }

/* CTA */
.mpg-cta { background: var(--slate); color: #fff; padding: 56px 0; }
.mpg-cta-in { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.mpg-cta h2 { color: #fff; font-size: 30px; }
.mpg-cta p { margin: 0; max-width: 620px; opacity: .9; }
.mpg-cta-act { text-align: center; display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
.mpg-cta-act span { font-size: 14px; opacity: .85; }

.mpg-sponsors { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.mpg-sponsor { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--soft); transition: transform .25s; }
.mpg-sponsor:hover { transform: translateY(-4px); }
.mpg-sponsor img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* Results */
.mpg-results { padding: 30px 0 70px; }
.mpg-crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.mpg-crumbs a { color: var(--muted); }
.mpg-crumbs span { margin: 0 4px; }
.mpg-results-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mpg-results-head h1 { font-size: clamp(26px, 3.5vw, 36px); }
.mpg-results-head p { margin: 0; color: var(--muted); font-weight: 600; }
.mpg-term-desc { max-width: 780px; }
.mpg-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 28px; }
.mpg-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 30px; text-decoration: none; color: var(--slate); font-weight: 600; font-size: 14px; background: #fff; }
.mpg-chip:hover { border-color: var(--accent); color: var(--accent-dark); }
.mpg-chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.mpg-noresults { text-align: center; padding: 60px 20px; background: var(--soft); border-radius: var(--radius); color: var(--muted); }
.mpg-noresults .mpg-ic { color: #b9c2c8; }
.mpg-noresults p:last-child { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.mpg-pager { margin-top: 36px; }
.mpg-pager .nav-links { display: flex; justify-content: center; gap: 6px; }
.mpg-pager .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--slate); font-weight: 700; }
.mpg-pager .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Single business */
.mpg-gallery { display: grid; gap: 6px; height: 440px; background: var(--soft); }
.mpg-gallery-1 { grid-template-columns: 1fr; }
.mpg-gallery-2 { grid-template-columns: 2fr 1fr; }
.mpg-gallery-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.mpg-gallery-3 .mpg-gal-item:first-child { grid-row: span 2; }
.mpg-gal-item { position: relative; display: block; overflow: hidden; min-height: 0; }
.mpg-gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.mpg-gal-item:hover img { transform: scale(1.03); }
.mpg-gal-more { position: absolute; inset: 0; background: rgba(0,0,0,.45); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.mpg-single-in { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; padding-top: 26px; padding-bottom: 60px; }
.mpg-single-head h1 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 4px; }
.mpg-tagline { font-size: 18px; color: var(--muted); margin: 0 0 14px; }
.mpg-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.mpg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.mpg-act { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--slate); text-decoration: none; font-weight: 700; font-size: 15px; cursor: pointer; transition: border-color .2s, color .2s; }
.mpg-act:hover { border-color: var(--accent); color: var(--accent-dark); }
.mpg-act:first-child { background: var(--accent); border-color: var(--accent); color: #fff; }
.mpg-act:first-child:hover { background: var(--accent-dark); color: #fff; }
.mpg-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 22px; }
.mpg-box h2 { font-size: 20px; display: flex; align-items: center; gap: 8px; }
.mpg-content p { margin: 0 0 1em; }
.mpg-addr { display: flex; gap: 6px; align-items: flex-start; font-weight: 600; color: var(--ink); }
.mpg-map { position: relative; aspect-ratio: 16/8; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #e7eff0, #dbe6e8); margin-bottom: 14px; }
.mpg-map iframe { width: 100%; height: 100%; border: 0; }
.mpg-map-load { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; background: #fff; border: 1px solid var(--line); border-radius: 30px; padding: 10px 18px; font-weight: 700; color: var(--slate); cursor: pointer; display: flex; align-items: center; gap: 6px; box-shadow: var(--shadow); }
.mpg-hours-tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.mpg-hours-tbl th, .mpg-hours-tbl td { padding: 7px 0; border-bottom: 1px solid var(--line); text-align: left; }
.mpg-hours-tbl td { text-align: right; }
.mpg-hours-tbl tr:last-child th, .mpg-hours-tbl tr:last-child td { border-bottom: 0; }
.mpg-hours-tbl .is-today th, .mpg-hours-tbl .is-today td { color: var(--accent-dark); font-weight: 700; }
.mpg-contact { list-style: none; margin: 0; padding: 0; }
.mpg-contact li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); word-break: break-word; }
.mpg-contact li:last-child { border-bottom: 0; }
.mpg-contact .mpg-ic { color: var(--accent); }
.mpg-contact a { color: var(--ink); text-decoration: none; font-weight: 600; }
.mpg-contact a:hover { color: var(--accent-dark); }
.mpg-claim { font-size: 14px; color: var(--muted); }
.mpg-single-side { position: sticky; top: 20px; align-self: start; }

.mpg-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.mpg-lightbox[hidden] { display: none; }
.mpg-lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; }
.mpg-lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 48px; cursor: pointer; padding: 10px 18px; }
.mpg-lb-close { top: 10px; right: 10px; }
.mpg-lb-prev { left: 6px; }
.mpg-lb-next { right: 6px; }

/* Pages */
.mpg-page { padding: 40px 0 70px; }
.mpg-page-title { font-size: clamp(28px, 4vw, 38px); }
.mpg-post { padding: 18px 0; border-bottom: 1px solid var(--line); }
.mpg-post-img { border-radius: var(--radius); margin-bottom: 20px; }

/* Footer */
.mpg-footer-nav { background: var(--slate); padding: 18px 0; }
.mpg-footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 30px; }
.mpg-footer-menu a { color: #fff; text-decoration: none; font-weight: 600; }
.mpg-footer-menu a:hover { color: #9be3de; }
.mpg-footer-bottom { background: #111; color: #c9cfd4; padding: 26px 0 30px; text-align: center; font-size: 14px; }
.mpg-footer-bottom p { margin: 0 0 8px; }
.mpg-footer-contact { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; }
.mpg-footer-contact span { display: inline-flex; align-items: center; gap: 6px; }
.mpg-social { display: flex; justify-content: center; gap: 12px; margin-top: 12px !important; }
.mpg-social a { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: rgba(255,255,255,.1); transition: background .2s; }
.mpg-social a:hover { background: var(--accent); }
.mpg-social-dark { justify-content: flex-start; }
.mpg-social-dark a { color: var(--slate); background: var(--soft); }
.mpg-social-dark a:hover { color: #fff; }

/* Responsive */
@media (max-width: 1000px) {
    .mpg-grid { grid-template-columns: repeat(2, 1fr); }
    .mpg-areas { grid-template-columns: repeat(2, 1fr); }
    .mpg-single-in { grid-template-columns: 1fr; }
    .mpg-single-side { position: static; }
    .mpg-header-search { display: none; }
}
@media (max-width: 820px) {
    .mpg-burger { display: block; }
    .mpg-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--slate); flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 20px; box-shadow: 0 10px 20px rgba(0,0,0,.2); }
    .mpg-nav.is-open { display: flex; }
    .mpg-menu { flex-direction: column; gap: 0; }
    .mpg-menu a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
    .mpg-btn-cta { margin-top: 14px; justify-content: center; }
    .mpg-cta-in { flex-direction: column; text-align: center; }
    .mpg-cat-tiles { grid-template-columns: repeat(2, 1fr); }
    .mpg-gallery { height: 300px; grid-template-columns: 1fr !important; grid-template-rows: 1fr !important; }
    .mpg-gallery .mpg-gal-item:not(:first-child) { display: none; }
    .mpg-gallery .mpg-gal-item:first-child { grid-row: auto; }
}
@media (max-width: 600px) {
    .mpg-header-in { min-height: 64px; }
    .mpg-brand img { max-height: 44px; }
    .mpg-hero { min-height: 0; padding: 110px 0 50px; }
    .mpg-search { flex-direction: column; border-radius: 12px; }
    .mpg-search label { padding: 2px 16px; }
    .mpg-search .mpg-search-where { border-left: 0; border-top: 1px solid var(--line); }
    .mpg-search button { justify-content: center; padding: 14px; }
    .mpg-hero-hint { margin-top: 28px; }
    .mpg-cat-btn { width: calc(50% - 7px); flex-direction: row; justify-content: center; padding: 14px 10px; }
    .mpg-grid { grid-template-columns: 1fr; }
    .mpg-areas, .mpg-cat-tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
    .mpg-area { aspect-ratio: 1; padding: 12px; }
    .mpg-area-name { font-size: 16px; }
    .mpg-cat-tile { aspect-ratio: 1; padding: 10px; }
    .mpg-cat-tile span { font-size: 12px; }
    .mpg-section { padding: 50px 0; }
    .mpg-box { padding: 18px; }
    .mpg-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .mpg-act { justify-content: center; }
}
