/*
Theme Name: Tripyala
Theme URI: https://tripyala.com
Author: Tripyala Team
Author URI: https://tripyala.com
Description: A lightweight, SEO-optimized WordPress theme for Tripyala — a travel booking aggregator for Hotels, Flights & Car Rentals. Priceline-inspired design system. Built for programmatic SEO (pSEO), Rank Math compatibility, affiliate widget injection (Expedia, Localrent), and AdSense monetization.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: tripyala
Tags: travel, custom-logo, custom-colors, blog, one-column, two-columns, threaded-comments, translation-ready, footer-widgets

Tripyala is a from-scratch, no-framework theme. No page builder / bloat.
*/

/* -----------------------------------------------------------
   0. CSS VARIABLES — Priceline-inspired palette
----------------------------------------------------------- */
:root{
  --tp-navy:        #003580;   /* deep navy blue — header/footer/headings */
  --tp-navy-light:  #002868;   /* darker navy for gradients/hover */
  --tp-blue:        #0066CC;   /* vibrant blue — links, secondary accents */
  --tp-blue-light:  #E8F1FC;   /* pale blue tint for backgrounds */
  --tp-orange:      #FF9900;   /* high-visibility CTA */
  --tp-orange-dark: #E68600;
  --tp-yellow:      #FF6600;   /* alt CTA / badges */
  --tp-bg:          #FFFFFF;
  --tp-bg-alt:      #F4F6F9;   /* clean off-white page background */
  --tp-text:        #1A1F2E;
  --tp-text-light:  #5B6472;
  --tp-border:      #E1E6EC;
  --tp-radius:      12px;
  --tp-radius-sm:   8px;
  --tp-max-width:   1240px;
  --tp-font:        -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --tp-shadow:      0 4px 16px rgba(0,53,128,0.08);
  --tp-shadow-lg:   0 10px 32px rgba(0,53,128,0.14);
}

/* -----------------------------------------------------------
   1. RESET / BASE
----------------------------------------------------------- */
*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--tp-font);
  color:var(--tp-text);
  background:var(--tp-bg-alt);
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; height:auto; display:block; }
a{ color:var(--tp-blue); text-decoration:none; transition:color .15s ease; }
a:hover{ color:var(--tp-navy); }
h1,h2,h3,h4,h5,h6{ color:var(--tp-navy); line-height:1.2; margin:0 0 .6em; font-weight:800; letter-spacing:-.01em; }
h1{ font-size:2.4rem; }
h2{ font-size:1.8rem; }
h3{ font-size:1.3rem; }
p{ margin:0 0 1.2em; }
ul,ol{ padding-left:1.3em; }
.tp-container{ max-width:var(--tp-max-width); margin:0 auto; padding:0 20px; }
.screen-reader-text{ position:absolute!important; clip:rect(1px,1px,1px,1px); overflow:hidden; height:1px; width:1px; }
button, input, select, textarea{ font-family:inherit; font-size:1rem; }

