/* Travel Entity Theme — main styles
   ---------------------------------------------------- */

:root {
    --ph-primary: #da552f;
    --ph-primary-hover: #c14a29;
    --ph-primary-soft: #fff2ed;
    --ph-bg: #ffffff;
    --ph-surface: #ffffff;
    --ph-surface-muted: #f7f7f8;
    --ph-text: #21293c;
    --ph-text-muted: #6b7280;
    --ph-border: #e6e6e6;
    --ph-shadow: 0 1px 2px rgba(21, 25, 40, 0.06), 0 8px 24px rgba(21, 25, 40, 0.04);
    --ph-radius: 14px;
    --ph-transition: 200ms ease;
}

body.dark {
    --ph-primary: #ff7043;
    --ph-primary-hover: #ff8a5c;
    --ph-primary-soft: rgba(255,112,67,0.12);
    --ph-bg: #0b0d13;
    --ph-surface: #151823;
    --ph-surface-muted: #1c2030;
    --ph-text: #e6e8ef;
    --ph-text-muted: #a3aab8;
    --ph-border: #2a2f42;
    --ph-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
}

/* Dark mode Bootstrap overrides */
body.dark .card,
body.dark .dropdown-menu,
body.dark .navbar,
body.dark .modal-content,
body.dark .accordion-item,
body.dark .list-group-item {
    background-color: var(--ph-surface);
    color: var(--ph-text);
    border-color: var(--ph-border);
}
body.dark .dropdown-item { color: var(--ph-text); }
body.dark .dropdown-item:hover,
body.dark .dropdown-item:focus { background: var(--ph-surface-muted); color: var(--ph-text); }
body.dark .dropdown-divider { border-color: var(--ph-border); }

body.dark .form-control,
body.dark .form-select,
body.dark .input-group-text {
    background-color: var(--ph-surface-muted);
    color: var(--ph-text);
    border-color: var(--ph-border);
}
body.dark .form-control::placeholder { color: var(--ph-text-muted); }
body.dark .form-control:focus,
body.dark .form-select:focus {
    background-color: var(--ph-surface);
    color: var(--ph-text);
    border-color: var(--ph-primary);
    box-shadow: 0 0 0 3px rgba(255,112,67,0.20);
}

body.dark .badge.bg-light { background-color: var(--ph-surface-muted) !important; color: var(--ph-text) !important; }
body.dark .text-dark    { color: var(--ph-text) !important; }
body.dark .text-muted   { color: var(--ph-text-muted) !important; }
body.dark .bg-light     { background-color: var(--ph-surface-muted) !important; }
body.dark .border,
body.dark .border-top,
body.dark .border-bottom,
body.dark .border-start,
body.dark .border-end { border-color: var(--ph-border) !important; }
body.dark hr { border-color: var(--ph-border); opacity: 1; }

body.dark .nav-tabs { border-color: var(--ph-border); }
body.dark .nav-tabs .nav-link { color: var(--ph-text-muted); border-color: transparent; }
body.dark .nav-tabs .nav-link.active {
    background: var(--ph-surface);
    color: var(--ph-text);
    border-color: var(--ph-border) var(--ph-border) var(--ph-surface);
}

