/*
Theme Name: Bougainvilla Events and Dining theme
Author: Sagar Shrestha
Author URI: https://sagarstha.name.np
Description: Bougainvilla Events and Dining theme is the custom theme for Bougainvilla website.
Version: 1.0.0
*/

:root {
    --site-bg: #ffffff;
    --site-text: #111827;
    --site-muted: #6b7280;
    --site-text-muted: rgba(17, 24, 39, 0.65);
    --site-text-faint: rgba(17, 24, 39, 0.55);
    --site-border: rgba(17, 24, 39, 0.12);
    --site-card-bg: rgba(17, 24, 39, 0.03);
    --site-gold: #c9a869;
    --site-maroon: var(--wp--preset--color--primary, #9b0014);
    --btn-radius: 0.5rem;
}

:root[data-theme="dark"] {
    --site-bg: #2a0413;
    --site-text: #f4efe8;
    --site-muted: #c9a869;
    --site-text-muted: rgba(244, 239, 232, 0.65);
    --site-text-faint: rgba(244, 239, 232, 0.55);
    --site-border: rgba(244, 239, 232, 0.12);
    --site-card-bg: rgba(244, 239, 232, 0.03);
}

body {
    background-color: var(--site-bg);
    color: var(--site-text);
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

body a {
    color: inherit;
}

/* Header */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 1.2rem 2rem;
    color: #f4efe8;
    --header-gold: #c9a869;
    --header-maroon: var(--wp--preset--color--primary, #9b0014);
}

/* Pages without a hero (the header overlays the hero on the front page)
   need their content pushed down so it isn't hidden under the fixed header. */
main {
    padding-top: 76px;
}

.home main {
    padding-top: 0;
}

/* The header is fixed/out of flow, so WordPress's block-gap margin lands
   on whatever follows it instead — zero it out so that element sits flush
   at the very top, behind the header. The <header> itself is wrapped by
   the template-part block, so target that wrapper's next sibling. */
.wp-site-blocks > .wp-block-template-part:first-child + * {
    margin-top: 0;
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: transparent;
    backdrop-filter: none;
    transition: background-color 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.is-scrolled::before {
    background: rgba(12, 8, 9, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

:root[data-theme="light"] .site-header.is-scrolled::before {
    background: rgba(247, 242, 234, 0.85);
}

.site-header.is-scrolled {
    box-shadow: 0 1px 0 rgba(244, 239, 232, 0.1);
}

:root[data-theme="light"] .site-header {
    color: #241a12;
}

.site-header__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 40px;
    width: 100%;
}

/* Override WordPress's default block-gap margin between Group block
   children so the grid's own `gap` and `align-items: center` control
   spacing instead. */
.site-header__inner > * {
    margin: 0;
}

.site-header__logo {
    flex-shrink: 0;
    margin: 0;
    justify-self: start;
}

.site-header__logo a {
    display: block;
}

.site-header__logo img {
    display: block;
    width: auto !important;
    height: 34px !important;
    max-width: 220px;
    object-fit: contain;
}

/* Placeholder shown until the client uploads a logo via
   Appearance > Editor > Site Identity. */
.site-header__logo:empty {
    display: flex;
    align-items: center;
    height: 34px;
}

.site-header__logo:empty::after {
    content: "Bougainvilla";
    font-family: "Forum", serif;
    font-size: 19px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #f4efe8;
}

:root[data-theme="light"] .site-header__logo:empty::after {
    color: #241a12;
}

.site-header__nav {
    display: flex;
    align-items: center;
    gap: 26px;
    justify-self: center;
    min-width: 0;
}

.site-header__nav::hover {
    font-weight: bolder;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-self: end;
    flex-shrink: 0;
}

.site-header__actions > * {
    margin: 0;
}

/* Navigation block: editable via Appearance > Editor > Navigation */

.site-header__nav .wp-block-navigation__container {
    display: flex;
    align-items: center;
    gap: 26px;
}

.site-header__nav .wp-block-navigation-item__content {
    font-family: "PlusJakartaSans", sans-serif;
    font-size: 1rem;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
    opacity: 0.92;
    transition: opacity 0.15s ease;
    padding: 0;
}

.site-header__nav .wp-block-navigation-item__content:hover {
    opacity: 1;
    color: inherit;
}

.site-header__nav .wp-block-navigation__responsive-container-open,
.site-header__nav .wp-block-navigation__responsive-container-close {
    color: inherit;
}

.site-header__theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
    flex-shrink: 0;
}

.site-header__theme-toggle svg {
    width: 18px;
    height: 18px;
}

.site-header__theme-toggle .icon-sun {
    display: none;
}

:root[data-theme="light"] .site-header__theme-toggle .icon-moon {
    display: none;
}

:root[data-theme="light"] .site-header__theme-toggle .icon-sun {
    display: block;
}

.site-header__reserve-wrap {
    flex-shrink: 0;
}

.site-header__reserve {
    flex-shrink: 0;
}

.site-header__reserve .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--header-maroon);
    color: #f4efe8;
    text-decoration: none;
    font-family: "PlusJakartaSans", sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 0.5rem;
    white-space: nowrap;
}

.site-header__reserve .wp-block-button__link::after {
    content: "";
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Crect x='2.5' y='4' width='15' height='13.5' rx='2' stroke='black' stroke-width='1.4'/%3E%3Cpath d='M2.5 8h15M6.5 2.5v3M13.5 2.5v3' stroke='black' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E")
        center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Crect x='2.5' y='4' width='15' height='13.5' rx='2' stroke='black' stroke-width='1.4'/%3E%3Cpath d='M2.5 8h15M6.5 2.5v3M13.5 2.5v3' stroke='black' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E")
        center / contain no-repeat;
}

/* The navigation block handles small screens itself via overlayMenu,
   swapping to a hamburger button below its own breakpoint (600px). */

/* The Reserve button lives inside the nav menu content itself (so it's
   editable in one place), but only shown once — inside the mobile overlay
   below 1200px, and as the separate header button at 1200px and up.

   1200px (not WordPress's default 600px) is used as the collapse point:
   with 7 nav links + logo + Reserve button, the inline row runs out of
   room around ~1100px, so 600px left a wrapped, broken header between
   600–1100px. This also overrides core's own hamburger-toggle breakpoint
   to match. */
.site-header__nav .site-header__nav-reserve {
    display: none !important;
}

@media (max-width: 1199px) {
    .site-header__nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
        display: flex !important;
    }

    .site-header__nav .wp-block-navigation__responsive-container:not(.is-menu-open) {
        display: none !important;
    }

    .site-header__actions .site-header__reserve-wrap {
        display: none;
    }

    .site-header__nav .site-header__nav-reserve {
        display: block !important;
        margin-top: 24px;
        padding-top: 24px;
        border-top: 1px solid rgba(244, 239, 232, 0.15);
    }

    .site-header__nav .site-header__nav-reserve .wp-block-button__link {
        width: 100%;
        justify-content: center;
    }

    /* Comfortable side padding and dark theming for the mobile menu overlay,
       which otherwise renders with WordPress's plain white default. */
    .site-header__nav .wp-block-navigation__responsive-container.is-menu-open {
        padding: 96px 28px 40px !important;
        background-color: #150c10 !important;
        color: #f4efe8 !important;
    }

    :root[data-theme="light"] .site-header__nav .wp-block-navigation__responsive-container.is-menu-open {
        background-color: #f7f2ea !important;
        color: #241a12 !important;
    }

    .site-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
        padding: 12px 0;
        font-size: 1.1rem;
    }

    .site-header__nav .wp-block-navigation__responsive-container-close {
        top: 32px;
        right: 28px;
    }
}

