/*
Theme Name: Agadir Explorer Guide
Theme URI: https://example.com/tripgo-travel
Author: TripGo
Author URI: https://example.com
Description: A responsive activity and booking theme customized for Agadir Explorer Guide.
Version: 2.3.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tripgo-travel
Tags: travel, booking, one-column, two-columns, custom-menu, featured-images, translation-ready, block-styles, dark-mode
*/

/* The design system lives in assets/css/tripgo.css (enqueued from functions.php).
   This file carries the theme header plus the WordPress-specific bits. */

/* ---------- WordPress core classes ---------- */
.alignnone { margin: 8px 20px 20px 0; }
.aligncenter, div.aligncenter { display: block; margin: 20px auto; }
.alignright { float: right; margin: 8px 0 20px 24px; }
.alignleft { float: left; margin: 8px 24px 20px 0; }
.alignwide { margin-inline: calc(50% - 50vw); max-width: 100vw; }
.alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; }
.wp-caption { max-width: 100%; margin-bottom: 20px; }
.wp-caption img { border-radius: var(--r-md); }
.wp-caption-text, .wp-block-image figcaption {
  font-size: .85rem; color: var(--muted); text-align: center; margin-top: 8px;
}
.sticky .card-title::after { content: " ★"; color: var(--gold); }
/* scoped to post content so it cannot clash with the tour photo grid */
.entry-content .gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.entry-content .gallery-item img { border-radius: var(--r-md); width: 100%; }
.bypostauthor > .comment-body { border-left: 3px solid var(--brand); }

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  clip: auto !important; clip-path: none; color: var(--brand); display: block;
  font-size: .9rem; font-weight: 700; height: auto; left: 20px; line-height: normal;
  padding: 14px 22px; text-decoration: none; top: 20px; width: auto; z-index: 100000;
}

/* admin bar keeps the sticky header below it */
body.admin-bar .site-header { top: 32px; }
body.admin-bar .filters,
body.admin-bar .booking-box { top: calc(var(--header-h) + 50px); }
@media screen and (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

/* ---------- comments / reviews ---------- */
.comment-list { display: grid; gap: 14px; }
.comment-list .children { margin-top: 14px; margin-left: 28px; display: grid; gap: 14px; }
.comment-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.comment-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.comment-meta .avatar { border-radius: var(--r-full); }
.comment-metadata { font-size: .82rem; color: var(--muted); }
.comment-content { color: var(--ink-2); }
.comment-reply-link { font-weight: 700; color: var(--brand); font-size: .88rem; }
.comment-respond { margin-top: 26px; }
.comment-form { display: grid; gap: 14px; }
.comment-form .comment-form-cookies-consent { display: flex; gap: 10px; align-items: center; font-size: .9rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--bg); padding: 12px 14px; font-size: .95rem;
}
.comment-form textarea { min-height: 130px; line-height: 1.6; }
.comment-form input:focus, .comment-form textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft);
}
.form-submit .submit {
  display: inline-flex; align-items: center; gap: 9px; padding: 13px 24px;
  border-radius: var(--r-full); font-weight: 700; font-size: .95rem; border: none;
  background: var(--brand); color: var(--on-brand); cursor: pointer;
}
.rating-picker { display: flex; gap: 4px; }
.rating-picker button { color: var(--gold); line-height: 0; }

/* ---------- widgets ---------- */
.widget { margin-bottom: 28px; }
.widget-title { font-size: 1.05rem; margin-bottom: 14px; }
.widget ul li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.widget a:hover { color: var(--brand); }
.site-footer .widget ul li { border-bottom-color: rgba(255, 255, 255, .1); }

/* ---------- pagination (WP) ---------- */
.nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.nav-links .page-numbers {
  min-width: 42px; height: 42px; padding: 0 12px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); font-weight: 700; background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-links .page-numbers:hover { border-color: var(--brand); color: var(--brand); }
.nav-links .page-numbers.current { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

/* ---------- editor content ---------- */
.entry-content > * { margin-bottom: 1.15em; }
.entry-content h2, .entry-content h3 { margin: 34px 0 14px; }
.entry-content ul, .entry-content ol { padding-left: 22px; margin-bottom: 1.15em; }
.entry-content ul li { list-style: disc; margin-bottom: 8px; }
.entry-content ol li { list-style: decimal; margin-bottom: 8px; }
.entry-content blockquote {
  border-left: 4px solid var(--brand); background: var(--surface-2);
  padding: 18px 22px; border-radius: 0 var(--r-md) var(--r-md) 0; font-style: italic;
}
.entry-content a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }

