/*
 * Custom styles that complement Tailwind utilities.
 * Keep this file minimal — prefer Tailwind classes in templates.
 */

/* ── Hero entrance animations ── */
.rcf-hero-fade {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.rcf-hero-zoom {
    animation: heroZoom 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroZoom {
    from { transform: scale(1.1); }
    to   { transform: scale(1.05); }
}

/* ── Scroll reveal animations ── */
.rcf-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.rcf-reveal.rcf-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children inside grids */
.grid > .rcf-reveal:nth-child(2) { transition-delay: 0.1s; }
.grid > .rcf-reveal:nth-child(3) { transition-delay: 0.2s; }
.grid > .rcf-reveal:nth-child(4) { transition-delay: 0.3s; }
.grid > .rcf-reveal:nth-child(5) { transition-delay: 0.4s; }
.grid > .rcf-reveal:nth-child(6) { transition-delay: 0.5s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .rcf-hero-fade,
    .rcf-hero-zoom,
    .rcf-reveal {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ── Smooth page transitions ── */
.site-main {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Header scroll shadow (toggled via JS) ── */
#masthead.scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ── WordPress pagination styling ── */
.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-family: "Inter", sans-serif;
    color: #2c2c2c;
    border: 1px solid rgba(202, 209, 180, 0.3);
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.nav-links .page-numbers:hover {
    border-color: #628c80;
    color: #628c80;
}

.nav-links .page-numbers.current {
    background-color: #628c80;
    border-color: #628c80;
    color: #fff;
}

.nav-links .prev,
.nav-links .next {
    border: none;
    font-weight: 500;
    color: #628c80;
}

.nav-links .prev:hover,
.nav-links .next:hover {
    color: #0cc0df;
}

/* ── WordPress admin bar fix ── */
body.admin-bar #masthead.sticky {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar #masthead.sticky {
        top: 46px;
    }
}

/* ── Line clamp fallback ── */
.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;
}

/* ── Carousel ── */
.rcf-carousel-track {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.rcf-carousel-track::-webkit-scrollbar {
    display: none;
}

.rcf-carousel-slide {
    scroll-snap-align: start;
}

/* ── Filter toggle pill active state ── */
.rcf-toggle-pill {
    user-select: none;
    -webkit-user-select: none;
}

/* ── AJAX loading fade ── */
#rcf-grid .rcf-center-card {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ── Active filter tags ── */
.rcf-filter-tag {
    white-space: nowrap;
}

/* ── Archive results counter ── */
#rcf-result-count {
    min-height: 1.25rem;
}

/* ── Lightbox ── */
#rcf-lightbox {
    animation: lightboxIn 0.25s ease-out;
}

#rcf-lightbox.hidden {
    animation: none;
}

#rcf-lightbox img {
    animation: lightboxImgIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes lightboxIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes lightboxImgIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── Single center entry content ── */
.entry-content h2 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.5rem; margin-top: 2rem; margin-bottom: 0.75rem; color: #2c2c2c; }
.entry-content h3 { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.25rem; margin-top: 1.5rem; margin-bottom: 0.5rem; color: #2c2c2c; }
.entry-content p  { margin-bottom: 1rem; }
.entry-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.entry-content ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 1rem; }
.entry-content li { margin-bottom: 0.25rem; }
.entry-content a  { color: #628c80; text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { color: #0cc0df; }
.entry-content blockquote {
    border-left: 3px solid #0cc0df;
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: rgba(44, 44, 44, 0.7);
}

/* ── Reading progress bar ── */
#rcf-reading-progress {
    will-change: width;
    pointer-events: none;
}

/* ── Blog category nav scroll ── */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* ── Blog single drop cap (first letter) ── */
.entry-content > p:first-of-type::first-letter {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 3.5rem;
    font-weight: 600;
    float: left;
    line-height: 0.8;
    margin-right: 0.5rem;
    margin-top: 0.15rem;
    color: #628c80;
}

/* ── Blog image captions ── */
.entry-content .wp-caption {
    max-width: 100%;
    margin: 2rem 0;
}

.entry-content .wp-caption-text,
.entry-content figcaption {
    font-size: 0.75rem;
    color: rgba(44, 44, 44, 0.4);
    text-align: center;
    margin-top: 0.5rem;
}