/* Footer */

.site-footer {
    --footer-gold: var(--site-gold);
    background: var(--site-bg);
    color: var(--site-text);
    padding: 100px 2rem 0;
    font-family: "PlusJakartaSans", sans-serif;
}

.site-footer__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 48px;
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 56px;
}

.site-footer__top > * {
    margin: 0;
}

.site-footer__brand {
    max-width: 420px;
}

.site-footer__brand > * {
    margin: 0;
}

.site-footer__logo {
    margin-bottom: 20px !important;
}

.site-footer__logo img {
    display: block;
    height: 36px !important;
    width: auto !important;
    max-width: 260px;
    object-fit: contain;
}

.site-footer__tagline {
    font-family: "Forum", serif;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--site-text-muted);
}

.site-footer__divider {
    max-width: 1400px;
    margin: 0 auto !important;
    border-top: 1px solid var(--site-border);
    opacity: 1;
}

.site-footer__columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 56px 0;
}

.site-footer__columns > * {
    margin: 0;
}

.site-footer__column > * {
    margin: 0;
}

.site-footer__heading {
    margin: 0 0 24px !important;
    font-family: "Forum", serif;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--site-text);
}

.site-footer__nav {
    display: block;
}

.site-footer__nav .wp-block-navigation__container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.site-footer__nav .wp-block-navigation-item__content {
    padding: 0;
    font-family: "PlusJakartaSans", sans-serif;
    font-size: 0.9rem;
    color: var(--site-text-muted);
    text-decoration: none;
}

