/*
 * Vive Hotels Portal — portal.css
 * Design system shared with hotel website brand identity.
 * Colors: Navy #16324F (primary) | Gold #BFA06A (accent)
 * Typography: Merriweather (body) | Playfair Display (headings)
 */

/* ── Google Fonts are loaded via @import for self-contained portal ── */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700&family=Playfair+Display:wght@400;600;700&display=swap');

/* ══════════════════ DESIGN TOKENS ══════════════════ */
:root {
    --vh-primary: #16324F;
    --vh-primary-rgb: 22, 50, 79;
    --vh-accent: #BFA06A;
    --vh-accent-dark: #a6895a;
    --vh-light-bg: #f8f7f4;
    --vh-card-shadow: 0 4px 18px rgba(22, 50, 79, 0.10);
    --vh-card-hover: 0 10px 32px rgba(22, 50, 79, 0.18);
    --vh-radius: 0.75rem;
    --vh-transition: all 0.3s ease;

    /* Override Bootstrap tokens */
    --bs-primary: #16324F;
    --bs-primary-rgb: 22, 50, 79;
    --bs-font-sans-serif: 'Merriweather', Georgia, serif;
    --bs-border-radius: var(--vh-radius);
}

/* ══════════════════ BASE TYPOGRAPHY ══════════════════ */
body {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 0.9rem;
    color: #333;
    background-color: var(--vh-light-bg);
}

a {
    color: var(--vh-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--vh-accent);
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.display-4,
.display-5 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--vh-primary);
}

/* ══════════════════ BOOTSTRAP OVERRIDES ══════════════════ */
.btn-primary {
    background-color: var(--vh-primary) !important;
    border-color: var(--vh-primary) !important;
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--vh-accent) !important;
    border-color: var(--vh-accent) !important;
    color: #fff !important;
}

.btn-outline-primary {
    color: var(--vh-primary) !important;
    border-color: var(--vh-primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--vh-primary) !important;
    color: #fff !important;
}

.btn-warning {
    background-color: var(--vh-accent) !important;
    border-color: var(--vh-accent) !important;
    color: #fff !important;
    font-weight: 600;
}

.btn-warning:hover {
    background-color: var(--vh-accent-dark) !important;
    border-color: var(--vh-accent-dark) !important;
    color: #fff !important;
}

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

.bg-primary {
    background-color: var(--vh-primary) !important;
}

/* ══════════════════ NAVBAR / HEADER ══════════════════ */
.navbar-portal {
    background-color: #fff !important;
    border-bottom: 2px solid var(--vh-primary);
    box-shadow: 0 2px 8px rgba(22, 50, 79, 0.08);
    padding: 0.6rem 0;
}

.navbar-portal .navbar-brand,
.navbar-portal .nav-link {
    color: var(--vh-primary) !important;
    font-weight: 500;
    font-family: 'Merriweather', serif;
}

.navbar-portal .nav-link:hover,
.navbar-portal .nav-link.active {
    color: var(--vh-accent) !important;
}

.navbar-portal .nav-link.active {
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 2px;
}

.navbar-logo {
    height: 38px;
    width: auto;
}

/* ══════════════════ HOTEL CARDS ══════════════════ */
.hotel-card {
    border: none !important;
    border-radius: var(--vh-radius) !important;
    box-shadow: var(--vh-card-shadow);
    transition: var(--vh-transition);
    overflow: hidden;
    background: #fff;
}

.hotel-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--vh-card-hover);
}