/* -----------------------------------------------------------
   2. HEADER (Priceline-style: navy bar + white nav strip)
----------------------------------------------------------- */
.tp-topbar{
  background:var(--tp-navy); color:#fff; font-size:.82rem;
}
.tp-topbar .tp-container{ display:flex; justify-content:flex-end; gap:18px; padding-top:6px; padding-bottom:6px; }
.tp-topbar a{ color:#CFE0F5; }
.tp-topbar a:hover{ color:#fff; }

.tp-site-header{
  background:var(--tp-bg);
  box-shadow:0 2px 6px rgba(0,53,128,0.06);
  position:sticky; top:0; z-index:999;
}
.tp-header-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 20px; gap:20px;
}
.tp-logo{ display:flex; align-items:center; gap:10px; flex-shrink:0; }
.tp-logo img{ max-height:46px; width:auto; }
.tp-logo-text{ font-size:1.5rem; font-weight:800; color:var(--tp-navy); }
.tp-logo-text span{ color:var(--tp-orange); }

.tp-primary-nav ul{ list-style:none; display:flex; gap:30px; margin:0; padding:0; }
.tp-primary-nav > ul > li > a{
  color:var(--tp-navy); font-weight:700; font-size:.95rem; padding:8px 0; display:inline-block;
  border-bottom:3px solid transparent;
}
.tp-primary-nav > ul > li > a:hover,
.tp-primary-nav > ul > li.current-menu-item > a{ color:var(--tp-blue); border-bottom-color:var(--tp-orange); }
.tp-primary-nav ul ul{
  display:none; position:absolute; background:#fff; box-shadow:var(--tp-shadow-lg);
  border-radius:var(--tp-radius-sm); padding:10px 0; flex-direction:column; min-width:210px; margin-top:12px;
}
.tp-primary-nav li{ position:relative; }
.tp-primary-nav li:hover > ul{ display:flex; }
.tp-primary-nav ul ul li a{ display:block; padding:9px 18px; border-bottom:none!important; font-weight:600; }

.tp-header-cta{
  background:var(--tp-orange); color:#fff!important; font-weight:800; padding:10px 22px;
  border-radius:50px; white-space:nowrap; box-shadow:var(--tp-shadow);
}
.tp-header-cta:hover{ background:var(--tp-orange-dark); color:#fff!important; }

.tp-menu-toggle{
  display:none; background:none; border:2px solid var(--tp-navy); border-radius:6px;
  padding:6px 10px; cursor:pointer;
}
.tp-menu-toggle span{ display:block; width:22px; height:2px; background:var(--tp-navy); margin:4px 0; }

/* Header Ad Slot */
.tp-ad-slot{ text-align:center; margin:0 auto; }
.tp-ad-header{ padding:10px 20px; background:var(--tp-bg-alt); border-bottom:1px solid var(--tp-border); }
.tp-ad-label{ font-size:.68rem; text-transform:uppercase; letter-spacing:.08em; color:var(--tp-text-light); margin-bottom:4px; }

/* -----------------------------------------------------------
   3. HERO / SEARCH WIDGET AREA
----------------------------------------------------------- */
.tp-hero{
  background:linear-gradient(135deg,var(--tp-navy) 0%,var(--tp-navy-light) 100%);
  color:#fff; padding:60px 20px 96px; text-align:center;
  position:relative;
}
.tp-hero h1{ color:#fff; font-size:2.5rem; margin-bottom:.35em; }
.tp-hero .tp-subtitle{ color:#CFE0F5; max-width:680px; margin:0 auto 1.6em; font-size:1.1rem; }
.tp-hero .tp-breadcrumbs{ margin-bottom:1.2em; }
.tp-hero .tp-breadcrumbs a, .tp-hero .tp-breadcrumbs span{ color:#AFC7E6; font-size:.85rem; }
.tp-hero .tp-breadcrumbs a:hover{ color:#fff; }

.tp-widget-panel{
  max-width:var(--tp-max-width); margin:-64px auto 40px; background:#fff;
  border-radius:var(--tp-radius); box-shadow:var(--tp-shadow-lg); padding:28px 26px;
  min-height:120px; /* reserves space to prevent layout shift while 3rd-party widget loads */
}
.tp-widget-panel-inner{ min-height:70px; }
.tp-widget-panel .tp-widget-caption{
  font-size:.8rem; color:var(--tp-text-light); text-align:center; margin-top:12px;
}
.tp-widget-tabs{ display:flex; gap:8px; justify-content:center; margin-bottom:18px; flex-wrap:wrap; }
.tp-widget-tabs a{
  padding:8px 18px; border-radius:50px; background:var(--tp-blue-light); color:var(--tp-navy);
  font-weight:700; font-size:.85rem;
}
.tp-widget-tabs a.is-active, .tp-widget-tabs a:hover{ background:var(--tp-navy); color:#fff; }

/* -----------------------------------------------------------
   4. CONTENT SECTIONS / CARDS
----------------------------------------------------------- */
.tp-content-section{ padding:50px 20px; }
.tp-content-section.tp-alt{ background:#fff; }
.tp-content-section h2{ text-align:center; margin-bottom:.3em; }
.tp-content-section .tp-section-lead{
  text-align:center; color:var(--tp-text-light); max-width:660px; margin:0 auto 2.2em;
}

.tp-grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; max-width:var(--tp-max-width); margin:0 auto; }
.tp-grid-4{ display:grid; grid-template-columns:repeat(4,1fr); gap:22px; max-width:var(--tp-max-width); margin:0 auto; }
.tp-grid-5{ display:grid; grid-template-columns:repeat(5,1fr); gap:20px; max-width:var(--tp-max-width); margin:0 auto; }

.tp-card{
  background:#fff; border:1px solid var(--tp-border); border-radius:var(--tp-radius);
  padding:22px; box-shadow:var(--tp-shadow); transition:transform .15s ease, box-shadow .15s ease;
}
.tp-card:hover{ transform:translateY(-3px); box-shadow:var(--tp-shadow-lg); }
.tp-card h3{ margin-bottom:.4em; font-size:1.1rem; }
.tp-card .tp-icon{ color:var(--tp-orange); font-size:1.7rem; margin-bottom:10px; }

/* Popular Locations Grid (image cards) */
.tp-location-card{
  border-radius:var(--tp-radius); overflow:hidden; position:relative; box-shadow:var(--tp-shadow);
  aspect-ratio:4/3; background:var(--tp-blue-light);
}
.tp-location-card img{ width:100%; height:100%; object-fit:cover; }
.tp-location-card .tp-location-overlay{
  position:absolute; inset:0; background:linear-gradient(0deg,rgba(0,40,104,.85) 0%,rgba(0,40,104,0) 55%);
  display:flex; align-items:flex-end; padding:16px;
}
.tp-location-card .tp-location-name{ color:#fff; font-weight:800; font-size:1.05rem; }

/* CTA */
.tp-cta{
  background:linear-gradient(135deg,var(--tp-orange) 0%,var(--tp-yellow) 100%);
  color:#fff; text-align:center; padding:56px 20px; border-radius:var(--tp-radius);
  max-width:var(--tp-max-width); margin:20px auto;
}
.tp-cta h2{ color:#fff; }
.tp-btn{
  display:inline-block; background:var(--tp-navy); color:#fff; padding:14px 34px;
  border-radius:50px; font-weight:800; margin-top:14px; border:none; cursor:pointer;
}
.tp-btn:hover{ background:var(--tp-navy-light); color:#fff; }
.tp-btn-outline{ background:transparent; border:2px solid #fff; }
.tp-btn-orange{ background:var(--tp-orange); }
.tp-btn-orange:hover{ background:var(--tp-orange-dark); }

/* FAQ */
.tp-faq-item{ border-bottom:1px solid var(--tp-border); padding:16px 0; max-width:820px; margin:0 auto; }
.tp-faq-item h3{ margin-bottom:.3em; font-size:1.05rem; }

/* -----------------------------------------------------------
   5. HOMEPAGE-SPECIFIC BLOCKS
----------------------------------------------------------- */
.tp-about-section{ display:grid; grid-template-columns:1fr 1fr; gap:44px; align-items:center; max-width:var(--tp-max-width); margin:0 auto; }
.tp-about-section img{ border-radius:var(--tp-radius); box-shadow:var(--tp-shadow-lg); }

.tp-blog-card{
  background:#fff; border:1px solid var(--tp-border); border-radius:var(--tp-radius); overflow:hidden;
  box-shadow:var(--tp-shadow); transition:transform .15s ease;
}
.tp-blog-card:hover{ transform:translateY(-3px); }
.tp-blog-card img{ width:100%; aspect-ratio:16/10; object-fit:cover; }
.tp-blog-card .tp-blog-card-body{ padding:18px; }
.tp-blog-card .tp-entry-meta{ margin-bottom:.4em; }
.tp-blog-card h3{ font-size:1.05rem; margin-bottom:.4em; }
.tp-blog-card h3 a{ color:var(--tp-navy); }

/* -----------------------------------------------------------
   6. LAYOUT: MAIN + SIDEBAR (blog)
----------------------------------------------------------- */
.tp-layout{
  display:grid; grid-template-columns:2.3fr 1fr; gap:40px;
  max-width:var(--tp-max-width); margin:40px auto; padding:0 20px; align-items:start;
}
.tp-layout.tp-full{ grid-template-columns:1fr; }
.tp-main article{ margin-bottom:46px; }
.tp-entry-meta{ color:var(--tp-text-light); font-size:.85rem; margin-bottom:.6em; }
.tp-entry-thumb{ border-radius:var(--tp-radius); overflow:hidden; margin-bottom:16px; }

.widget{
  background:#fff; border:1px solid var(--tp-border); border-radius:var(--tp-radius);
  padding:20px; margin-bottom:24px;
}
.widget-title{ font-size:1.05rem; border-bottom:3px solid var(--tp-orange); padding-bottom:8px; margin-bottom:14px; color:var(--tp-navy); }
.widget ul{ list-style:none; padding:0; margin:0; }
.widget li{ padding:6px 0; border-bottom:1px dashed var(--tp-border); }

/* Ad blocks inline */
.tp-ad-above-content, .tp-ad-below-content{ text-align:center; margin:26px auto; }
.tp-ad-sidebar{ text-align:center; }

/* -----------------------------------------------------------
   7. SINGLE POST / COMMENTS
----------------------------------------------------------- */
.tp-single-content{ font-size:1.05rem; }
.tp-single-content h2{ margin-top:1.4em; }
.tp-tags a{
  display:inline-block; background:var(--tp-blue-light); padding:5px 12px; border-radius:20px;
  font-size:.8rem; margin:2px 4px 2px 0; color:var(--tp-navy); font-weight:600;
}
.comment-list{ list-style:none; padding:0; }
.comment-list .comment{ border-top:1px solid var(--tp-border); padding:18px 0; }

/* -----------------------------------------------------------
   8. FOOTER (4 columns + Frequently Visited Pages strip)
----------------------------------------------------------- */
.tp-frequently-visited{ background:#fff; border-top:1px solid var(--tp-border); padding:36px 20px; }
.tp-frequently-visited h2{ text-align:center; font-size:1.2rem; margin-bottom:1.4em; text-transform:uppercase; letter-spacing:.04em; }
.tp-frequently-visited .tp-fv-grid{
  display:grid; grid-template-columns:repeat(4,1fr); gap:24px; max-width:var(--tp-max-width); margin:0 auto;
}
.tp-frequently-visited .widget{ background:transparent; border:none; padding:0; margin:0; }
.tp-frequently-visited .widget-title{ font-size:.9rem; border-bottom:2px solid var(--tp-blue-light); color:var(--tp-navy); }
.tp-frequently-visited a{ color:var(--tp-text-light); font-size:.9rem; }
.tp-frequently-visited a:hover{ color:var(--tp-blue); }
.tp-frequently-visited li{ padding:4px 0; border-bottom:none; }

.tp-site-footer{ background:var(--tp-navy); color:#CFE0F5; margin-top:0; }
.tp-footer-widgets{
  display:grid; grid-template-columns:repeat(4,1fr); gap:32px;
  max-width:var(--tp-max-width); margin:0 auto; padding:50px 20px 30px;
}
.tp-footer-widgets .widget{ background:transparent; border:none; padding:0; margin:0; }
.tp-footer-widgets .widget-title{ color:#fff; border-bottom:3px solid var(--tp-orange); }
.tp-footer-widgets a{ color:#AFC7E6; }
.tp-footer-widgets a:hover{ color:#fff; }
.tp-footer-bottom{
  border-top:1px solid rgba(255,255,255,.14); text-align:center; padding:18px 20px; font-size:.85rem;
}
.tp-footer-bottom a{ color:#fff; }
.tp-footer-menu{ list-style:none; display:inline-flex; gap:16px; padding:0; margin:0; }

/* -----------------------------------------------------------
   9. UTILITIES
----------------------------------------------------------- */
.tp-text-center{ text-align:center; }
.tp-mt-0{ margin-top:0; }
.tp-mb-0{ margin-bottom:0; }

/* -----------------------------------------------------------
   10. RESPONSIVE
----------------------------------------------------------- */
@media (max-width: 980px){
  .tp-layout{ grid-template-columns:1fr; }
  .tp-grid-3, .tp-grid-4{ grid-template-columns:1fr 1fr; }
  .tp-grid-5{ grid-template-columns:repeat(3,1fr); }
  .tp-footer-widgets{ grid-template-columns:1fr 1fr; }
  .tp-frequently-visited .tp-fv-grid{ grid-template-columns:1fr 1fr; }
  .tp-about-section{ grid-template-columns:1fr; }
}
@media (max-width: 680px){
  .tp-topbar{ display:none; }
  .tp-primary-nav{
    display:none; position:absolute; top:100%; left:0; right:0; background:#fff;
    box-shadow:var(--tp-shadow-lg); padding:10px 20px;
  }
  .tp-primary-nav.tp-nav-open{ display:block; }
  .tp-primary-nav ul{ flex-direction:column; gap:0; }
  .tp-primary-nav ul ul{ position:static; box-shadow:none; margin-top:0; padding-left:14px; }
  .tp-menu-toggle{ display:block; }
  .tp-header-cta{ display:none; }
  .tp-grid-3, .tp-grid-4{ grid-template-columns:1fr; }
  .tp-grid-5{ grid-template-columns:1fr 1fr; }
  .tp-footer-widgets{ grid-template-columns:1fr; }
  .tp-frequently-visited .tp-fv-grid{ grid-template-columns:1fr; }
  .tp-hero h1{ font-size:1.9rem; }
  .tp-widget-panel{ margin-top:-44px; padding:18px; }
}
