/*
Theme Name: Book It Fast Holiday Rental
Theme URI: https://bookitfast.app/book-it-fast-holiday-rental/
Description: A modern, elegant holiday rental theme inspired by classic hospitality design. Features a customizable hero section, brand-configurable header and footer, and block patterns for building holiday-rental websites. Pairs with the free Book It Fast Blocks plugin for property design blocks, and the Book It Fast booking plugin when you're ready to take bookings.
Author: Book It Fast
Author URI: https://bookitfast.app/
Version: 1.0.3
Requires at least: 6.3
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: book-it-fast-holiday-rental
Domain Path: /languages
Tags: blog, custom-header, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, block-patterns, wide-blocks, theme-options, two-columns, right-sidebar
*/

:root {
    /* Color System - Based on Hotel Classic Design */
    --hc-primary: #c9aa7c;
    --hc-primary-dark: #b8966a;
    --hc-secondary: #2c3e50;
    --hc-accent: #e74c3c;
    --hc-text: #333333;
    --hc-text-light: #666666;
    --hc-background: #ffffff;
    --hc-background-alt: #f8f9fa;
    --hc-border: #e1e8ed;

    /* Typography Scale */
    --hc-font-primary: 'Playfair Display', serif;
    --hc-font-secondary: 'Open Sans', sans-serif;
    --hc-font-size-xs: 0.75rem;
    --hc-font-size-sm: 0.875rem;
    --hc-font-size-base: 1rem;
    --hc-font-size-lg: 1.125rem;
    --hc-font-size-xl: 1.25rem;
    --hc-font-size-2xl: 1.5rem;
    --hc-font-size-3xl: 1.875rem;
    --hc-font-size-4xl: 2.25rem;
    --hc-font-size-5xl: 3rem;

    /* Spacing Scale */
    --hc-space-1: 0.25rem;
    --hc-space-2: 0.5rem;
    --hc-space-3: 0.75rem;
    --hc-space-4: 1rem;
    --hc-space-5: 1.25rem;
    --hc-space-6: 1.5rem;
    --hc-space-8: 2rem;
    --hc-space-10: 2.5rem;
    --hc-space-12: 3rem;
    --hc-space-16: 4rem;
    --hc-space-20: 5rem;
    --hc-space-24: 6rem;

    /* Layout */
    --hc-container-sm: 640px;
    --hc-container-md: 768px;
    --hc-container-lg: 1024px;
    --hc-container-xl: 1280px;
    --hc-container-2xl: 1536px;

    /* Borders */
    --hc-border-radius: 0.375rem;
    --hc-border-radius-lg: 0.5rem;
    --hc-border-radius-xl: 0.75rem;

    /* Shadows */
    --hc-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --hc-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --hc-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --hc-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --hc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Fonts are bundled locally via assets/css/fonts.css (no remote requests).
   See that file to enable Playfair Display / Open Sans; otherwise the system
   serif / sans-serif fallbacks below are used. */

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--hc-font-secondary);
    font-size: var(--hc-font-size-base);
    line-height: 1.6;
    color: var(--hc-text);
    background-color: var(--hc-background);
    margin: 0;
    padding: 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--hc-font-primary);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--hc-space-4);
    color: var(--hc-secondary);
}

h1 {
    font-size: var(--hc-font-size-5xl);
}

h2 {
    font-size: var(--hc-font-size-4xl);
}

h3 {
    font-size: var(--hc-font-size-3xl);
}

h4 {
    font-size: var(--hc-font-size-2xl);
}

h5 {
    font-size: var(--hc-font-size-xl);
}

h6 {
    font-size: var(--hc-font-size-lg);
}

p {
    margin-bottom: var(--hc-space-4);
}

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

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

/* Main content area — breathing room below the (sticky) header. Single posts
   override this with their own larger padding in footer-styles.css. */
.site-main {
    padding-top: var(--hc-space-8);
    padding-bottom: var(--hc-space-8);
}

/* Container */
.container {
    max-width: var(--hc-container-xl);
    margin: 0 auto;
    padding-left: var(--hc-space-4);
    padding-right: var(--hc-space-4);
}

