﻿/* Import elegant fonts from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Inter:wght@300;400;600&display=swap');
/* Babylonica moved to the site head for earlier loading and preconnect */

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    :root {
        --bg-fade-duration: 0ms;
        --btn-motion: 0ms;
    }
}

@media (prefers-reduced-motion: no-preference) {
    :root {
        --bg-fade-duration: 900ms;
        --btn-motion: 160ms;
    }
}

:root {
    --bg-fade-duration: 900ms;
    --btn-motion: 160ms;
    /* Base opacity for the background image (0.0 - 1.0) */
    --bg-base-opacity: 0.85;
    /* Default (neutral) button variables */
    --btn-bg: rgba(255,255,255,0.95);
    --btn-color: #1b1b1b;
    --btn-hover-bg: rgba(255,255,255,1);
    --btn-shadow: 0 6px 20px rgba(0,0,0,0.35);
    --btn-radius: 12px;
    --btn-focus-outline: rgba(255,255,255,0.18);
    /* hero title size: min, preferred (viewport), max */
    --hero-font-size: clamp(2.75rem, 7vw, 4.5rem);
}

/*
  Color scheme helpers. Apply one to the button element:
    - .btn-scheme-coral
    - .btn-scheme-teal
    - .btn-scheme-dark
  Example: <a class="btn-rect btn-scheme-coral" ...>
*/

.btn-scheme-coral {
    --btn-bg: #FF6B57; /* coral */
    --btn-color: #FFFFFF;
    --btn-hover-bg: #E85A47;
    --btn-shadow: 0 10px 30px rgba(232, 90, 71, 0.28);
    --btn-focus-outline: rgba(255, 107, 87, 0.28);
}

.btn-scheme-teal {
    --btn-bg: #1FB6B6; /* teal */
    --btn-color: #042028;
    --btn-hover-bg: #199999;
    --btn-shadow: 0 10px 30px rgba(31,182,182,0.22);
    --btn-focus-outline: rgba(31,182,182,0.22);
}

.btn-scheme-dark {
    --btn-bg: rgba(27,27,27,0.88); /* dark translucent */
    --btn-color: #FFFFFF;
    --btn-hover-bg: rgba(27,27,27,1);
    --btn-shadow: 0 10px 30px rgba(0,0,0,0.55);
    --btn-focus-outline: rgba(255,255,255,0.12);
}

/* Ensure the document fills the viewport */
html, body {
    height: 100%;
    margin: 0;
   /* font-family: 'Inter', "Segoe UI", system-ui, -apple-system, sans-serif;*/
    font-family: var(--bs-body-font-family);
}

/* Full-screen background image (behind all content) */
.full-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: url('/images/StockCake-Villa_de_lujo_en_la_montaña-1583577-standard.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    /* start hidden for fade-in */
    opacity: 0;
    transition: opacity var(--bg-fade-duration) ease-in-out;
    will-change: opacity;
}

    /* When visible use the configured base opacity (controls image opacity) */
    .full-background.visible {
        opacity: var(--bg-base-opacity);
    }

/* Optional dark overlay so foreground text remains readable */
.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
    opacity: 0;
    transition: opacity calc(var(--bg-fade-duration) * 0.9) ease-in-out;
}

    .bg-overlay.visible {
        opacity: 1;
    }