body.dark .alert-info    { background: rgba(88,140,255,.12); color: #b8ccff; border-color: rgba(88,140,255,.3); }
body.dark .alert-success { background: rgba(46,204,113,.12); color: #a7e6c1; border-color: rgba(46,204,113,.3); }
body.dark .alert-warning { background: rgba(255,180,50,.12); color: #f0d090; border-color: rgba(255,180,50,.3); }
body.dark .alert-danger  { background: rgba(255,90,90,.12);  color: #ffb1b1; border-color: rgba(255,90,90,.3); }

body.dark .page-link {
    background: var(--ph-surface);
    color: var(--ph-text);
    border-color: var(--ph-border);
}
body.dark .page-item.active .page-link { background: var(--ph-primary); border-color: var(--ph-primary); color: #fff; }
body.dark .page-item.disabled .page-link { background: var(--ph-surface-muted); color: var(--ph-text-muted); }

body.dark .ph-navbar { background: rgba(11,13,19,0.85); }
body.dark .ph-hero { background: linear-gradient(180deg, rgba(255,112,67,0.05), transparent); }
body.dark .ph-hero-line { background: var(--ph-surface-muted); }
body.dark .ph-hero-card { background: var(--ph-surface-muted); border-color: var(--ph-border); }
body.dark .ph-newsletter { background: linear-gradient(135deg, rgba(255,112,67,0.12), var(--ph-surface)); }

body.dark .ph-search-item { color: var(--ph-text); }
body.dark .ph-search-item:hover { background: var(--ph-surface-muted); }

body.dark .ph-content code { background: var(--ph-surface-muted); }
body.dark .ph-content blockquote { background: var(--ph-surface-muted); }

/* Prevent white flash when reloading a saved dark theme */
html.dark-preload, html.dark-preload body { background: #0b0d13; }

/* Base */
.ph-body {
    background: var(--ph-bg);
    color: var(--ph-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--ph-primary); }
a:hover { color: var(--ph-primary-hover); }

.ph-primary-text { color: var(--ph-primary) !important; }

.card, .ph-card, .ph-post {
    background: var(--ph-surface);
    color: var(--ph-text);
    border: 1px solid var(--ph-border);
    border-radius: var(--ph-radius) !important;
}

/* Navbar */
.ph-navbar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--ph-border);
}
body.dark .ph-navbar {
    background: rgba(15,17,22,0.85);
}
.ph-brand { color: var(--ph-text) !important; display:inline-flex; align-items:center; text-decoration:none; }
.ph-logo-mark {
    display:inline-flex; align-items:center; justify-content:center;
    width:32px; height:32px; border-radius:50%;
    background: var(--ph-primary); color:#fff; font-weight:700;
}
.ph-menu .nav-link {
    color: var(--ph-text);
    font-weight: 500;
}
.ph-menu .nav-link:hover { color: var(--ph-primary); }

/* Search */
.ph-search-form { position: relative; min-width: 280px; }
.ph-search-form .input-group-text { background: var(--ph-surface-muted); color: var(--ph-text-muted); border-color: var(--ph-border); }
.ph-search-input {
    background: var(--ph-surface-muted);
    border-color: var(--ph-border);
    color: var(--ph-text);
}
.ph-search-input:focus {
    background: var(--ph-surface);
    box-shadow: 0 0 0 3px rgba(218,85,47,0.15);
    border-color: var(--ph-primary);
    color: var(--ph-text);
}
.ph-search-results {
    position:absolute; top:110%; left:0; right:0;
    background: var(--ph-surface); border:1px solid var(--ph-border);
    border-radius: 12px; box-shadow: var(--ph-shadow);
    max-height: 420px; overflow:auto; z-index:1050; display:none;
}
.ph-search-results.is-open { display:block; }
.ph-search-item { display:flex; align-items:center; gap:.75rem; padding:.6rem .75rem; text-decoration:none; color: var(--ph-text); }
.ph-search-item:hover { background: var(--ph-surface-muted); }
.ph-search-item img { width:36px; height:36px; border-radius:8px; object-fit:cover; }
.ph-search-item .ph-search-tag { margin-left:auto; font-size:.7rem; color: var(--ph-text-muted); text-transform:uppercase; }

/* Buttons */
.ph-btn-primary {
    background: var(--ph-primary);
    color: #fff !important;
    border: 1px solid var(--ph-primary);
    transition: transform var(--ph-transition), background var(--ph-transition), box-shadow var(--ph-transition);
}
.ph-btn-primary:hover {
    background: var(--ph-primary-hover);
    border-color: var(--ph-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(218,85,47,0.25);
}
.ph-btn-outline {
    background: transparent;
    color: var(--ph-text);
    border: 1px solid var(--ph-border);
    transition: all var(--ph-transition);
}
.ph-btn-outline:hover {
    border-color: var(--ph-primary);
    color: var(--ph-primary);
}
.ph-theme-toggle { color: var(--ph-text); }
.ph-theme-toggle:hover { color: var(--ph-primary); }

/* Hero */
.ph-hero { background: linear-gradient(180deg, var(--ph-surface-muted), transparent); }
.ph-hero .display-5 { color: var(--ph-text); }
.ph-hero-illustration { position: relative; height: 260px; }
.ph-hero-card {
    position: absolute; width:70%; padding: 16px; border-radius: 14px;
    background: var(--ph-surface); border: 1px solid var(--ph-border);
    box-shadow: var(--ph-shadow);
    animation: ph-float 6s ease-in-out infinite;
}
.ph-hero-card-1 { top:0; left:0; }
.ph-hero-card-2 { top:60px; right:0; animation-delay: -2s; }
.ph-hero-card-3 { bottom:0; left:20%; animation-delay: -4s; }
.ph-hero-logo { width:42px; height:42px; border-radius:10px; background: linear-gradient(135deg,#ff8f6b,#da552f); margin-bottom: 10px; }
.ph-hero-logo.alt { background: linear-gradient(135deg,#6b90ff,#324bda); }
.ph-hero-line { height:10px; border-radius:6px; background: var(--ph-surface-muted); margin: 8px 0; }

@keyframes ph-float {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-8px); }
}

/* Destination Card */
.ph-cards { display: grid; gap: 12px; }
.ph-card { transition: transform var(--ph-transition), box-shadow var(--ph-transition); }
.ph-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(21,25,40,0.08);
}
.ph-card-logo img { object-fit: cover; }
.ph-tagline { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

.ph-topic-badge {
    background: var(--ph-surface-muted);
    color: var(--ph-text-muted) !important;
    font-weight: 500;
    padding: .35em .6em;
    border-radius: 999px;
    transition: background var(--ph-transition), color var(--ph-transition);
}
.ph-topic-badge:hover {
    background: var(--ph-primary-soft);
    color: var(--ph-primary) !important;
}
body.dark .ph-topic-badge:hover {
    background: rgba(218,85,47,0.15);
}

/* Vote button */
.ph-vote-btn {
    display: inline-flex; flex-direction: column; align-items: center;
    justify-content:center; min-width: 64px; min-height: 64px;
    padding: 6px 10px; border-radius: 12px;
    background: var(--ph-surface); color: var(--ph-text);
    border: 1px solid var(--ph-border);
    font-weight: 700; line-height:1;
    transition: all var(--ph-transition);
}
.ph-vote-btn i { font-size: 1.1rem; }
.ph-vote-btn .ph-vote-label { font-size: .7rem; font-weight:600; text-transform:uppercase; letter-spacing:.02em; }
.ph-vote-btn .ph-vote-count { font-size: 1rem; margin-top: 2px; }
.ph-vote-btn:hover {
    border-color: var(--ph-primary);
    color: var(--ph-primary);
    transform: translateY(-1px);
}
.ph-vote-btn.is-voted {
    background: var(--ph-primary);
    color: #fff;
    border-color: var(--ph-primary);
    box-shadow: 0 6px 14px rgba(218,85,47,0.25);
}
.ph-vote-btn.is-voted:hover { color: #fff; }
.ph-vote-btn.is-bumping { animation: ph-bump 300ms ease; }
@keyframes ph-bump { 50% { transform: scale(1.08); } }

/* Bookmark */
.ph-bookmark-btn.is-bookmarked { border-color: var(--ph-primary); color: var(--ph-primary); }

/* Destination hero */
.ph-destination-hero { background: var(--ph-surface-muted); border-bottom: 1px solid var(--ph-border); }
.ph-destination-logo { width: 96px; height: 96px; object-fit: cover; background: var(--ph-surface); }

/* Sidebar widgets */
.widget-title { color: var(--ph-text); font-size: 1rem; font-weight: 700; }
.ph-widget-list a { color: var(--ph-text); }
.ph-widget-list a:hover { color: var(--ph-primary); }

/* Comments */
.ph-comment-thread .comment-body { padding: 8px 0; }

/* Newsletter */
.ph-newsletter {
    background: linear-gradient(135deg, var(--ph-primary-soft), var(--ph-surface));
    border: 1px solid var(--ph-border) !important;
}

/* Fire emoji */
.ph-fire { filter: drop-shadow(0 2px 6px rgba(218,85,47,.35)); }

/* Filters */
.ph-filter.is-active { color: var(--ph-primary); font-weight: 600; }

/* Footer */
.ph-footer { background: var(--ph-surface-muted); border-top: 1px solid var(--ph-border); }
.ph-footer a { color: var(--ph-text-muted); text-decoration: none; }
.ph-footer a:hover { color: var(--ph-primary); }
.ph-social a { font-size: 1.15rem; }

/* Responsive breakpoints */
@media (max-width: 991.98px) {
    .ph-search-form { min-width: unset; width: 100%; margin-bottom: .5rem; }
    .ph-hero-illustration { display: none; }
}
@media (max-width: 575.98px) {
    .ph-vote-btn { min-width: 56px; min-height: 56px; }
    .ph-destination-logo { width: 72px; height: 72px; }
}

/* Store buttons on destination page */
.ph-store-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .95rem;
    border-radius: 10px;
    background: var(--ph-surface);
    border: 1px solid var(--ph-border);
    color: var(--ph-text);
    text-decoration: none;
    font-weight: 500;
    font-size: .9rem;
    transition: transform var(--ph-transition), border-color var(--ph-transition), color var(--ph-transition), background var(--ph-transition);
}
.ph-store-btn:hover {
    transform: translateY(-2px);
    color: var(--ph-store, var(--ph-primary));
    border-color: var(--ph-store, var(--ph-primary));
    box-shadow: 0 6px 14px rgba(0,0,0,.06);
}
.ph-store-btn i {
    color: var(--ph-store, var(--ph-primary));
    font-size: 1.05rem;
}
body.dark .ph-store-btn {
    background: var(--ph-surface-muted);
}

/* Host social buttons */
.ph-social-list .ph-btn-outline {
    width: 38px; height: 38px;
    display: inline-flex; align-items:center; justify-content:center;
    padding: 0;
    border-radius: 50%;
}
.ph-social-list .ph-btn-outline i { font-size: 1rem; }

/* Submit form section headings */
.ph-submit-form .card h2 i { color: var(--ph-primary); }

/* Long-form post content */
.ph-content {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--ph-text);
}
.ph-content > * { max-width: 100%; }
.ph-content p { margin: 0 0 1.25em; }
.ph-content h1, .ph-content h2, .ph-content h3,
.ph-content h4, .ph-content h5, .ph-content h6 {
    margin-top: 2em;
    margin-bottom: .6em;
    line-height: 1.25;
    font-weight: 700;
    color: var(--ph-text);
}
.ph-content h2 { font-size: 1.75rem; }
.ph-content h3 { font-size: 1.4rem; }
.ph-content h4 { font-size: 1.2rem; }
.ph-content a  { color: var(--ph-primary); text-decoration: underline; text-underline-offset: 3px; }
.ph-content a:hover { color: var(--ph-primary-hover); }
.ph-content ul, .ph-content ol { padding-left: 1.5em; margin: 0 0 1.25em; }
.ph-content li { margin-bottom: .35em; }
.ph-content img,
.ph-content .wp-block-image img,
.ph-content figure img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}
.ph-content figure { margin: 1.5em 0; }
.ph-content figcaption {
    font-size: .875rem;
    color: var(--ph-text-muted);
    text-align: center;
    margin-top: .5em;
}
.ph-content blockquote {
    border-left: 4px solid var(--ph-primary);
    background: var(--ph-surface-muted);
    padding: 1em 1.25em;
    margin: 1.5em 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--ph-text);
}
.ph-content blockquote p:last-child { margin-bottom: 0; }
.ph-content code {
    background: var(--ph-surface-muted);
    color: var(--ph-primary);
    padding: .15em .4em;
    border-radius: 6px;
    font-size: .9em;
}
.ph-content pre {
    background: #0f1116;
    color: #e6e8ef;
    padding: 1.25em;
    border-radius: 12px;
    overflow: auto;
    line-height: 1.5;
    margin: 1.5em 0;
}
.ph-content pre code { background: transparent; color: inherit; padding: 0; }
.ph-content hr { border: 0; border-top: 1px solid var(--ph-border); margin: 2em 0; }
.ph-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}
.ph-content th, .ph-content td {
    border: 1px solid var(--ph-border);
    padding: .6em .8em;
    text-align: left;
}
.ph-content th { background: var(--ph-surface-muted); font-weight: 600; }
.ph-content .wp-block-embed,
.ph-content iframe,
.ph-content video {
    max-width: 100%;
    border-radius: 12px;
}
.ph-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.ph-content .alignleft  { float: left; margin: .5em 1.5em 1em 0; max-width: 50%; }
.ph-content .alignright { float: right; margin: .5em 0 1em 1.5em; max-width: 50%; }
.ph-content .alignwide,
.ph-content .alignfull { margin-left: -1rem; margin-right: -1rem; max-width: none; }
@media (min-width: 992px) {
    .ph-content .alignwide  { margin-left: -3rem; margin-right: -3rem; }
    .ph-content .alignfull  { margin-left: -6rem; margin-right: -6rem; }
}

.ph-excerpt { color: var(--ph-text-muted); line-height: 1.65; }
.ph-excerpt p:last-child { margin-bottom: 0; }

/* Bootstrap object-fit polyfill class */
.object-fit-cover { object-fit: cover; }

/* Utility */
.min-w-0 { min-width: 0; }
