/*
Theme Name: Ramz Al Fursan
Theme URI: https://ramzalfursan.com
Description: Luxury real estate theme for Ramz Al Fursan
Author: Ahmad Hassan
Version: 1.0.0
Text Domain: ramzalfursan
*/

/* ========================================
   WordPress + Base Overrides
   (All layout/component styles come from tailwind.css)
   ======================================== */

/* Apply Geist font globally */
body {
    font-family: 'Geist', 'Geist Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* WordPress admin bar offset for fixed header */
body.admin-bar .fixed { top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .fixed { top: 46px; }
}

/* WordPress block image fix */
.wp-block-image img { max-width: 100%; height: auto; }

/* Images reset */
img { max-width: 100%; height: auto; display: block; }

/* ========================================
   Mobile Menu Sheet (JS-controlled)
   ======================================== */

/* ========================================
   Search Tabs (JS-controlled active state)
   ======================================== */
.search-tab {
    padding: 8px 24px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
    transition: all 200ms;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #6b7280;
}

.search-tab:hover {
    color: #111827;
}

.search-tab.active {
    background: #fff !important;
    color: #111827 !important;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.05) !important;
}

/* ========================================
   FAQ Accordion (JS-controlled)
   ======================================== */
.faq-answer {
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.4s ease !important;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-question svg {
    transition: transform 300ms ease;
    flex-shrink: 0;
}

/* ========================================
   Premium Properties Slider (JS-controlled)
   ======================================== */
.premium-slider {
    position: relative !important;
    overflow: hidden !important;
}

.premium-slider-track {
    display: flex !important;
    gap: 16px;
    transition: transform 0.7s ease-out !important;
    padding: 32px 7.5vw;
    will-change: transform;
}

@media (min-width: 768px) {
    .premium-slider-track {
        gap: 16px;
        padding: 32px 25vw;
    }
}

.premium-slide {
    flex-shrink: 0 !important;
    width: 85vw;
    max-width: 800px;
    transition: opacity 0.7s ease-out, transform 0.7s ease-out !important;
    opacity: 0.5;
    transform: scale(0.9) !important;
}

@media (min-width: 768px) {
    .premium-slide {
        width: 50vw;
    }
}

.premium-slide.active {
    opacity: 1;
    transform: scale(1) !important;
}

.premium-slider-arrow {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%) !important;
    z-index: 20;
    padding: 12px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 9999px !important;
    border: none !important;
    cursor: pointer;
    color: #fff !important;
    transition: background 200ms;
}

@media (min-width: 768px) {
    .premium-slider-arrow { display: block; }
}

.premium-slider-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
}

.premium-slider-prev { left: 32px; }
.premium-slider-next { right: 32px; }

.premium-slider-dots {
    display: none;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

@media (min-width: 768px) {
    .premium-slider-dots { display: flex; }
}

.premium-slider-dot {
    height: 8px !important;
    border-radius: 9999px !important;
    border: none !important;
    cursor: pointer;
    transition: all 300ms;
    width: 8px !important;
    background: rgba(255, 255, 255, 0.4) !important;
    padding: 0 !important;
}

.premium-slider-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.premium-slider-dot.active {
    width: 32px;
    background: #fff;
}

/* Premium card overlay */
.premium-card {
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.premium-card-image {
    position: relative;
    aspect-ratio: 4/3;
    background: #f3f4f6;
}

@media (max-width: 767px) {
    .premium-card-image {
        aspect-ratio: 3/4;
    }
}

.premium-card-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms;
}

.premium-card:hover .premium-card-image img {
    transform: scale(1.05);
}

.premium-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 40%, transparent 70%);
}

.premium-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
}

@media (min-width: 768px) {
    .premium-card-content { padding: 24px; }
}

.premium-card-content > div {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 8px;
    padding: 16px;
}

.premium-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 5;
}

.premium-card-badge.sale {
    background: rgba(219, 234, 254, 0.9);
    color: #1d4ed8;
}

.premium-card-badge.rent {
    background: rgba(220, 252, 231, 0.9);
    color: #15803d;
}

.premium-card-badge.off-plan {
    background: rgba(243, 232, 255, 0.9);
    color: #7c3aed;
}

.premium-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.premium-card-location {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    margin-bottom: 8px;
}

.premium-card-meta {
    display: flex;
    gap: 12px;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    margin-bottom: 8px;
}

.premium-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.premium-card-price .premium-price-label {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    display: block;
}

.premium-card-price .premium-price-value {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

/* ========================================
   Marquee Animation
   ======================================== */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-track {
    display: flex !important;
    gap: 48px;
    animation: marquee 30s linear infinite !important;
    align-items: center;
}

.marquee-track img {
    height: 32px;
    width: auto;
    opacity: 0.8;
    filter: brightness(0) invert(1);
    transition: opacity 200ms;
    flex-shrink: 0;
    object-fit: contain;
}

@media (min-width: 768px) {
    .marquee-track img {
        height: 40px;
    }
}

.marquee-track img:hover {
    opacity: 1;
}

.marquee-track .dev-text {
    height: 32px;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 14px;
}

/* ========================================
   Purpose Toggle Buttons (JS-controlled)
   ======================================== */
.purpose-btn.active {
    background: #f3f4f6;
    border-color: #111827;
    color: #111827;
}

/* ========================================
   Fade-in Animation (JS IntersectionObserver)
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Scrollbar Hide (horizontal scroll sections)
   ======================================== */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* ========================================
   WordPress Image Sizing for Property Cards
   ======================================== */
.property-card-img-wrap img {
    position: absolute;
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    object-fit: cover;
    color: transparent;
}

/* ========================================
   Contact Form 7 - Theme Integration
   ======================================== */

/* Reset CF7 default wrapper styles */
.wpcf7 .wpcf7-form { margin: 0; padding: 0; }
.wpcf7 .wpcf7-form br { display: none; }
.wpcf7 .wpcf7-form p { margin: 0; }

/* Remove CF7 default spinner */
.wpcf7 .wpcf7-spinner { display: none; }

/* Submit button - CF7 wraps in <input type="submit"> */
.wpcf7 .wpcf7-form input[type="submit"] {
    border: none;
    appearance: none;
    -webkit-appearance: none;
}

/* CF7 validation error messages */
.wpcf7 .wpcf7-not-valid-tip {
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
    display: block;
}

/* CF7 response output messages - hidden by default, shown after submit */
.wpcf7 .wpcf7-response-output {
    display: none !important;
    margin: 12px 0 0;
    padding: 10px 16px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border: none !important;
}

.wpcf7 form.sent .wpcf7-response-output {
    display: block !important;
    background: #ecfdf5;
    color: #059669;
}

.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
    display: block !important;
    background: #fef2f2;
    color: #dc2626;
}

.wpcf7 form.invalid .wpcf7-response-output {
    display: block !important;
    background: #fffbeb;
    color: #d97706;
}

/* Ensure CF7 form elements take full width */
.wpcf7 .wpcf7-form-control-wrap { display: block; }

/* Select dropdown arrow fix */
.wpcf7 select.wpcf7-form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* CF7 form submitting state */
.wpcf7 form.submitting input[type="submit"] {
    opacity: 0.7;
    cursor: wait;
}

/* CF7 invalid field highlight */
.wpcf7 .wpcf7-not-valid {
    border-color: #dc2626 !important;
}

/* Ensure CF7 list-style doesn't leak */
.wpcf7 .wpcf7-form,
.wpcf7 .wpcf7-form p,
.wpcf7 .wpcf7-form div {
    list-style: none;
}