/* Page content sits above background */
.page-content {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    padding: 2rem;
}

    /* Use the variable for the hero heading */
    .page-content h1 {
        font-family: "Gadugi", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        font-weight: 400;
        font-style: normal;
        /* preserve line-height and keep letter spacing visually pleasing */
        line-height: 1.05;
        letter-spacing: 0.01em;
    }

    /* Smaller subtitle under the main heading */
    .subtitle {
        margin-top: 0.5rem;
        font-size: 1.25rem;
        font-weight: 400;
        opacity: 0.95;
        text-align: left;
    }

    /* --- Original square button kept for reference --- */
    .btn-square {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: clamp(110px, 26vw, 240px);
        aspect-ratio: 1 / 1;
        padding: 0.75rem;
        background: var(--btn-bg);
        color: var(--btn-color);
        font-weight: 600;
        border: none;
        border-radius: var(--btn-radius);
        box-shadow: var(--btn-shadow);
        text-decoration: none;
        cursor: pointer;
        transition: transform var(--btn-motion) ease, box-shadow var(--btn-motion) ease, background-color var(--btn-motion) ease;
        line-height: 1.05;
        font-size: clamp(.85rem, .95rem + .2vw, 1.05rem);
        margin-top: 1.25rem;
        user-select: none;
    }

    /* --- New: smaller rectangular button --- */
    .btn-rect {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 140px;
        height: 44px; /* compact, accessible touch target */
        padding: 0 18px; /* horizontal padding for label */
        background: var(--btn-bg);
        color: var(--btn-color);
        font-weight: 600;
        border: none;
        border-radius: 8px;
        box-shadow: var(--btn-shadow);
        text-decoration: none;
        cursor: pointer;
        transition: transform var(--btn-motion) ease, box-shadow var(--btn-motion) ease, background-color var(--btn-motion) ease, opacity var(--btn-motion) ease;
        line-height: 1;
        font-size: 0.95rem;
        margin-top: 1rem;
        user-select: none;
    }

        .btn-rect:hover,
        .btn-rect:focus-visible {
            transform: translateY(-3px);
            background: var(--btn-hover-bg);
            box-shadow: 0 10px 26px rgba(0,0,0,0.28);
        }

        .btn-rect:active {
            transform: translateY(-1px) scale(0.995);
        }

        .btn-rect:focus {
            outline: 3px solid var(--btn-focus-outline);
            outline-offset: 4px;
        }

        /* Keep caption readable; single-line preferred for rectangular button */
        .btn-rect .label {
            display: inline-block;
            padding: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

    .btn-square .label {
        display: block;
        padding: 0 0.5rem;
        word-break: break-word;
    }

@media (max-width: 992px) {
    .page-content h1 {
        font-size: clamp(2.5rem, 6.5vw, 3.75rem);
    }
}

@media (max-width: 768px) {
    .page-content h1 {
        font-size: clamp(2.25rem, 7.5vw, 3rem);
    }
}

@media (max-width: 420px) {
    .page-content h1 {
        font-size: clamp(2.2rem, 9vw, 2.9rem);
    }
}

@media (min-width: 1400px) {
    :root { --hero-font-size: clamp(3.5rem, 3.8vw, 5rem); }
}

/* -------------------------------------------------------------
   Instant Listing Alerts — styles added for alerts section/card
   ------------------------------------------------------------- */

/* Accessible visually-hidden helper used for form labels */
.visually-hidden {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
    border: 0;
    padding: 0;
    margin: -1px;
}

/* Section container — can be placed inside .page-content or as a standalone section */
.alerts-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.25rem;
    color: #fff;
}

