/* Infinity Realty — custom styles layered on top of Tailwind's CDN utilities */

a { color: inherit; text-decoration: none; }

/* Scroll animations (AOS fade-left/right) start elements off-screen; never let that widen the page on phones */
html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }

.nav-link { position: relative; transition: color .15s ease; }
.nav-link:hover { color: #c9a45c; }

.dropdown { transform: translateY(-6px); opacity: 0; transition: opacity .18s ease, transform .18s ease; }
.group:hover .dropdown { opacity: 1; transform: translateY(0); }
.group .dropdown { display: block; pointer-events: none; }
.group:hover .dropdown { pointer-events: auto; }

#site-header.scrolled { box-shadow: 0 4px 24px rgba(20, 40, 30, 0.08); }

.btn-primary {
    display: inline-block;
    background: #c9a45c;
    color: #241d0f;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 13px 28px;
    border-radius: 2px;
    transition: background .15s ease, transform .15s ease;
}
.btn-primary:hover { background: #a9863f; transform: translateY(-1px); }

.btn-outline {
    display: inline-block;
    border: 1px solid rgba(250, 247, 241, 0.55);
    color: #faf7f1;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 13px 28px;
    border-radius: 2px;
    transition: background .15s ease;
}
.btn-outline:hover { background: rgba(250, 247, 241, 0.12); }

.btn-outline-dark {
    display: inline-block;
    border: 1px solid rgba(31, 61, 47, 0.35);
    color: #1f3d2f;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 13px 28px;
    border-radius: 2px;
    transition: background .15s ease;
}
.btn-outline-dark:hover { background: rgba(31, 61, 47, 0.06); }

.card { transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(20, 40, 30, 0.12); }

.form-input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid rgba(35, 41, 31, 0.18);
    border-radius: 2px;
    font-size: 14px;
    background: #fff;
    font-family: inherit;
}
.form-input:focus { outline: 2px solid #c9a45c; outline-offset: 1px; }

.social-icon {
    width: 36px; height: 36px;
    border: 1px solid rgba(250, 247, 241, 0.25);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #faf7f1;
    transition: background .15s ease, border-color .15s ease;
}
.social-icon:hover { background: rgba(250, 247, 241, 0.1); border-color: rgba(250, 247, 241, 0.5); }

/* Modal */
#enquiry-modal.is-open { display: block; }
#enquiry-modal .modal-panel {
    transform: translateY(16px) scale(0.98);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
}
#enquiry-modal.is-open .modal-panel { transform: translateY(0) scale(1); opacity: 1; }

/* Floating hero elements (driven by GSAP, gentle fallback via CSS if JS fails) */
.float-el { animation: floatY 6s ease-in-out infinite; }
.float-el.delay-1 { animation-delay: 1.2s; }
.float-el.delay-2 { animation-delay: 2.4s; }
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

@media (prefers-reduced-motion: reduce) {
    .float-el { animation: none; }
}

/* Process steps */
.process-track { position: relative; }
.process-track::before {
    content: '';
    position: absolute;
    top: 27px;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(201, 164, 92, 0.35);
    z-index: 0;
}
.process-node { position: relative; z-index: 1; }

/* FAQ accordion */
.faq-item { border-bottom: 1px solid rgba(35, 41, 31, 0.1); }
.faq-question {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 0;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-family: inherit;
}
.faq-icon { flex-shrink: 0; transition: transform .25s ease; }
.faq-item.is-open .faq-icon { transform: rotate(45deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}
.faq-item.is-open .faq-answer { max-height: 240px; }
.faq-answer-inner { padding-bottom: 22px; }

/* Foggy hero-to-section blend — sits at the bottom of a hero, bleeding into the section below */
.hero-fog {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -70px;
    height: 150px;
    pointer-events: none;
    z-index: 6;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 55%, black 100%);
    mask-image: linear-gradient(to bottom, transparent, black 55%, black 100%);
}
.hero-fog::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, var(--fog-color, #faf7f1) 85%);
}
@media (max-width: 640px) {
    .hero-fog { bottom: -40px; height: 100px; }
}

/* Plot types marquee */
.marquee { width: 100%; overflow: hidden; }
.marquee-track {
    display: flex;
    gap: 24px;
    width: max-content;
    padding: 0 24px;
    animation: marquee-scroll 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-card {
    flex: 0 0 260px;
    background: #faf7f1;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(20, 40, 30, 0.06);
}
@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .marquee-track { animation: none; }
}

/* Testimonial avatar */
.testimonial-avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #c9a45c;
    box-shadow: 0 4px 12px rgba(20, 40, 30, 0.15);
}
.avatar-circle {
    width: 46px; height: 46px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

/* Scroll-snap carousel (data-carousel) */
.carousel-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3 * 24px) / 4);
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-bottom: 6px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { scroll-snap-align: start; }
@media (max-width: 1023px) { .carousel-track { grid-auto-columns: calc((100% - 24px) / 2); } }
@media (max-width: 639px)  { .carousel-track { grid-auto-columns: 85%; } }
.carousel-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(31, 61, 47, 0.25);
    color: #1f3d2f;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease, opacity .15s ease;
}
.carousel-btn:hover { background: rgba(31, 61, 47, 0.06); }
.carousel-btn:disabled { opacity: 0.35; cursor: default; }
.carousel-dot {
    width: 8px; height: 8px;
    border-radius: 999px;
    background: rgba(31, 61, 47, 0.2);
    transition: width .2s ease, background .2s ease;
}
.carousel-dot.is-active { width: 24px; background: #c9a45c; }

/* Video testimonial play button */
.video-play span { transition: transform .2s ease; }
.video-play:hover span { transform: scale(1.08); }

/* Lazy images: soft shimmer until loaded, then fade in (see main.js) */
img.lazy {
    background: linear-gradient(100deg, rgba(31,61,47,0.06) 30%, rgba(31,61,47,0.12) 50%, rgba(31,61,47,0.06) 70%) 0 0 / 300% 100%;
    animation: lazy-shimmer 1.4s linear infinite;
    color: transparent;
}
img.lazy.is-loaded { animation: fade-in .45s ease both; background: none; }
@keyframes lazy-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { img.lazy, img.lazy.is-loaded { animation: none; } }

/* Gallery tile (media_tile() in includes/media.php) */
.media-tile {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 2px;
    background: rgba(31, 61, 47, 0.05);
}
.media-tile img { transition: transform .5s ease; }
.media-tile:hover img { transform: scale(1.04); }
.media-tile-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(15, 30, 23, 0.45);
    opacity: 0;
    transition: opacity .2s ease;
}
.media-tile:hover .media-tile-overlay,
.media-tile:focus-visible .media-tile-overlay { opacity: 1; }
.media-tile-overlay.is-video { opacity: 1; background: rgba(15, 30, 23, 0.22); }
.media-play {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(201, 164, 92, 0.95);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: transform .2s ease;
}
.media-tile:hover .media-play { transform: scale(1.08); }