.hotel-card .card-img-top {
    height: 210px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hotel-card:hover .card-img-top {
    transform: scale(1.04);
}

.hotel-card .card-body {
    padding: 1rem 1.1rem 1.25rem;
}

.hotel-card .card-title a {
    color: var(--vh-primary) !important;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hotel-card .card-title a:hover {
    color: var(--vh-accent) !important;
}

.city-link {
    color: #6c757d;
    transition: var(--vh-transition);
    font-weight: 500;
}

.city-link:hover {
    color: var(--vh-accent) !important;
}

.city-link i {
    transition: color 0.3s ease;
}

.city-link:hover i {
    color: var(--vh-accent) !important;
}

/* Compatibility alias for existing markup */
.transition-hover {
    transition: var(--vh-transition);
}

.transition-hover:hover {
    transform: translateY(-6px);
    box-shadow: var(--vh-card-hover) !important;
}

/* ══════════════════ FILTER BAR ══════════════════ */
.filter-bar {
    background: #fff;
    border-radius: var(--vh-radius);
    border: 1px solid rgba(22, 50, 79, 0.12);
    box-shadow: 0 2px 8px rgba(22, 50, 79, 0.06);
}

/* Star toggle buttons */
.star-btn {
    min-width: 42px;
    font-weight: 600;
    border-radius: 20px !important;
    transition: var(--vh-transition);
}

.star-btn.active,
.star-btn:hover {
    background-color: var(--vh-accent) !important;
    border-color: var(--vh-accent) !important;
    color: #fff !important;
}

/* Filter dropdown active state */
.filter-dropdown-active {
    background-color: var(--vh-primary) !important;
    border-color: var(--vh-primary) !important;
    color: #fff !important;
}

/* ══════════════════ BADGES ══════════════════ */
.badge-type {
    background-color: #eef1f5;
    color: var(--vh-primary);
    border: 1px solid rgba(22, 50, 79, 0.2);
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    border-radius: 4px;
    padding: 3px 7px;
}

.badge-tag {
    background-color: #fff;
    color: var(--vh-accent-dark);
    border: 1px solid var(--vh-accent);
    font-weight: 500;
    font-size: 0.68rem;
    border-radius: 20px;
    padding: 2px 8px;
    text-decoration: none;
    transition: var(--vh-transition);
}

.badge-tag:hover,
.badge-tag.active {
    background-color: var(--vh-accent);
    color: #fff;
    border-color: var(--vh-accent);
}

/* ══════════════════ BREADCRUMBS ══════════════════ */
.breadcrumb-item a {
    color: var(--vh-primary) !important;
    transition: color 0.2s ease;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--vh-accent) !important;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #666;
}

/* ══════════════════ PAGINATION ══════════════════ */
.pagination-portal .btn {
    border-radius: 20px;
    padding: 0.4rem 1.2rem;
    font-weight: 600;
    transition: var(--vh-transition);
}

/* ══════════════════ SECTION HEADINGS ══════════════════ */
.section-title {
    font-family: 'Playfair Display', serif;
    color: var(--vh-primary);
    font-size: 1.75rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    background-color: var(--vh-accent);
    border-radius: 2px;
}

/* ══════════════════ EMPTY STATE ══════════════════ */
.empty-state {
    background: #fff;
    border-radius: var(--vh-radius);
    border: 1px dashed rgba(22, 50, 79, 0.2);
    padding: 3rem 2rem;
    text-align: center;
    color: #888;
}

.empty-state i {
    font-size: 3rem;
    color: rgba(22, 50, 79, 0.15);
    margin-bottom: 1rem;
}

/* ══════════════════ RESPONSIVE UTILITIES ══════════════════ */
@media (max-width: 768px) {
    .hidden-mobile {
        display: none !important;
    }

    .hotel-card .card-img-top {
        height: 170px;
    }

    .section-title {
        font-size: 1.4rem;
    }
}

@media (min-width: 769px) {
    .hidden-desktop {
        display: none !important;
    }
}

/* ══════════════════ FOOTER ══════════════════ */
footer {
    background-color: var(--vh-primary) !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

footer a {
    color: var(--vh-accent) !important;
}

footer a:hover {
    color: #fff !important;
}

/* ══════════════════ MISC ══════════════════ */
/* Stars */
.stars-rating i {
    color: var(--vh-accent);
}

.stars {
    vertical-align: top;
}

/* No-jump image containers */
.img-wrapper {
    overflow: hidden;
    border-radius: var(--vh-radius) var(--vh-radius) 0 0;
}

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

/* ══════════════════ PORTAL HERO BANNER ══════════════════ */
.portal-hero {
    background-color: var(--vh-primary);
    background-image: linear-gradient(rgba(22, 50, 79, 0.5), rgba(22, 50, 79, 0.1)), url('/background.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    border-radius: var(--vh-radius);
    overflow: visible;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.portal-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ══════════════════ SEARCH WIDGET FLOATING OVERLAY ══════════════════ */
.search-widget-container {
    position: relative;
    height: 300px;
    /* Collapsed height on desktop */
    margin-bottom: 24px;
    overflow: visible;
    z-index: 1000;
    transition: height 0.2s ease, margin-bottom 0.2s ease;
}

#search-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    /* Collapsed height on desktop */
    border: none;
    background: transparent;
    z-index: 1001;
    transition: height 0.2s ease;
    overflow: hidden;
}

/* On hover (desktop) or active focus (mobile/expanded class), expand container and iframe height to let select dropdowns float */
.search-widget-container:hover,
.search-widget-container.expanded {
    height: 680px;
    /* Expanded height to contain Destinia dropdowns */
    margin-bottom: -356px;
    /* Offset the height change to avoid pushing content below */
}

.search-widget-container:hover #search-iframe,
.search-widget-container.expanded #search-iframe {
    height: 680px;
}

@media (max-width: 768px) {
    .search-widget-container {
        height: 420px;
        /* Collapsed height on mobile */
        margin-bottom: 24px;
    }

    #search-iframe {
        height: 420px;
    }

    .search-widget-container:hover,
    .search-widget-container.expanded {
        height: 850px;
        margin-bottom: -406px;
        /* Offset for mobile stacked layout */
    }

    .search-widget-container:hover #search-iframe,
    .search-widget-container.expanded #search-iframe {
        height: 850px;
        /* Expanded height on mobile */
    }
}

/* City link color overrides for brand consistency */
.city-link {
    color: var(--vh-primary) !important;
    font-weight: 600;
}

.city-link i {
    color: var(--vh-accent) !important;
}

.city-link:hover {
    color: var(--vh-accent) !important;
    text-decoration: underline !important;
}

/* ══════════════════ PREMIUM CAROUSEL CONTROLS ══════════════════ */
.carousel {
    overflow: visible !important;
}

.carousel-control-prev,
.carousel-control-next {
    width: 42px !important;
    height: 42px !important;
    background-color: #ffffff !important;
    border-radius: 50% !important;
    border: 1px solid rgba(22, 50, 79, 0.15) !important;
    box-shadow: 0 4px 12px rgba(22, 50, 79, 0.12) !important;
    opacity: 0.95 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    transition: all 0.2s ease !important;
    z-index: 100 !important;
}

.carousel-control-prev {
    left: -21px !important;
}

.carousel-control-next {
    right: -21px !important;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: var(--vh-accent) !important;
    border-color: var(--vh-accent) !important;
    box-shadow: 0 6px 16px rgba(22, 50, 79, 0.2) !important;
    opacity: 1 !important;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(0.2) sepia(0.5) saturate(5) hue-rotate(180deg) !important; /* turns white default icon into corporate dark navy */
    width: 18px !important;
    height: 18px !important;
    transition: filter 0.2s ease !important;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    filter: brightness(0) invert(1) !important; /* turns dark icon into pure white on hover */
}

@media (max-width: 768px) {
    .carousel-control-prev {
        left: 2px !important;
    }
    .carousel-control-next {
        right: 2px !important;
    }
}