/* ---------- WordPress menus ---------- */
.main-nav-list { display: flex; gap: 4px; align-items: center; }
.main-nav-list li { position: relative; }
.main-nav-list > li > a { display: block; }
.main-nav-list .sub-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 210px; z-index: 80;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: 6px; display: none;
}
.main-nav-list li:hover > .sub-menu, .main-nav-list li:focus-within > .sub-menu { display: block; }
.main-nav-list .sub-menu a { display: block; padding: 9px 12px; border-radius: var(--r-sm); }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-menu-parent > a { background: var(--brand-soft); color: var(--brand); }
.drawer-list { display: flex; flex-direction: column; gap: 4px; }
.drawer-list .sub-menu { padding-left: 14px; }
.logo .custom-logo { max-height: 46px; width: auto; }

/* ---------- real photographs stand in for the generated scenery ---------- */
.tg-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
  transition: transform .6s var(--ease);
}
.card:hover .tg-photo, .dest-card:hover .tg-photo, .g-item:hover .tg-photo { transform: scale(1.07); }
.lightbox .tg-photo { position: static; transform: none; }

/* ---------- progressive enhancement ---------- */
.js .no-js-only { display: none !important; }

/* ---------- keep hero text readable before the artwork is drawn ---------- */
.hero, .page-hero { background: linear-gradient(180deg, #1d2735, #0d131c); }
.cta-band { background: var(--brand-700); }

/* ---------- compact contact action in the desktop header ---------- */
.aeg-header-contact { display:inline-flex; align-items:center; gap:7px; padding:9px 12px; border-radius:999px; background:var(--brand-soft); color:var(--brand); font-weight:750; font-size:.8rem; white-space:nowrap; }
.aeg-header-contact:hover { background:var(--brand); color:#fff; }
@media (max-width:1180px) { .aeg-header-contact { display:none; } }

/* Language switcher */
.aeg-language{position:relative}.aeg-language-current{min-width:46px;height:40px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);font-weight:850;cursor:pointer}.aeg-language-menu{position:absolute;right:0;top:calc(100% + 9px);z-index:120;display:none;width:150px;padding:7px;background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-lg)}.aeg-language.open .aeg-language-menu{display:grid}.aeg-language-menu button{padding:10px 12px;border:0;border-radius:10px;background:transparent;color:var(--ink);text-align:left;font:inherit;font-size:.88rem;cursor:pointer}.aeg-language-menu button:hover,.aeg-language-menu button.on{background:var(--brand-soft);color:var(--brand)}html[dir="rtl"] body{direction:rtl}html[dir="rtl"] .aeg-language-menu{right:auto;left:0}html[dir="rtl"] .aeg-language-menu button{text-align:right}.aeg-mobile-filter-toggle{display:none}

/* Mobile experience: intentionally isolated so desktop remains unchanged. */
@media (max-width:780px){
  html,body{max-width:100%;overflow-x:hidden}body{font-size:16px;padding-bottom:72px}.container{width:min(100% - 28px,1200px)}
  .site-header{height:64px;background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}.header-inner{height:64px;padding-inline:14px}.logo .aeg-logo,.custom-logo{height:39px!important;max-width:145px!important}.header-tools{gap:7px}.header-tools>.icon-btn:not(.burger),.aeg-usd-badge{display:none}.aeg-language-current{height:38px;min-width:44px}.burger{width:40px;height:40px}
  .drawer{width:min(88vw,360px);padding:18px}.drawer-head{padding-bottom:14px}.drawer-list a{font-size:1.05rem;padding:13px 10px}.drawer .btn{min-height:48px}
  .page-hero{min-height:260px;padding:54px 0 34px}.page-hero h1{font-size:clamp(2rem,9vw,3rem);line-height:1.06}.page-hero p{font-size:1rem;line-height:1.6}.crumbs{font-size:.8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .section{padding:42px 0}.section-tight{padding:24px 0}.section-head{margin-bottom:24px}.section-head h2{font-size:clamp(1.75rem,8vw,2.35rem);line-height:1.12}
  .layout-side{display:block}.layout-side>aside{margin-bottom:18px}.filters{padding:0;border-radius:18px;overflow:hidden}.aeg-mobile-filter-toggle{display:flex;width:100%;align-items:center;justify-content:space-between;padding:16px 18px;border:0;background:var(--surface);color:var(--ink);font:inherit;font-weight:850}.aeg-mobile-filter-toggle svg{transition:transform .2s}.filters.mobile-open .aeg-mobile-filter-toggle svg{transform:rotate(180deg)}.filter-group,.filters>#fReset,.filters>.no-js-only{display:none}.filters.mobile-open .filter-group,.filters.mobile-open>#fReset{display:block;margin:0 16px 16px}.filters.mobile-open .filter-group{padding-top:4px}
  .toolbar{align-items:center;gap:10px;margin-bottom:16px}.toolbar .count{font-size:.88rem}.toolbar label{display:none}.toolbar .ctrl{max-width:150px;font-size:.85rem;padding-inline:10px}
  #tourGrid.grid{display:grid;grid-template-columns:1fr;gap:16px}.card{display:grid;grid-template-columns:42% 58%;min-height:190px;border-radius:18px;box-shadow:0 8px 24px rgba(13,35,43,.09)}.card-media{height:100%;min-height:190px}.card-media .tg-photo,.card-media .scene-fill{height:100%;object-fit:cover}.card-badges{top:9px;left:9px}.card-badges .badge{font-size:.66rem;padding:6px 8px}.fav{top:9px;right:9px;width:34px;height:34px}.card-body{padding:14px 13px;min-width:0}.card-meta{display:block;font-size:.7rem}.card-meta span{display:flex;margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-title{font-size:1rem;line-height:1.3;margin:8px 0}.rating{gap:4px;font-size:.74rem}.rating .stars{letter-spacing:-2px}.card-body>p{display:none}.card-foot{align-items:flex-end;margin-top:10px;padding-top:10px}.card-foot .price{line-height:1.05}.card-foot .price>span{font-size:1.15rem}.card-foot .price small{display:block;font-size:.62rem;margin-top:4px}.card-foot .btn{width:38px;height:38px;padding:0;border-radius:50%;font-size:0}.card-foot .btn svg{margin:0}
  .tour-layout{display:block}.tour-main{min-width:0}.gallery{height:auto;grid-template-columns:1fr;grid-template-rows:none;gap:8px;border-radius:18px;overflow:hidden}.gallery .g-item{display:none;aspect-ratio:16/10}.gallery .g-item:first-child{display:block;grid-column:auto;grid-row:auto}.gallery .g-item:first-child:after{content:"View photos";position:absolute;right:12px;bottom:12px;background:rgba(0,0,0,.72);color:#fff;border-radius:999px;padding:8px 12px;font-size:.75rem;font-weight:800}.tour-head h1{font-size:2rem;line-height:1.12}.tabs{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none;margin-inline:-14px;padding-inline:14px}.tabs::-webkit-scrollbar{display:none}.tabs button{flex:0 0 auto;white-space:nowrap;padding:13px 15px}.prose{font-size:1rem}.panel{padding:18px;border-radius:18px}.booking-box{margin-top:22px;border-radius:20px!important}.booking-box .btn-lg{min-height:52px;font-size:1rem}.qty{height:46px}.qty button{width:42px}.qty input{font-size:1rem}.aeg-extra-card{padding:14px}
  .footer-grid{gap:28px;padding-bottom:30px}.site-footer{padding-top:42px}.site-footer .logo{display:block}.site-footer .aeg-logo-footer{width:230px!important;height:auto!important;max-width:80%!important}.footer-bottom{padding-bottom:30px}
  .cart-item{grid-template-columns:96px minmax(0,1fr)!important;gap:14px!important}.cart-item .thumb{width:96px!important;height:82px!important}.stepper{gap:6px;flex-wrap:nowrap;overflow-x:auto}.step{font-size:.76rem;white-space:nowrap}.step-sep{min-width:12px}.tbl{display:block;overflow-x:auto}
  .aeg-hero{min-height:570px}.aeg-hero-inner{padding:88px 0 70px}.aeg-hero h1{font-size:clamp(2.65rem,13vw,4rem)}.aeg-hero p{font-size:1rem;margin:18px 0 24px}.aeg-activity-grid{gap:16px}.aeg-activity-card{border-radius:19px}.aeg-card-photo{height:210px}.aeg-card-body{padding:18px}.aeg-card-body p{min-height:0}.aeg-signature-photo,.aeg-how-photo{height:330px}.aeg-cta{min-height:390px;padding:30px 22px}.aeg-cta h2{font-size:2.25rem}
  html[dir="rtl"] .card-foot,html[dir="rtl"] .toolbar{direction:rtl}html[dir="rtl"] .card-badges{left:auto;right:9px}html[dir="rtl"] .fav{right:auto;left:9px}
  .page-template-template-contact .section>.container>.grid{grid-template-columns:1fr!important;gap:20px!important}.page-template-template-contact .map-frame{height:290px}
}
