/**
 * TravelerGuide Theme Styles
 * Supplementary styles beyond Tailwind
 */

/* ===== SELF-HOSTED FONTS ===== */

/* Plus Jakarta Sans — all weights */
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/plus-jakarta-sans-v12-latin-regular.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/plus-jakarta-sans-v12-latin-500.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/plus-jakarta-sans-v12-latin-600.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/plus-jakarta-sans-v12-latin-700.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/plus-jakarta-sans-v12-latin-800.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                   U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Material Symbols Outlined — served via Google Fonts CDN (auto-subsets) */

/* ===== SELF-HOSTED FONTS END ===== */

/* Theme color custom properties */
:root {
    --tg-primary: #f07d19;
    --tg-primary-light: #fff8f2;
    --tg-primary-40: #f07d1940;
}

/* Base */
body {
    font-family: "Plus Jakarta Sans", sans-serif;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #e6e0db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d1c7c0;
}

/* Custom select chevron */
.custom-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%238a7460' class='w-6 h-6'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
}

/* Pagination */
.tg-pagination .nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tg-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #8a7460;
    background: #fff;
    border: 1px solid #e5e0dc;
    transition: all 0.2s;
}

.tg-pagination .page-numbers:hover {
    color: var(--tg-primary);
    border-color: var(--tg-primary);
}

.tg-pagination .page-numbers.current {
    background: var(--tg-primary);
    color: #fff;
    border-color: var(--tg-primary);
}

.tg-pagination .page-numbers.dots {
    border: none;
    background: transparent;
}

/* WordPress core alignments */
.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* WordPress gallery */
.wp-block-gallery {
    margin: 1.5rem 0;
}

.wp-block-gallery .wp-block-image {
    border-radius: 1rem;
    overflow: hidden;
}

/* WordPress captions */
.wp-caption-text,
figcaption {
    font-size: 0.875rem;
    color: #8a7460;
    text-align: center;
    margin-top: 0.5rem;
}

/* Prose overrides for WP content */
.prose h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.prose h3 {
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.prose blockquote {
    border-left-color: var(--tg-primary);
    background: var(--tg-primary-light);
    padding: 1.5rem;
    border-radius: 0 0.75rem 0.75rem 0;
}

/* Generated content table styling */
.prose table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #e5e0dc;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.prose table thead {
    background: #f8f7f6;
}

.prose table thead th {
    font-weight: 700;
    color: #181411;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid #e5e0dc;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.prose table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0ece8;
    color: #4a3b32;
}

.prose table tbody tr:last-child td {
    border-bottom: none;
}

.prose table tbody tr:hover {
    background: #fdf9f6;
}

.prose table.tgc-cost-table thead th:first-child {
    border-left: 3px solid var(--tg-primary);
}

.prose table.tgc-cost-table tbody tr:last-child {
    font-weight: 700;
    background: var(--tg-primary-light);
}

/* FAQ section styling */
.prose h2:has(+ h3),
.prose h2 + p + h3,
.prose h2 + h3 {
    margin-top: 1rem;
}

/* Itinerary day headings */
.prose h3 strong,
.prose h3 em {
    color: var(--tg-primary);
}

/* List spacing in generated content */
.prose ul,
.prose ol {
    padding-left: 1.5rem;
}

.prose li {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.prose li::marker {
    color: var(--tg-primary);
}

/* Strong text accent */
.prose strong {
    color: #181411;
    font-weight: 700;
}

/* Links in generated content */
.prose a {
    color: var(--tg-primary);
    text-decoration: underline;
    text-decoration-color: var(--tg-primary-40);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s;
}

.prose a:hover {
    text-decoration-color: var(--tg-primary);
}

/* Line clamp utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* WordPress admin bar fix */
.admin-bar header.sticky {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar header.sticky {
        top: 46px;
    }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--tg-primary);
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* ===== HERO ===== */
.tg-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
}

.tg-hero__bg {
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1469854523086-cc02fe5d8800?w=1200&q=75&fm=webp');
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    transition: transform 8s ease;
}

.tg-hero:hover .tg-hero__bg {
    transform: scale(1.0);
}

.tg-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.3) 0%,
        rgba(0,0,0,0.55) 50%,
        rgba(0,0,0,0.75) 100%
    );
}

.tg-hero__content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 780px;
    padding: 0 24px;
}

.tg-hero__eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin-bottom: 20px;
}

.tg-hero__title {
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: #fff;
}

.tg-hero__title em {
    font-style: normal;
    color: var(--tg-primary);
}

.tg-hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
    margin-bottom: 40px;
}

.tg-hero__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

.tg-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
}

.tg-btn--primary {
    background: var(--tg-primary);
    color: #fff;
}

.tg-btn--primary:hover {
    background: #d96d10;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(240,125,25,0.4);
}

.tg-btn--ghost {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(4px);
}

.tg-btn--ghost:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

.tg-hero__stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 32px;
}

.tg-hero__stat strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
}

.tg-hero__stat span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.6);
}

.tg-hero__scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255,255,255,0.6);
    animation: tg-bounce 2s infinite;
}

@keyframes tg-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(8px); }
}

@media (max-width: 768px) {
    .tg-hero__bg {
        background-image: url('https://images.unsplash.com/photo-1469854523086-cc02fe5d8800?w=800&q=70&fm=webp');
    }
}

@media (max-width: 600px) {
    .tg-hero__stats { gap: 24px; }
    .tg-hero__stat strong { font-size: 1.4rem; }
}

/* ===== TRANSPARENT HEADER (front page) ===== */
.site-header--transparent {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent) !important;
    border-bottom: none !important;
    backdrop-filter: none !important;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header--transparent .nav-link,
.site-header--transparent .logo-text {
    color: #fff;
}

.site-header--transparent a,
.site-header--transparent span.text-text-main,
.site-header--transparent span.text-text-muted {
    color: rgba(255,255,255,0.9) !important;
}

.site-header--scrolled {
    background: rgba(255,255,255,0.97) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid #e5e0dc !important;
    box-shadow: 0 1px 8px rgba(0,0,0,0.08);
}

.site-header--scrolled a,
.site-header--scrolled span.text-text-main,
.site-header--scrolled span.text-text-muted {
    color: inherit !important;
}

/* Mobile menu open — force solid white header on transparent front-page header */
.site-header--transparent.tg-menu-open {
    background: rgba(255,255,255,0.97) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid #e5e0dc !important;
}

.site-header--transparent.tg-menu-open a,
.site-header--transparent.tg-menu-open span.text-text-main,
.site-header--transparent.tg-menu-open span.text-text-muted {
    color: inherit !important;
}
