/*
Theme Name: Servicasa
Author: WordPress Telex
Description: A luxury Mediterranean real estate theme with warm champagne tones, refined typography, and quiet confidence. Designed for premium property positioning in Mallorca and Ibiza.
Version: 0.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: servicasa
Tags: block-theme, full-site-editing, real-estate, luxury
*/

/* Gold decorative rule */
.gold-rule {
    display: block;
    width: 60px;
    height: 1px;
    background: var(--wp--preset--color--gold-bronze);
    border: none;
    margin: 0;
}

.gold-rule-center {
    margin-left: auto;
    margin-right: auto;
}

/* Equal cards layout */
.equal-cards > .wp-block-column {
    display: flex;
    flex-direction: column;
    flex-grow: 0;
}

.equal-cards > .wp-block-column > .wp-block-group {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.equal-cards .cta-bottom {
    margin-top: auto;
    justify-content: center;
}

/* Hero overlay */
.hero-cover .wp-block-cover__inner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 85vh;
    padding-top: 80px;
}

/* Property card image styling */
.property-card-image img {
    height: 400px;
    object-fit: cover;
    width: 100%;
    transition: transform 0.6s ease;
}

.property-card:hover .property-card-image img,
.property-card-light:hover .property-card-image img {
    transform: scale(1.04);
}

.property-card-image {
    overflow: hidden;
}

/* Light property cards (champagne background version) */
.property-card-light {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.property-card-light:hover {
    transform: translateY(-3px);
}

.property-cards-light .property-card-image img {
    height: 480px;
}

/* Property card text spacing refinements */
.property-cards-light .property-card-light .wp-block-group:not(.property-card-image) {
    padding-top: 1rem;
}

/* Subtle link underline animation */
.animated-underline a {
    position: relative;
    text-decoration: none;
}

.animated-underline a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--wp--preset--color--gold-bronze);
    transition: width 0.4s ease;
}

.animated-underline a:hover::after {
    width: 100%;
}

/* Navigation link styling */
.nav-links a {
    text-decoration: none;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--wp--preset--color--gold-bronze);
    transition: width 0.4s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Header nav link colors on frosted glass */
.site-header-nav .nav-links a {
    color: #2C2C2C;
}

.site-header-nav .nav-links a:hover {
    color: var(--wp--preset--color--gold-bronze);
}

/* Button styles */
.wp-block-button.is-style-outline-champagne .wp-block-button__link {
    border: 1px solid rgba(253, 252, 251, 0.4);
    color: var(--wp--preset--color--white);
    background: transparent;
    font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 1rem 2.4rem;
    transition: all 0.4s ease;
}

.wp-block-button.is-style-outline-champagne .wp-block-button__link:hover {
    border-color: var(--wp--preset--color--gold-bronze);
    color: var(--wp--preset--color--gold-bronze);
}

.wp-block-button.is-style-outline-gold .wp-block-button__link {
    border: 1px solid var(--wp--preset--color--gold-bronze);
    color: var(--wp--preset--color--gold-bronze-light);
    background: transparent;
    font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 1rem 2.4rem;
    transition: all 0.4s ease;
}

.wp-block-button.is-style-outline-gold .wp-block-button__link:hover {
    background: var(--wp--preset--color--gold-bronze);
    color: var(--wp--preset--color--white);
}

.wp-block-button.is-style-gold-filled .wp-block-button__link {
    background: var(--wp--preset--color--gold-bronze);
    color: var(--wp--preset--color--white);
    font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 1rem 2.4rem;
    border: 1px solid var(--wp--preset--color--gold-bronze);
    transition: all 0.4s ease;
}

.wp-block-button.is-style-gold-filled .wp-block-button__link:hover {
    background: var(--wp--preset--color--gold-bronze-light);
}

/* Section fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-section {
    animation: fadeInUp 0.8s ease-out both;
}

/* Scroll-triggered animation */
@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Testimonial quote styling */
.testimonial-quote {
    position: relative;
}

.testimonial-quote::before {
    content: '\201C';
    font-family: 'Newsreader', Georgia, serif;
    font-size: 5rem;
    color: var(--wp--preset--color--gold-bronze);
    opacity: 0.3;
    position: absolute;
    top: -2.5rem;
    left: -1rem;
    line-height: 1;
}

/* Services section hover effect */
.service-item {
    transition: transform 0.3s ease;
    cursor: default;
}

.service-item:hover {
    transform: translateY(-4px);
}

/* Footer styles */
.wp-site-blocks > footer {
    margin-block-start: 0;
}

/* Separator customizations */
.wp-block-separator.is-style-gold-thin {
    border-top: 1px solid var(--wp--preset--color--gold-bronze);
    opacity: 0.4;
}

/* Stats counter styling */
.stat-number {
    font-family: 'Newsreader', Georgia, serif;
    font-weight: 300;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Header frosted glass effect — sticky with high z-index */
.site-header-nav {
    background: rgba(250, 249, 248, 0.80) !important;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(115, 93, 61, 0.08);
    transition: background-color 0.5s ease;
}

/* Force the header template part wrapper to be sticky */
.wp-site-blocks > header,
.wp-site-blocks > .wp-block-template-part:first-child,
.wp-site-blocks > :first-child:has(.site-header-nav) {
    position: sticky !important;
    top: 0 !important;
    z-index: 999 !important;
}

/* Also target the inner group directly */
.site-header-nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 999 !important;
}