@media (min-width: 640px) {
    .container {
        padding-left: var(--hc-space-6);
        padding-right: var(--hc-space-6);
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: var(--hc-space-8);
        padding-right: var(--hc-space-8);
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--hc-space-3) var(--hc-space-6);
    font-family: var(--hc-font-secondary);
    font-size: var(--hc-font-size-base);
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--hc-border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.btn-primary {
    background-color: var(--hc-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--hc-primary-dark);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: var(--hc-primary);
    border-color: var(--hc-primary);
}

.btn-secondary:hover {
    background-color: var(--hc-primary);
    color: white;
}

.btn-lg {
    padding: var(--hc-space-4) var(--hc-space-8);
    font-size: var(--hc-font-size-lg);
}

/* Header Styles */
.site-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    /* Sticky (not fixed) so the header occupies real layout space — content
       below never slides underneath it, whatever the header's height. */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--hc-shadow-sm);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: var(--hc-shadow-md);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--hc-space-4) 0;
}

.site-logo img {
    max-height: 60px;
    width: auto;
}

/* Navigation */
.main-navigation {
    display: none;
}

@media (min-width: 768px) {
    .main-navigation {
        display: block;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--hc-space-8);
}

.nav-menu a {
    font-family: var(--hc-font-secondary);
    font-weight: 500;
    color: var(--hc-text);
    text-decoration: none;
    padding: var(--hc-space-2) 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.current {
    color: var(--hc-primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--hc-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.current::after {
    transform: scaleX(1);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: var(--hc-font-size-2xl);
    color: var(--hc-text);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* -------------------------------------------------------------------------
 * Sub-menus (dropdowns) — works for wp_nav_menu (.sub-menu) and the
 * wp_list_pages fallback (.children). Keyboard accessible via :focus-within.
 * ---------------------------------------------------------------------- */
.nav-menu li {
    position: relative;
}

.nav-menu .sub-menu,
.nav-menu .children {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

@media (min-width: 768px) {
    .nav-menu .sub-menu,
    .nav-menu .children {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 220px;
        background: #fff;
        border: 1px solid var(--hc-border);
        border-radius: 6px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
        z-index: 100;
    }

    /* Third level+ flies out to the side. */
    .nav-menu .sub-menu .sub-menu,
    .nav-menu .children .children {
        top: 0;
        left: 100%;
    }

    .nav-menu li:hover > .sub-menu,
    .nav-menu li:focus-within > .sub-menu,
    .nav-menu li:hover > .children,
    .nav-menu li:focus-within > .children {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-menu .sub-menu a,
    .nav-menu .children a {
        display: block;
        padding: 0.5rem 1.1rem;
        white-space: nowrap;
    }

    /* No underline animation inside dropdowns. */
    .nav-menu .sub-menu a::after,
    .nav-menu .children a::after {
        display: none;
    }

    .nav-menu .sub-menu a:hover,
    .nav-menu .sub-menu a:focus,
    .nav-menu .children a:hover,
    .nav-menu .children a:focus {
        background: var(--hc-background-alt);
        color: var(--hc-primary-dark);
    }

    /* Small indicator on parents with children. */
    .nav-menu > .menu-item-has-children > a::before,
    .nav-menu > .page_item_has_children > a::before {
        content: "\25BE";
        font-size: 0.7em;
        margin-right: 0.35em;
        color: var(--hc-primary);
    }
}

@media (max-width: 767px) {
    /* On mobile, sub-menus render inline and indented (always expanded). */
    .nav-menu .sub-menu,
    .nav-menu .children {
        padding-left: 1rem;
    }
    .nav-menu .sub-menu li,
    .nav-menu .children li {
        border-bottom: none;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    overflow: hidden;
    /* Fallback background when no hero image is set (behind the overlay). */
    background-color: #2c3e50;
    /* Own stacking context so the negative-z background image paints ABOVE
       this fallback colour (not hidden behind it). */
    isolation: isolate;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.7) 0%, rgba(201, 170, 124, 0.3) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: var(--hc-space-8);
}

.hero-badge {
    display: inline-block;
    background-color: var(--hc-primary);
    color: white;
    padding: var(--hc-space-2) var(--hc-space-4);
    border-radius: var(--hc-border-radius);
    font-size: var(--hc-font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--hc-space-4);
}

.hero-title {
    font-size: var(--hc-font-size-5xl);
    font-weight: 700;
    margin-bottom: var(--hc-space-6);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: var(--hc-font-size-xl);
    font-weight: 300;
    margin-bottom: var(--hc-space-8);
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: var(--hc-space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-4 {
    margin-bottom: var(--hc-space-4);
}

.mb-8 {
    margin-bottom: var(--hc-space-8);
}

.mb-12 {
    margin-bottom: var(--hc-space-12);
}

.mb-16 {
    margin-bottom: var(--hc-space-16);
}

.mt-0 {
    margin-top: 0;
}

.mt-4 {
    margin-top: var(--hc-space-4);
}

.mt-8 {
    margin-top: var(--hc-space-8);
}

.mt-12 {
    margin-top: var(--hc-space-12);
}

.mt-16 {
    margin-top: var(--hc-space-16);
}

.py-8 {
    padding-top: var(--hc-space-8);
    padding-bottom: var(--hc-space-8);
}

.py-12 {
    padding-top: var(--hc-space-12);
    padding-bottom: var(--hc-space-12);
}

.py-16 {
    padding-top: var(--hc-space-16);
    padding-bottom: var(--hc-space-16);
}

.py-20 {
    padding-top: var(--hc-space-20);
    padding-bottom: var(--hc-space-20);
}

/* Responsive Design */
@media (max-width: 767px) {
    .hero-title {
        font-size: var(--hc-font-size-4xl);
    }

    .hero-subtitle {
        font-size: var(--hc-font-size-lg);
    }

    .hero-content {
        padding: var(--hc-space-4);
    }
}

/* ===================================================
   BLOCK ALIGNMENT SUPPORT
   =================================================== */

/* Wide Alignment - Wider than normal content, but not full width */
.alignwide {
    max-width: 1400px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Full Width Alignment - Edge to edge */
.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Mobile responsive adjustments for alignments */
@media (max-width: 768px) {

    .alignwide,
    .alignfull {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100%;
    }
}
/* ================================
   Block-driven Header & Footer (synced patterns)
   ================================ */

/* Header — top contact bar */
.site-header .hc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--hc-border);
    font-size: var(--hc-font-size-sm);
    background: var(--hc-topbar-bg, transparent);
    color: var(--hc-topbar-text, var(--hc-text-light));
}
.site-header .hc-topbar p { margin: 0; }
.site-header .hc-topbar a { color: inherit; text-decoration: none; }
.site-header .hc-topbar a:hover { color: var(--hc-primary); }
.site-header .hc-topbar .wp-block-social-links { gap: 0.25rem; }

/* Header — main bar (logo / nav / CTA) */
.site-header .hc-headerbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--hc-space-6);
    padding: var(--hc-space-4) 0;
}
.site-header .hc-headerbar .wp-block-site-logo img { max-height: 56px; width: auto; }
.site-header .hc-headerbar .nav-menu {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--hc-space-6);
}
.site-header .hc-headerbar .nav-menu a { font-weight: 500; color: var(--hc-text); text-decoration: none; }
.site-header .hc-headerbar .nav-menu a:hover { color: var(--hc-primary); }
.site-header .hc-headerbar__cta { margin: 0; }
.site-header .hc-headerbar__cta .wp-block-button__link {
    background: var(--hc-cta-bg, var(--hc-primary));
    color: var(--hc-cta-text, #fff);
    border-radius: var(--hc-border-radius);
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    font-size: var(--hc-font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: filter 0.2s ease;
}
.site-header .hc-headerbar__cta .wp-block-button__link:hover { filter: brightness(0.92); color: var(--hc-cta-text, #fff); }

/* Sticky shrink when scrolled */
.site-header.scrolled .hc-topbar { display: none; }
.site-header.scrolled .hc-headerbar { padding: 0.45rem 0; }
.site-header.scrolled .hc-headerbar .wp-block-site-logo img { max-height: 44px; }

/* Footer — block columns.
   Uses an explicit dark colour (NOT var(--hc-secondary), which the Customizer
   may set to white) so the footer stays dark regardless of the colour scheme. */
.site-footer {
    background: var(--hc-footer-bg, #2c3e50);
    color: var(--hc-footer-text, rgba(255, 255, 255, 0.85));
    margin-top: var(--hc-space-16);
}
.site-footer a { color: var(--hc-footer-text, rgba(255, 255, 255, 0.85)); text-decoration: none; }
.site-footer a:hover { color: var(--hc-footer-link, var(--hc-primary)); }
.site-footer .hc-footer-cols {
    max-width: var(--hc-container-xl);
    margin: 0 auto;
    padding: var(--hc-space-12) var(--hc-space-4) var(--hc-space-8);
    gap: var(--hc-space-8);
}
.site-footer .hc-footer__h {
    color: var(--hc-footer-heading, #fff);
    font-size: var(--hc-font-size-lg);
    margin: 0 0 var(--hc-space-4);
    font-family: var(--hc-font-primary);
}
.site-footer .hc-footer-menu { list-style: none; margin: 0; padding: 0; }
.site-footer .hc-footer-menu li { margin-bottom: 0.4rem; }
.site-footer .hc-footer__copyright {
    margin: 0;
    padding: var(--hc-space-5) var(--hc-space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: var(--hc-font-size-sm);
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
    .site-header .hc-headerbar { flex-wrap: wrap; gap: var(--hc-space-3); }
    .site-footer .hc-footer-cols { padding-top: var(--hc-space-8); }
}

/* -------------------------------------------------------------------------
 * WordPress core required/recommended classes (alignments, captions, etc.)
 * ---------------------------------------------------------------------- */
.alignleft   { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright  { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; margin-bottom: 1em; }

.wp-caption { max-width: 100%; margin-bottom: 1.5em; }
.wp-caption img { display: block; margin: 0 auto; }
.wp-caption-text,
.gallery-caption { display: block; text-align: center; font-size: 0.9em; color: #666; padding: 0.5em 0; }

.sticky { display: block; }
.bypostauthor { display: block; }

/* -------------------------------------------------------------------------
 * Long-word / long-title overflow protection: headings, titles and content
 * must wrap instead of forcing a horizontal scrollbar.
 * ---------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title,
.hero-title,
.entry-content,
.entry-summary,
.comment-content,
.page-body,
.widget,
.site-footer,
.footer-widget-area,
.page-sidebar,
.nav-menu {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

/* Page with Sidebar template */
.page-featured-image {
    margin-bottom: 2rem;
}
.page-with-sidebar-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}
.page-sidebar {
    background: var(--hc-background-alt);
    padding: 2rem;
    border-radius: 8px;
    align-self: start;
}
.page-sidebar .widget {
    margin-bottom: 2rem;
}
.page-sidebar .widget:last-child {
    margin-bottom: 0;
}
.page-sidebar .sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.page-sidebar .sidebar-menu li {
    margin-bottom: 0.5rem;
}
@media (max-width: 768px) {
    .page-with-sidebar-layout {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------------------------
 * Content & media element defaults: images scale down, pre/tables scroll or
 * fit instead of forcing a horizontal page scrollbar.
 * ---------------------------------------------------------------------- */
img {
    max-width: 100%;
    height: auto;
}
embed,
iframe,
object,
video {
    max-width: 100%;
}
pre {
    max-width: 100%;
    overflow-x: auto;
    background: var(--hc-background-alt);
    border: 1px solid var(--hc-border);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    font-size: 0.9em;
}
table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--hc-space-6);
}
th,
td {
    border: 1px solid var(--hc-border);
    padding: 0.5rem 0.75rem;
    text-align: left;
}
th {
    background: var(--hc-background-alt);
}

/* -------------------------------------------------------------------------
 * Comments — tidy threaded list with modest indents (browser defaults give
 * 40px per level, which crushes deep replies on small screens).
 * ---------------------------------------------------------------------- */
.comments-area {
    max-width: 800px;
    margin: var(--hc-space-8) auto 0;
}
.comment-list,
.comment-list .children {
    list-style: none;
    margin: 0;
    padding: 0;
}
.comment-list .children {
    padding-left: var(--hc-space-6);
}
.comment-list .comment-body {
    background: var(--hc-background-alt);
    border: 1px solid var(--hc-border);
    border-radius: 8px;
    padding: var(--hc-space-4) var(--hc-space-5);
    margin-bottom: var(--hc-space-4);
}
.comment-list .comment-meta {
    margin-bottom: var(--hc-space-2);
}
.comment-list .comment-author {
    display: flex;
    align-items: center;
    gap: var(--hc-space-2);
    font-weight: 600;
}
.comment-list .comment-author .avatar {
    border-radius: 50%;
}
.comment-list .comment-metadata {
    font-size: var(--hc-font-size-sm);
    color: var(--hc-text-light);
}
.comment-list .reply {
    font-size: var(--hc-font-size-sm);
}
.comment-respond {
    margin-top: var(--hc-space-8);
}
.comment-form label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--hc-space-1);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--hc-border);
    border-radius: 6px;
    font: inherit;
}
.comment-form .submit {
    background: var(--hc-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.7rem 1.6rem;
    font-weight: 600;
    cursor: pointer;
}
.comment-form .submit:hover {
    background: var(--hc-primary-dark);
}

@media (max-width: 767px) {
    /* Cap the per-level indent so deep threads stay readable. */
    .comment-list .children {
        padding-left: var(--hc-space-3);
    }
}