/* Masonry: horizontal order via main.js; plain grid until it runs */
.masonry { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; align-items: start; }
@media (min-width: 768px)  { .masonry { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .masonry { grid-template-columns: repeat(4, 1fr); } }
.masonry.is-ready { display: block; position: relative; }
.masonry.is-ready .masonry-item { position: absolute; }

/* GLightbox: brand the controls */
.glightbox-clean .gslide-description { background: #16281f; }
.glightbox-clean .gslide-title { font-family: "Manrope", sans-serif; font-size: 13px; color: #faf7f1; margin: 0; }
.glightbox-clean .gnext, .glightbox-clean .gprev, .glightbox-clean .gclose { background-color: rgba(201, 164, 92, 0.9); }
.glightbox-clean .gnext path, .glightbox-clean .gprev path, .glightbox-clean .gclose path { fill: #16281f; }

/* Floating call + WhatsApp buttons (bottom-right) */
.float-contact {
    position: fixed;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    z-index: 60; /* above the header (50), below the enquiry modal (100) */
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.float-contact-btn {
    width: 54px; height: 54px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
    transition: transform .2s ease, box-shadow .2s ease;
}
.float-contact-btn:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28); }
.float-contact-btn.is-whatsapp { background: #25d366; color: #fff; }
.float-contact-btn.is-call { background: #c9a45c; color: #16281f; position: relative; }
.float-contact-btn.is-call::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 2px solid #c9a45c;
    animation: call-pulse 2s ease-out infinite;
}
@keyframes call-pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(1.6); opacity: 0; } }
@media (max-width: 640px) {
    .float-contact { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); gap: 10px; }
    .float-contact-btn { width: 50px; height: 50px; }
}
@media (prefers-reduced-motion: reduce) { .float-contact-btn.is-call::after { animation: none; } }