/* Cover block custom gradient overlay */
.hero-cover .wp-block-cover__background {
    background: linear-gradient(
        180deg,
        rgba(31, 31, 31, 0.25) 0%,
        rgba(31, 31, 31, 0.10) 30%,
        rgba(31, 31, 31, 0.15) 60%,
        rgba(31, 31, 31, 0.55) 100%
    ) !important;
}

/* Property price tag */
.property-price {
    font-family: 'Newsreader', Georgia, serif;
    letter-spacing: 0.05em;
}

/* About section image treatment */
.about-image img {
    filter: contrast(1.02) saturate(0.95);
}

/* Filosofia section layout */
.filosofia-section {
    min-height: 600px;
}

.filosofia-section > .wp-block-column:last-child {
    position: relative;
    overflow: hidden;
}

.filosofia-image {
    height: 100%;
    margin: 0;
}

.filosofia-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 500px;
}

@media (max-width: 781px) {
    .filosofia-section {
        min-height: auto;
    }

    .filosofia-image img {
        min-height: 350px;
    }
}

/* Vender page gallery strip */
.vender-gallery-strip .wp-block-column {
    overflow: hidden;
}

.vender-gallery-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 400px;
    transition: transform 0.6s ease;
}

.vender-gallery-strip .wp-block-column:hover img {
    transform: scale(1.04);
}

/* Search panel styles */
.search-panel-wrapper {
    position: relative;
    z-index: 10;
    margin-top: -1px;
}

.search-panel-inner {
    background: rgba(44, 44, 44, 0.88);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(115, 93, 61, 0.2);
}

.search-fields-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    flex-wrap: nowrap;
}

.search-fields-row > .wp-block-group {
    flex: 1;
    min-width: 0;
}

.search-field-item {
    padding: 1.2rem 1.4rem;
    border-right: 1px solid rgba(115, 93, 61, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    position: relative;
}

.search-field-item:last-child {
    border-right: none;
}

.search-field-label {
    font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--wp--preset--color--gold-bronze);
    margin: 0;
    line-height: 1.2;
}

.search-field-item select,
.search-field-item input[type="text"] {
    font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.85rem;
    color: rgba(253, 252, 251, 0.85);
    background: transparent;
    border: none;
    outline: none;
    letter-spacing: 0.03em;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    cursor: pointer;
}

.search-field-item select option {
    background: #2C2C2C;
    color: #E3D5CA;
}

.search-field-item input[type="text"]::placeholder {
    color: rgba(253, 252, 251, 0.55);
}

.search-field-item.has-arrow::after {
    content: '';
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--wp--preset--color--gold-bronze);
    pointer-events: none;
}

.search-actions-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    border-top: 1px solid rgba(115, 93, 61, 0.1);
}

.search-more-link {
    font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(253, 252, 251, 0.55);
    padding: 1rem 1.4rem;
    cursor: pointer;
    transition: color 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.search-more-link:hover {
    color: var(--wp--preset--color--gold-bronze);
}

.search-submit-btn {
    font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #FDFCFB;
    background: var(--wp--preset--color--gold-bronze);
    border: none;
    padding: 1.4rem 2.5rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.search-submit-btn:hover {
    background: var(--wp--preset--color--gold-bronze-light);
    color: #FDFCFB;
}

/* Hero search bar — white/light style */
.hero-search-bar {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

.hero-search-form {
    width: 100%;
}

.hero-search-fields {
    display: flex;
    align-items: stretch;
    background: #FFFFFF;
    border: 1px solid rgba(115, 93, 61, 0.25);
    overflow: hidden;
}

.hero-search-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.85rem 1.1rem;
    position: relative;
    min-width: 0;
}

.hero-search-field--select {
    cursor: pointer;
}

.hero-search-label {
    font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #735D3D;
    margin-bottom: 0.2rem;
    line-height: 1;
}

.hero-search-field select,
.hero-search-field input[type="text"] {
    font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: #2C2C2C;
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    padding: 0;
    line-height: 1.3;
}

.hero-search-field input[type="text"]::placeholder {
    color: rgba(44, 44, 44, 0.45);
}

.hero-search-field select option {
    background: #FFFFFF;
    color: #2C2C2C;
}

.hero-search-chevron {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.hero-search-divider {
    width: 1px;
    background: rgba(115, 93, 61, 0.18);
    align-self: stretch;
    flex-shrink: 0;
}

.hero-search-submit {
    flex-shrink: 0;
    padding: 0 2.2rem;
    background: #735D3D;
    color: #FDFCFB;
    font-family: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.hero-search-submit:hover {
    background: #8A7250;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .hero-search-fields {
        flex-wrap: wrap;
    }

    .hero-search-field {
        flex: 1 1 30%;
        min-width: 130px;
    }

    .hero-search-divider {
        display: none;
    }

    .hero-search-submit {
        flex: 1 1 100%;
        padding: 1rem 2rem;
    }
}

@media (max-width: 781px) {
    .hero-cover .wp-block-cover__inner-container {
        padding-top: 60px;
        min-height: 85vh;
    }

    .property-card-image img {
        height: 300px;
    }

    .property-cards-light .property-card-image img {
        height: 320px;
    }

    .hero-search-fields {
        flex-direction: column;
    }

    .hero-search-field {
        flex: 1 1 100%;
        border-bottom: 1px solid rgba(115, 93, 61, 0.12);
    }

    .hero-search-divider {
        display: none;
    }

    .hero-search-submit {
        padding: 1.1rem 2rem;
    }
}