/* ── Blog post images ── */
.entry-content img {
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.entry-content .alignwide {
    margin-left: -2rem;
    margin-right: -2rem;
    max-width: calc(100% + 4rem);
    width: calc(100% + 4rem);
}

@media (max-width: 640px) {
    .entry-content .alignwide {
        margin-left: -1rem;
        margin-right: -1rem;
        max-width: calc(100% + 2rem);
        width: calc(100% + 2rem);
    }
}

/* ── Inquiry Form ── */
.rcf-input:focus {
    box-shadow: 0 0 0 3px rgba(98, 140, 128, 0.1);
}

.rcf-field-error {
    display: block;
}

.rcf-field-error.hidden {
    display: none;
}

#rcf-form-success {
    animation: formSuccessIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes formSuccessIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Turnstile widget centering */
.cf-turnstile {
    display: flex;
}

.cf-turnstile iframe {
    border-radius: 0.5rem;
}

/* Form spinner animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 0.7s linear infinite;
}

/* ════════════════════════════════════════════════════
   PHASE 2 — SINGLE CENTER PREMIUM POLISH
   Section rhythm, breathing room, luxury micro-interactions
   ════════════════════════════════════════════════════ */

/* ── Section Rhythm — consistent vertical spacing ── */
.single-center section {
    scroll-margin-top: 5rem;
}

/* ── Gallery Mosaic — refined hover ── */
.rcf-gallery-open {
    transition: opacity 0.3s ease;
}
.rcf-gallery-open:hover {
    opacity: 0.92;
}
.rcf-gallery-open img {
    transition: transform 0.8s cubic-bezier(0.22,1,0.36,1);
}
.rcf-gallery-open:hover img {
    transform: scale(1.03);
}

/* ── Title Bar — editorial weight (scoped to main content, not site title) ── */
.single-center #content h1 {
    font-weight: 400;
    letter-spacing: -0.025em;
}

/* ── "At a Glance" Sidebar — refined shadow and spacing ── */
.single-center aside .bg-white {
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.03);
    border-radius: 1rem;
}
.single-center aside dl .flex {
    transition: background-color 0.2s ease;
}
.single-center aside dl .flex:hover {
    background-color: rgba(202,209,180,0.04);
}

/* ── Amenity Tags in Sidebar — hover ── */
.single-center aside .flex-wrap span {
    transition: all 0.25s ease;
}
.single-center aside .flex-wrap span:hover {
    background-color: rgba(98,140,128,0.1);
    color: #628c80;
}

/* ── Section Headers — eyebrow + heading pattern ── */
.single-center .font-serif {
    font-weight: 400;
}

/* ── Room Cards — subtle hover ── */
.single-center .bg-white.rounded-card {
    transition: box-shadow 0.4s cubic-bezier(0.22,1,0.36,1), transform 0.4s cubic-bezier(0.22,1,0.36,1);
}
.single-center .bg-white.rounded-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

/* ── CTA Section — refined hover state ── */
.single-center a[data-open-modal] {
    transition: all 0.4s cubic-bezier(0.22,1,0.36,1);
    position: relative;
    overflow: hidden;
}
.single-center a[data-open-modal]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(98,140,128,0.15);
}
.single-center a[data-open-modal]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.single-center a[data-open-modal]:hover::after {
    opacity: 1;
}

/* ── Map Section — rounded corners ── */
.single-center iframe {
    border-radius: 0.75rem;
}

/* ── Nearby Experience Cards — hover ── */
.single-center .bg-warm {
    transition: background-color 0.3s ease;
}

/* ── Lightbox — smoother ── */
#rcf-lightbox {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ── MOBILE: Single Center ── */
@media (max-width: 767px) {
    /* Tighter section padding on mobile */
    .single-center section > .max-w-content {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    /* Title font size */
    .single-center .site-main h1 {
        font-size: 2rem;
        line-height: 1.15;
    }

    /* Sidebar full width on mobile — breathing room */
    .single-center aside .bg-white {
        padding: 1.25rem;
    }

    /* Gallery "All photos" button */
    .single-center .rcf-gallery-open + .absolute {
        bottom: 1rem;
        right: 1rem;
    }

    /* Reduce grid gap on mobile for rooms */
    .single-center .grid.grid-cols-1 {
        gap: 1rem;
    }

    /* CTA button full width on mobile */
    .single-center a[data-open-modal] {
        width: 100%;
        justify-content: center;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ── TABLET: Single Center ── */
@media (min-width: 768px) and (max-width: 1023px) {
    .single-center .site-main h1 {
        font-size: 2.5rem;
    }
    .single-center section > .max-w-content {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

/* ════════════════════════════════════════════════════
   SHARED MICROINTERACTIONS
   ════════════════════════════════════════════════════ */

/* ── Focus ring — consistent accessible style ── */
*:focus-visible {
    outline: 2px solid #0cc0df;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Links in entry content — underline animation ── */
.entry-content a {
    text-decoration: none;
    background-image: linear-gradient(#628c80, #628c80);
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 100% 1px;
    transition: background-size 0.3s ease, color 0.3s ease;
}
.entry-content a:hover {
    background-size: 100% 2px;
    color: #0cc0df;
}

/* ── Buttons — refined press state ── */
button:active:not(:disabled),
a[data-open-modal]:active {
    transform: scale(0.98);
}

/* ── Images — subtle loading placeholder ── */
img[loading="lazy"] {
    background: linear-gradient(135deg, rgba(202,209,180,0.08) 0%, rgba(202,209,180,0.03) 100%);
}

/* ── Modal — refined entrance ── */
.rcf-modal-overlay.active .rcf-modal-container {
    animation: modalSlideUp 0.4s cubic-bezier(0.22,1,0.36,1);
}
@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Modal mobile refinements ── */
@media (max-width: 767px) {
    .rcf-modal-container {
        max-height: 92vh;
        margin: 4vh auto;
    }
    .rcf-modal-scroll {
        max-height: 85vh;
    }
    .rcf-modal-grid {
        gap: 0.75rem;
    }
    .rcf-modal-section {
        padding: 1rem 0;
    }
}
