/*
Theme Name: Premium Dubai Tours
Theme URI: https://example.com/
Author: ASAD ALI
Description: Editable WordPress theme for Dubai tours and desert safari businesses with global color presets. Includes a Tours custom post type with Add New Tour, featured images, price, badge and WhatsApp booking buttons.
Version: 1.1.26
Text Domain: premium-dubai-tours
*/

:root{
  --black:#000000;
  --dark:#121212;
  --card:#1e1e1e;
  --gold:#FFD700;
  --gold-hover:#E6C200;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --border:#2b2b2b;
  --whatsapp:#25D366;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--black);color:var(--text);font-family:Inter,Arial,sans-serif;line-height:1.6}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}
.container{width:min(1180px,calc(100% - 32px));margin:auto}
.gold{color:var(--gold)}
.btn{display:inline-block;padding:14px 24px;border-radius:999px;font-weight:800;transition:.25s ease}
.btn-gold{background:var(--gold);color:#000;box-shadow:0 0 18px rgba(255,215,0,.22)}
.btn-gold:hover{background:var(--gold-hover);transform:translateY(-1px)}
.btn-outline{border:2px solid #fff;color:#fff}
.btn-outline:hover{background:#fff;color:#000}
.site-header{position:fixed;inset:0 0 auto;z-index:999;background:rgba(0,0,0,.9);backdrop-filter:blur(10px);border-bottom:1px solid #202020}
.nav-wrap{height:80px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.brand{display:flex;align-items:center;gap:10px;color:var(--gold);font-size:24px;font-weight:900;letter-spacing:.06em;text-transform:uppercase}
.brand-mark{width:30px;height:30px;background:var(--gold);color:#000;display:grid;place-items:center;font-size:14px}
.desktop-nav{display:flex;align-items:center;gap:26px;font-size:14px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.desktop-nav a:not(.btn):hover{color:var(--gold)}
.mobile-toggle{display:none;background:none;border:0;color:var(--gold);font-size:30px;cursor:pointer}
.mobile-nav{display:none;padding:0 0 18px}
.mobile-nav.open{display:grid;gap:12px}
.hero{min-height:100vh;padding:120px 0 60px;display:grid;place-items:center;text-align:center;background-size:cover;background-position:center;position:relative}
.hero:before{content:"";position:absolute;inset:0;background:linear-gradient(rgba(0,0,0,.58),rgba(0,0,0,.9))}
.hero-inner{position:relative;z-index:1;max-width:850px}
.hero-tag{display:block;color:var(--gold);text-transform:uppercase;letter-spacing:.28em;font-weight:800;margin-bottom:16px}
.hero-title{font-size:clamp(42px,7vw,78px);line-height:1.05;margin:0 0 22px;color:#fff;font-weight:900}
.hero p{font-size:clamp(18px,2.4vw,24px);color:#d1d5db;max-width:720px;margin:0 auto 34px}
.hero-actions{display:flex;gap:14px;justify-content:center;flex-wrap:wrap}
.section{padding:92px 0}
.section-dark{background:var(--dark)}
.section-title{text-align:center;margin-bottom:52px}
.section-title h2{font-size:clamp(34px,5vw,52px);margin:0 0 10px;color:#fff}
.section-title p{color:var(--muted);max-width:700px;margin:auto}
.section-line{width:90px;height:4px;background:var(--gold);border-radius:999px;margin:20px auto 0}
.tour-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.tour-card{background:var(--card);border:1px solid var(--border);border-radius:18px;overflow:hidden;transition:.3s ease;box-shadow:0 10px 30px rgba(0,0,0,.25)}
.tour-card:hover{transform:translateY(-7px);border-color:var(--gold);box-shadow:0 18px 45px rgba(0,0,0,.42)}
.tour-media{display:block;width:100% !important;aspect-ratio:16 / 9 !important;height:auto !important;min-height:0 !important;padding:0 !important;position:relative;overflow:hidden;background:#252525}
.tour-media img{position:absolute !important;inset:0 !important;width:100% !important;height:100% !important;max-width:none !important;max-height:none !important;object-fit:cover !important;display:block;transition:.5s ease}
.tour-media > div{position:absolute !important;inset:0 !important;width:100% !important;height:100% !important;display:grid;place-items:center;color:#666}
.tour-card:hover .tour-media img{transform:scale(1.06)}
.badge{position:absolute;top:14px;right:14px;background:var(--gold);color:#000;font-size:12px;font-weight:900;padding:5px 10px;border-radius:999px}
.tour-body{padding:22px}
.tour-body h3{color:var(--gold);font-size:26px !important;line-height:1.2;margin:0 0 10px;font-weight:900}
.tour-price{font-size:20px;font-weight:900;color:#fff;margin:4px 0 8px}
.tour-excerpt{color:var(--muted);margin:0 0 20px}
.tour-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}
.tour-book,.tour-details{display:flex;align-items:center;justify-content:center;text-align:center;font-weight:900;padding:10px 8px;border-radius:12px;transition:.25s ease;min-height:46px;font-size:12px;line-height:1.15;white-space:nowrap}
.tour-book{background:var(--whatsapp);border:2px solid var(--whatsapp);color:#fff}
.tour-book:hover{background:#1ebe5d;border-color:#1ebe5d;color:#fff;transform:translateY(-1px)}
.tour-details{background:var(--gold);border:2px solid var(--gold);color:#000}
.tour-details:hover{background:var(--gold-hover);border-color:var(--gold-hover);color:#000;transform:translateY(-1px)}
.about{text-align:center;max-width:900px;margin:auto}
.about h2{font-size:clamp(34px,5vw,50px);margin:10px 0 16px;color:#fff}
.about p{font-size:18px;color:var(--muted)}
.site-footer{border-top:1px solid #171717;padding:44px 0;background:#000;text-align:center}
.footer-links{display:flex;gap:22px;justify-content:center;flex-wrap:wrap;color:#777;margin:18px 0}
.footer-links a:hover{color:var(--gold)}
.copyright{color:#555;font-size:14px}
.whatsapp-float{position:fixed;right:24px;bottom:24px;z-index:998;width:62px;height:62px;background:var(--whatsapp);border-radius:50%;display:grid;place-items:center;color:#fff;font-size:28px;font-weight:900;box-shadow:0 8px 26px rgba(37,211,102,.35);transition:.2s ease}
.whatsapp-float:hover{transform:scale(1.08)}
.content-wrap{padding:130px 0 80px}
.single-tour-wrap{max-width:900px;margin:auto}
.single-tour-image{aspect-ratio:16/9;border-radius:20px;overflow:hidden;margin-bottom:28px;background:#252525}.single-tour-image img{width:100%;height:100%;aspect-ratio:16/9;object-fit:cover}
.single-tour-title{font-size:25px !important;color:#fff;margin:0 0 12px}
.single-tour-content{color:#d1d5db;font-size:18px}
.single-tour-meta{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin:16px 0 26px}
.price-pill{background:var(--gold);color:#000;font-weight:900;padding:7px 12px;border-radius:999px}
.no-tours{text-align:center;color:var(--muted);grid-column:1/-1;padding:30px}
@media (max-width:1100px){.tour-grid{grid-template-columns:repeat(2,1fr)}.desktop-nav{display:none}.mobile-toggle{display:block}}
@media (max-width:620px){.tour-grid{grid-template-columns:1fr}.tour-actions{grid-template-columns:1fr}.hero{padding-top:110px}.btn{width:100%;max-width:340px}.site-header .container{width:min(100% - 22px,1180px)}.tour-media{aspect-ratio:16 / 9 !important;height:auto !important;padding:0 !important}}

/* VERIFIED DESKTOP TOUR LAYOUT — 4 cards per row */
@media (min-width: 901px){
  .container{width:min(1400px,calc(100% - 40px)) !important;}
  .tour-grid{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:18px !important;
  }
  .tour-body{padding:18px !important;}
  .tour-actions{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
    gap:8px !important;
    width:100% !important;
  }
  .tour-book,.tour-details{
    display:flex !important;
    width:100% !important;
    min-width:0 !important;
    align-items:center !important;
    justify-content:center !important;
    white-space:nowrap !important;
    word-break:keep-all !important;
    overflow-wrap:normal !important;
    font-size:clamp(9px,.78vw,11px) !important;
    line-height:1 !important;
    padding:11px 3px !important;
  }
}
@media (max-width:900px) and (min-width:621px){
  .tour-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  .tour-actions{grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;}
  .tour-book,.tour-details{white-space:nowrap !important;font-size:10px !important;padding:11px 4px !important;}
}
@media (max-width:620px){
  /* Mobile-only image treatment: soften contrast and add a smooth black vignette. Desktop remains unchanged. */
  .hero-slider:before{
    content:"" !important;
    z-index:1 !important;
    background:radial-gradient(ellipse at center, rgba(0,0,0,var(--hero-mobile-vignette-center,0.03)) 0%, rgba(0,0,0,var(--hero-mobile-vignette-center,0.03)) 24%, rgba(0,0,0,var(--hero-mobile-vignette-a2,0.10)) 48%, rgba(0,0,0,var(--hero-mobile-vignette-a3,0.38)) 72%, rgba(0,0,0,var(--hero-mobile-vignette-a4,0.82)) 100%) !important;
    pointer-events:none !important;
  }
  .hero-slider .hero-slide{filter:contrast(var(--hero-mobile-contrast,0.90)) saturate(var(--hero-mobile-saturate,0.90)) brightness(.99);}
  .hero-slider:after{content:"" !important;position:absolute !important;inset:0 !important;z-index:1 !important;background:rgba(0,0,0,var(--hero-mobile-dark-alpha,0)) !important;pointer-events:none !important;}
  .tour-grid{grid-template-columns:1fr !important;}
  .tour-actions{grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;}
  .tour-book,.tour-details{white-space:nowrap !important;font-size:11px !important;padding:11px 4px !important;}
  .single-tour-title{font-size:25px !important;}
}


/* SEO/accessibility additions */
.breadcrumbs{display:flex;gap:9px;align-items:center;flex-wrap:wrap;font-size:13px;color:#999;margin:0 0 22px}
.breadcrumbs a{color:#d8b24c;text-decoration:none}
.breadcrumbs a:hover{text-decoration:underline}
.tour-archive-intro{max-width:760px;margin:10px auto 0;color:#aaa;line-height:1.7}


/* Editable Hero Slider */
.hero-mobile-text-png{display:none}
.hero-slider{overflow:hidden}
.hero-slides{position:absolute;inset:0;z-index:0}
.hero-slide{position:absolute;inset:0;background-image:var(--hero-desktop);background-size:cover;background-position:center;opacity:0;transition:opacity .8s ease}
.hero-slide.active{opacity:1}
.hero-slider:before{z-index:1}
.hero-slider .hero-inner{z-index:2}
.hero-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:3;width:46px;height:46px;border:1px solid rgba(255,255,255,.35);border-radius:50%;background:rgba(0,0,0,.35);color:#fff;font-size:24px;cursor:pointer;transition:.2s ease}
.hero-arrow:hover{background:rgba(255,215,0,.9);color:#000;border-color:#FFD700}
.hero-prev{left:24px}
.hero-next{right:24px}
.hero-dots{position:absolute;left:0;right:0;bottom:26px;z-index:3;display:flex;justify-content:center;gap:8px}
.hero-dot{width:10px;height:10px;padding:0;border:1px solid #fff;border-radius:50%;background:rgba(255,255,255,.35);cursor:pointer}
.hero-dot.active{background:#FFD700;border-color:#FFD700}
@media (max-width:620px){
  /* Mobile slider ratio is a REAL layout dimension, not just an image crop. */
  .hero-slider{
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    aspect-ratio:var(--hero-mobile-ratio, 16 / 9) !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
  }
  .hero-slider .hero-slides,
  .hero-slider .hero-slide{height:100% !important;min-height:0 !important;}
  .hero-slide{background-image:var(--hero-mobile);}

  /* Mobile-only hero composition. Desktop remains completely unchanged. */
  .hero-slider .hero-desktop-copy{display:none !important;}
  .hero-slider .hero-mobile-text-png{display:block;
    position:absolute;
    left:50%;
    top:50%;
    z-index:2;
    width:var(--hero-mobile-text-png-size,70%) !important;
    max-width:90% !important;
    transform:translate(-50%,-50%) translateY(var(--hero-mobile-text-png-position,-40px));
    pointer-events:none;
    line-height:0;
    text-align:center;
  }
  .hero-slider .hero-mobile-text-png img{
    display:block;
    width:100%;
    height:auto;
    max-height:none;
    object-fit:contain;
  }
  .hero-slider .hero-actions{
    position:absolute !important;
    left:50% !important;
    top:50% !important;
    width:100% !important;
    transform:translate(-50%, calc(-50% + var(--hero-mobile-buttons-position, 80px))) scale(var(--hero-mobile-button-scale, 100%));
    transform-origin:center center;
    gap:10px !important;
    z-index:4 !important;
  }
  .hero-slider .hero-actions .btn{
    width:var(--hero-mobile-button-width, 240px) !important;
    max-width:calc(100vw - 72px) !important;
    padding:10px 16px !important;
    min-height:0 !important;
    font-size:var(--hero-mobile-button-size, 14px) !important;
    line-height:1.35 !important;
  }
  .hero-arrow{width:40px;height:40px;font-size:20px}
  .hero-prev{left:10px}
  .hero-next{right:10px}
}

/* v1.1.47 — Mobile tour cards slide in from fully off-screen left, slower and smoother. */
@media (max-width:620px){
  html.pdt-mobile-tour-animation body{overflow-x:hidden;}
  .tour-card{opacity:0;}
  .tour-card.pdt-tour-card-animate{
    animation:pdtTourCardSlideIn 2.4s cubic-bezier(.16,1,.3,1) both;
    will-change:transform,opacity;
  }
  @keyframes pdtTourCardSlideIn{
    0%{opacity:1;transform:translate3d(-120vw,0,0);}
    100%{opacity:1;transform:translate3d(0,0,0);}
  }
}


/* v1.1.53 — Desktop tour cards fade in together when they enter view. */
@media (min-width:621px){
  .tour-card{opacity:0;}
  .tour-card.pdt-desktop-tour-card-animate{
    animation:pdtDesktopTourCardFadeIn 1.2s ease-out both;
    will-change:transform,opacity;
  }
  @keyframes pdtDesktopTourCardFadeIn{
    0%{opacity:0;transform:translate3d(0,24px,0);}
    100%{opacity:1;transform:translate3d(0,0,0);}
  }
}

/* Category sections: tighter spacing and fluid desktop card layout. */
.tour-category-section{padding:48px 0 !important;}
.tour-category-section .section-title{margin-bottom:32px !important;}
@media (min-width:901px){
  /* Desktop: 3 cards per row. The final incomplete row expands to use the full width. */
  .tour-category-section .tour-grid{
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
    justify-content:center !important;
  }
  .tour-category-section .tour-grid .tour-card{grid-column:span 2;}
  /* 1, 4, 7... tours: the final card fills the row. */
  .tour-category-section .tour-grid-mod-1 .tour-card:last-of-type{grid-column:span 6;}
  /* 2, 5, 8... tours: the final two cards each take half the row. */
  .tour-category-section .tour-grid-mod-2 .tour-card:nth-last-of-type(2),
  .tour-category-section .tour-grid-mod-2 .tour-card:last-of-type{grid-column:span 3;}
}
@media (max-width:900px){
  .tour-category-section{padding:48px 0 !important;}
}


/* Homepage main H1 ticker - added without changing existing section/card styling */
.home-h1-ticker{
  margin-top:80px;
  width:100%;
  height:48px;
  background:#000;
  overflow:hidden;
  display:flex;
  align-items:center;
  position:relative;
}
.home-h1-ticker-track{
  width:max-content;
  flex:0 0 auto;
  animation:home-h1-ticker-scroll 30s linear infinite;
  will-change:transform;
}
.home-h1-ticker h1{
  display:inline;
  margin:0;
  padding:0;
  color:#fff;
  font-size:17px;
  line-height:48px;
  font-weight:800;
  white-space:nowrap;
}
.home-h1-ticker-text{
  color:#fff;
  font-size:17px;
  line-height:48px;
  font-weight:800;
  white-space:nowrap;
}
@keyframes home-h1-ticker-scroll{
  from{transform:translateX(100vw);}
  to{transform:translateX(-100%);}
}
@media (max-width:600px){
  .home-h1-ticker{height:44px;margin-top:80px;}
  .home-h1-ticker h1{
    font-size:14px;
    line-height:44px;
    padding:0;
  }
  .home-h1-ticker-text{
    font-size:14px;
    line-height:44px;
  }
  .home-h1-ticker-track{animation-duration:24s;}
}