.site-footer__nav .wp-block-navigation-item__content:hover {
    color: var(--footer-gold);
}

.site-footer__bottom-bar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 0;
}

@media (max-width: 900px) {
    .site-footer__columns {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 40px;
    }
}

@media (max-width: 560px) {
    .site-footer__columns {
        grid-template-columns: 1fr;
    }
}

/* About page */

.about-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 56px 2rem;
}

.about-panel {
    padding: 40px;
    border: 1px solid var(--site-border);
    background: var(--site-card-bg);
}

.about-panel p {
    margin: 0 0 16px;
    font-family: "Forum", serif;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--site-text-muted);
}

.about-panel p:last-child {
    margin-bottom: 0;
}

.about-panel--solid {
    background: var(--site-maroon);
    border-color: transparent;
}

.about-panel--solid p {
    color: rgba(244, 239, 232, 0.9);
}

.about-offers {
    padding: 56px 40px;
    border: 1px solid var(--site-border);
    background: var(--site-card-bg);
}

.about-offers__heading {
    margin: 0 0 32px;
    font-family: "Forum", serif;
    font-size: clamp(1.9rem, 3.5vw, 2.5rem);
    text-transform: uppercase;
    text-align: center;
    color: var(--site-text);
}

.about-offers ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.about-offers li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--site-text-muted);
}

.about-offers li::before {
    content: "";
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin-top: 4px;
    background-color: var(--site-gold);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8.5l3 3 7-7' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8.5l3 3 7-7' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.about-mission-mantra {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.about-mission-mantra .about-panel {
    margin: 0;
}

.about-mission-mantra strong {
    color: var(--site-gold);
    font-weight: 600;
}

@media (max-width: 800px) {
    .about-offers ul,
    .about-mission-mantra {
        grid-template-columns: 1fr;
    }
}

/* Contact page */

.contact-columns {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 2rem 72px;
    align-items: start;
}

.contact-info-card {
    padding: 36px;
    margin-bottom: 24px;
    border: 1px solid var(--site-border);
    background: var(--site-card-bg);
}

.contact-info-card .footer-info-list__heading {
    font-size: 1.1rem;
}

.contact-photo {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #1a1a1a;
}

.contact-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.85) 100%);
}

.contact-photo__caption {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    z-index: 1;
    color: #f4efe8;
}

.contact-photo__caption span {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--site-gold);
}

.contact-photo__caption p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.4;
    color: rgba(244, 239, 232, 0.85);
}

@media (max-width: 900px) {
    .contact-columns {
        grid-template-columns: 1fr;
    }
}
