/*
Theme Name: Best Travel Advice
Theme URI: https://example.com/best-travel-advice
Author: OpenAI
Author URI: https://openai.com
Description: A lightweight Elementor-friendly travel blog theme with a global header, global footer, affiliate-ready areas, and a custom travel hero image.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: best-travel-advice
Tags: blog, travel, custom-logo, custom-menu, featured-images, full-width-template, elementor, affiliate-marketing
*/

:root {
  --bta-blue: #0a5ca8;
  --bta-orange: #ef7f1a;
  --bta-sand: #fff8ed;
  --bta-text: #1d2a38;
  --bta-muted: #607286;
  --bta-border: #dfe8f0;
  --bta-bg: #f5f8fb;
  --bta-max: 1500px;
  --bta-radius: 20px;
  --bta-shadow: 0 15px 40px rgba(13, 38, 76, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--bta-text);
  background: #fff;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--bta-blue);
  text-decoration: none;
}

a:hover {
  color: var(--bta-orange);
}

/* =========================
   GLOBAL SITE WIDTH
========================= */

.container {
  width: 100%;
  max-width: var(--bta-max);
  margin-inline: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.site-content {
  width: 100%;
  position: relative;
  z-index: 1;
}

.site-content > .container.site-main {
  width: 100%;
  max-width: var(--bta-max);
  margin-inline: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.site-main,
.content-area {
  width: 100%;
  position: relative;
  z-index: 1;
}

main#primary.content-area {
  width: 100%;
  max-width: none;
  flex: 0 0 100%;
  padding: 48px 0;
}

article.content-card {
  width: 100%;
  max-width: none;
}

.entry-content,
.entry-summary,
.page-content {
  width: 100%;
  max-width: 100%;
  position: relative;
  z-index: 1;
}

/* Remove boxed page/post wrapper styling */
.content-card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

/* Keep card styling for widgets, strips, footer, and post cards */
.widget-card,
.affiliate-strip,
.footer-card,
.post-card {
  background: #fff;
  border: 1px solid var(--bta-border);
  border-radius: var(--bta-radius);
  box-shadow: var(--bta-shadow);
}

/* Elementor pages should fully control their own layout */
.elementor-page .content-area,
.page-template-elementor-full-width .content-area {
  padding: 0;
}

.page-template-elementor-full-width .site-main,
.elementor-page .site-main {
  padding: 0;
}

.page-template-elementor-full-width .site-content .container,
.elementor-page .site-content .container {
  width: 100%;
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

/* =========================
   HEADER
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 99999;
  isolation: isolate;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(223, 232, 240, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  position: relative;
  z-index: 2;
}

.branding {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.site-brand-title {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.1;
}

.site-description {
  margin: 4px 0 0;
  font-size: 0.95rem;
  color: var(--bta-muted);
}

.site-logo,
.custom-logo {
  max-height: 56px;
  width: auto;
}

.main-navigation {
  position: relative;
  z-index: 3;
}

.main-navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 3;
}

.main-navigation a {
  font-weight: 700;
  color: var(--bta-text);
}

/* Make sure dropdowns / mobile panels sit above page content */
.main-navigation ul ul,
.main-navigation .sub-menu,
.main-navigation .mega-menu-wrap,
.main-navigation .mega-sub-menu,
.main-navigation .mega-menu-toggle,
.main-navigation .mega-menu-megamenu,
.main-navigation .mega-menu-flyout {
  position: relative;
  z-index: 100000 !important;
}

/* Generic WordPress / Elementor / popup menu safety */
.elementor-location-header,
.elementor-nav-menu--dropdown,
.elementor-nav-menu__container,
.elementor-menu-toggle,
.dialog-widget,
.dialog-lightbox-widget,
.elementor-popup-modal,
.elementor-sticky--active {
  z-index: 100000 !important;
}

/* =========================
   HERO
========================= */

.hero-banner {
  position: relative;
  z-index: 1;
  min-height: 560px;
  background-color: #0d579b;
  background-size: cover;
  background-position: center center;
  overflow: hidden;
}

.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 29, 51, 0.18), rgba(11, 29, 51, 0.25));
}

.hero-overlay {
  position: relative;
  z-index: 1;
  min-height: 560px;
  display: grid;
  place-items: end start;
  padding: 48px 0;
}

.hero-card {
  width: min(100%, 980px);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 26px;
  padding: 30px;
  box-shadow: var(--bta-shadow);
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: inline-block;
  margin-bottom: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(239, 127, 26, 0.13);
  color: #9b4d05;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-title,
.entry-title {
  margin: 0 0 12px;
  line-height: 1.1;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 4rem);
}

.hero-text {
  margin: 0 0 18px;
  color: #314050;
  font-size: 1.06rem;
}

/* =========================
   BUTTONS
========================= */

.button,
.wp-element-button,
input[type="submit"],
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--bta-orange), #ff9a3d);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(239, 127, 26, 0.18);
}

.button.secondary {
  background: #fff;
  color: var(--bta-blue);
  border: 1px solid var(--bta-border);
  box-shadow: none;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* =========================
   CONTENT AREAS
========================= */

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 28px;
  align-items: start;
}

.widget-card {
  padding: 22px;
  margin-bottom: 20px;
}

.widget-title {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--bta-blue);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.post-card {
  overflow: hidden;
}

.post-card .thumb img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.post-card-content {
  padding: 20px;
}

.post-meta {
  color: var(--bta-muted);
  font-size: 0.92rem;
}

.affiliate-strip {
  margin: 0 auto 34px;
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #fffaf3, #f4f9ff);
}

.affiliate-disclosure {
  font-size: 0.9rem;
  color: var(--bta-muted);
}

/* =========================
   FOOTER
========================= */

.site-footer {
  margin-top: 24px;
  background: linear-gradient(180deg, #0e2f4e, #09243c);
  color: rgba(255,255,255,0.92);
}

.footer-top {
  padding: 42px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
}

.footer-card {
  padding: 22px;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
  box-shadow: none;
}

.footer-card h3 {
  margin-top: 0;
  color: #fff;
}

.footer-card a {
  color: #ffd39f;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 0 28px;
  color: rgba(255,255,255,0.74);
  font-size: 0.95rem;
}

/* =========================
   ACCESSIBILITY
========================= */

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* =========================
   TABLET
========================= */

@media (max-width: 980px) {
  .container,
  .site-content > .container.site-main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .home-grid,
  .footer-grid,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    min-height: 72px;
  }

  .branding {
    flex: 1 1 auto;
  }

  .main-navigation {
    flex: 0 0 auto;
  }

  .hero-banner,
  .hero-overlay {
    min-height: 470px;
  }

  .hero-card {
    width: min(100%, 860px);
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 640px) {
  .container,
  .site-content > .container.site-main {
    padding-left: 10px;
    padding-right: 10px;
  }

  .hero-card {
    width: 100%;
    padding: 22px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .main-navigation ul {
    justify-content: center;
  }

  .button-row {
    flex-direction: column;
  }

  .button,
  .wp-element-button {
    width: 100%;
    text-align: center;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 99999;
}