/* Card with soft glass effect to stand above the background */
.alerts-card {
    width: min(980px, 100%);
    max-height: 360px;
    overflow: auto;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    border-radius: 14px;
    padding: 2rem;
    box-shadow: 0 12px 40px rgba(0,0,0,0.45);
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    border: 1px solid rgba(255,255,255,0.06);
    text-align: left;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.5rem 2rem;
    align-items: center;
}

    /* Headline + copy */
    .alerts-card h2 {
        margin: 0 0 0.5rem 0;
        font-family: 'Playfair Display', serif;
        font-size: 1.6rem;
        text-transform: none;
        color: #fff;
    }

    .alerts-card p {
        margin: 0 0 1rem 0;
        color: rgba(255,255,255,0.92);
        line-height: 1.4;
    }

    /* Form layout for quick email subscribe */
    .alerts-form {
        display: flex;
        gap: 0.75rem;
        align-items: center;
        margin-bottom: 0.25rem;
    }

    /* Input styling that matches the site's tone */
    .alerts-input {
        flex: 1 1 auto;
        min-width: 0;
        height: 44px;
        padding: 0 12px;
        border-radius: 10px;
        border: 1px solid rgba(255,255,255,0.12);
        background: rgba(255,255,255,0.06);
        color: #fff;
        font-size: 0.95rem;
        outline: none;
        transition: box-shadow .12s ease, border-color .12s ease, background-color .12s ease;
    }

        .alerts-input::placeholder {
            color: rgba(255,255,255,0.75);
        }

        .alerts-input:focus {
            box-shadow: 0 6px 20px rgba(31,182,182,0.08);
            border-color: rgba(31,182,182,0.42);
            background: rgba(255,255,255,0.04);
        }

    /* Right column: account CTA and notes */
    .alerts-side {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
        justify-content: center;
    }

    /* Secondary text / small print */
    .alerts-note {
        font-size: 0.875rem;
        color: rgba(255,255,255,0.78);
        margin-top: 0.5rem;
    }

    /* Tablet and small desktop: stack card into single column */
    @media (max-width: 880px) {
        .alerts-card {
            grid-template-columns: 1fr;
            padding: 1.25rem;
        }

        .alerts-form {
            flex-direction: column;
            align-items: stretch;
        }

        .alerts-input {
            width: 100%;
        }

        .alerts-side {
            flex-direction: row;
            gap: 0.5rem;
            justify-content: space-between;
            align-items: center;
        }

            .alerts-side .btn-rect {
                flex: 1 1 auto;
            }
    }

    /* Small phones: pin alerts to bottom and make controls full width */
    @media (max-width: 600px) {
      /* Make alerts stay in the document flow (no fixed positioning) to avoid overlap */
      .alerts-section {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        z-index: 10;
        margin: 0 12px 12px;
        pointer-events: auto;
        width: calc(100% - 24px);
        display: block;
      }

      /* Compact, vertically stacked card that does not scroll internally */
      .alerts-card {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.9rem;
        border-radius: 12px;
        width: 100%;
        max-width: 980px;
        box-shadow: 0 8px 30px rgba(0,0,0,0.45);
        background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
        backdrop-filter: blur(6px) saturate(120%);
        -webkit-backdrop-filter: blur(6px) saturate(120%);
        border: 1px solid rgba(255,255,255,0.06);
        overflow: visible;
        max-height: none;
        text-align: left;
      }

      .alerts-card h2 { font-size: 1.05rem; margin-bottom: 0.25rem; }
      .alerts-card p { font-size: 0.95rem; margin-bottom: 0.5rem; }
      .alerts-note { font-size: 0.82rem; margin-top: 0.25rem; }

      .alerts-form {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
        margin-bottom: 0;
      }

      .alerts-input {
        height: 44px;
        padding: 0 12px;
        width: 100%;
        box-sizing: border-box;
      }

      .alerts-side {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 0.25rem;
        align-items: stretch;
      }

      .alerts-side .btn-rect,
      .alerts-form .btn-rect {
        width: 100%;
        min-width: 0;
        justify-content: center;
      }

      /* Small protective bottom padding so hero doesn't butt up to the alerts card */
        .page-content {
            padding-bottom: 16px;
            min-height: 50vh;
        }
    }

    /* New page hero section styles */
    .page-hero {
        display: block;
        max-width: 980px;
        margin: 0 auto;
        margin-left: 1vw;
    }

    /* Utility class used on the Index h1 — keeps styling consistent and explicit */
.BabylonicaFont {
    font-family: "Gadugi", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    font-style: normal;
    /* preserve line-height and keep letter spacing visually pleasing */
    line-height: 1.05;
    letter-spacing: 0.01em;
}

/* ───── Mobile background adjustments ───── */
@media (max-width: 768px) {
    .full-background {
        background-position: center top;
        min-height: 100vh;
        min-height: 100dvh;
    }
}

@media (max-width: 480px) {
    .full-background {
        background-position: 50% 20%;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .full-background {
        background-position: center center;
    }
}