/* ----------------------------------------------------
   CONTACT FORM — polished, modern, design-system aligned
---------------------------------------------------- */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    margin-top: var(--space-6);
    background: var(--color-white);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

/* Field wrapper */
.contact-form .field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* Labels */
.contact-form label {
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--color-text);
}

/* Inputs + textarea */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: var(--space-3) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--fs-base);
    background: var(--color-white);
    line-height: 1.4;
    resize: vertical;
}

/* Focus state */
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.15);
}

/* Submit button */
.contact-form button.btn {
    align-self: flex-start;
    padding: var(--space-3) var(--space-6);
    font-size: var(--fs-base);
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.contact-form button.btn:hover {
    background: var(--color-primary-dark);
    box-shadow: var(--shadow-medium);
}

/* Mobile refinement */
@media (max-width: 600px) {
    .contact-form {
        padding: var(--space-5);
    }
}
/* CONTACT FORM — inline icons */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    margin-top: var(--space-6);
    background: var(--color-white);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.contact-form .field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.contact-form label {
    font-weight: 600;
    font-size: var(--fs-sm);
}

.contact-form .input-wrap {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: var(--space-3);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.contact-form .textarea-wrap {
    align-items: flex-start;
}

.contact-form .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
}

.contact-form .icon svg {
    width: 18px !important;
    height: 18px !important;
    display: block;
}

.contact-form input,
.contact-form textarea {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 4px 0;
    background: transparent;
    font-size: var(--fs-base);
    line-height: 1.4;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border: none;
    box-shadow: none;
}
/* ----------------------------------------------------
   CONTACT FORM — success + error validation styling
---------------------------------------------------- */

/* Error state */
.contact-form .input-wrap.error {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.contact-form .input-wrap.error .icon svg {
    fill: var(--color-danger);
}

/* Success state */
.contact-form .input-wrap.success {
    border-color: var(--color-success);
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15);
}

.contact-form .input-wrap.success .icon svg {
    fill: var(--color-success);
}

/* Error message text */
.contact-form .error-message {
    color: var(--color-danger);
    font-size: var(--fs-sm);
    margin-top: 4px;
}

/* Success message text */
.contact-form .success-message {
    color: var(--color-success);
    font-size: var(--fs-sm);
    margin-top: 4px;
}
/* ----------------------------------------------------
   CONTACT FORM — subtle shake animation for errors
---------------------------------------------------- */

@keyframes subtle-shake {
    0%   { transform: translateX(0); }
    20%  { transform: translateX(-3px); }
    40%  { transform: translateX(3px); }
    60%  { transform: translateX(-2px); }
    80%  { transform: translateX(2px); }
    100% { transform: translateX(0); }
}

.contact-form .input-wrap.error {
    animation: subtle-shake 0.25s ease;
}
/* ----------------------------------------------------
   CONTACT FORM — fade-in animation for validation text
---------------------------------------------------- */

@keyframes fade-in-soft {
    from {
        opacity: 0;
        transform: translateY(-2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-form .error-message,
.contact-form .success-message {
    animation: fade-in-soft 0.25s ease-out;
}
/* ----------------------------------------------------
   HOMEPAGE HERO — unified, clean, modern, final version
---------------------------------------------------- */

/* Base hero container */
.homepage-hero {
    min-height: 60vh; /* adjust to 100vh if you want full-screen */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    position: relative; /* required for overlay */
    padding: 0 1.25rem; /* mobile-friendly default */
}

/* Readability overlay */
.homepage-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        rgba(0, 0, 0, 0.35),
        rgba(0, 0, 0, 0.45)
    );
    z-index: 1;
}

/* Ensure content sits above overlay */
.homepage-hero .container {
    position: relative;
    z-index: 2;
}

/* Force white text + subtle shadow */
.homepage-hero h1,
.homepage-hero p {
    color: var(--color-white);
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
    margin-left: auto;
    margin-right: auto;
}

/* H1 entrance animation */
.homepage-hero h1 {
    opacity: 0;
    transform: translateY(10px);
    animation: hero-title-fade 0.8s ease-out forwards;
    animation-delay: 0.1s;
}

@keyframes hero-title-fade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Subtitle entrance animation */
.homepage-hero p {
    opacity: 0;
    transform: translateY(12px);
    animation: hero-subtitle-fade 1s ease-out forwards;
    animation-delay: 0.35s;
}

@keyframes hero-subtitle-fade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop refinement */
@media (min-width: 900px) {
    .homepage-hero {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }

    .homepage-hero h1 {
        font-size: 3rem;
        line-height: 1.15;
        margin-bottom: 0.75rem;
    }

    .homepage-hero p {
        font-size: 1.4rem;
        max-width: 700px;
    }
}

/* Mobile refinement */
@media (max-width: 600px) {
    .homepage-hero h1 {
        font-size: 1.9rem;
        line-height: 1.25;
    }

    .homepage-hero p {
        font-size: 1.15rem;
        line-height: 1.45;
        margin-top: 0.5rem;
    }
}
/* Mobile hero adjustments */
@media (max-width: 768px) {
    .villa-hero {
        height: 280px; /* shorter, more natural on phones */
    }

    .villa-hero .container h1 {
        font-size: 1.8rem; /* reduce heading size */
        margin-bottom: 0.4rem;
    }

    .villa-hero .container p {
        font-size: 1rem; /* reduce subtitle size */
    }

    .back-to-villas {
        font-size: 0.85rem;
        padding: 0.35rem 0.7rem;
        margin-bottom: 0.8rem;
    }
}
/* Match home hero but with consistent height */
.villa-hero {
    height: 420px;
    position: relative;
    filter: brightness(1.15);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.05),
        rgba(0,0,0,0.25)
    );
    z-index: 1;
}



/* Ensure hero text sits above overlay */
.villa-hero .container {
    position: relative;
    z-index: 2;
}
.back-to-villas {
    display: inline-block;
    margin-bottom: 1.2rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255,255,255,0.85);
    color: #333;
    border-radius: 6px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s ease;
}

.back-to-villas:hover {
    background: rgba(255,255,255,1);
}

/* FIX — prevent global SVG rules from enlarging search icons */
.villa-search-form .icon svg {
    width: 20px;
    height: 20px;
}
.villa-search-form input[type="date"] {
    padding-left: 6px;
    padding-right: 6px;
    text-indent: 2px; /* keeps dd/mm/yyyy nicely spaced */
}
/* ----------------------------------------------------
   SEARCH FORM — premium horizontal pill design
---------------------------------------------------- */

/* Outer wrapper */
.villa-search-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--color-white);
    border-radius: 999px; /* pill shape */
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    transition: box-shadow 0.25s ease;
}

/* Hover micro-interaction */
.villa-search-form:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

/* Horizontal layout on desktop */
@media (min-width: 900px) {
    .villa-search-form {
        flex-direction: row;
        align-items: center;
        padding: 1.5rem 2rem;
    }

    .villa-search-form .field {
        flex: 1;
    }
}

/* Field wrapper */
.villa-search-form .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Input wrapper */
.villa-search-form .input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 999px; /* pill shape */
    background: var(--color-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Focus micro-interaction */
.villa-search-form .input-wrap:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.15);
}

/* Softer, modern icons */
.villa-search-form .icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--color-text-light);
    stroke-width: 1.6;
    fill: none;
    opacity: 0.75;
}

/* Inputs + selects */
.villa-search-form input,
.villa-search-form select {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: var(--fs-base);
    padding: 4px 0;
    line-height: 1.4;
}

.villa-search-form input:focus,
.villa-search-form select:focus {
    outline: none;
}

/* DATE INPUT — bring built-in calendar icon closer */
.villa-search-form input[type="date"] {
    padding-left: 6px;
    padding-right: 6px; /* moves the calendar icon left */
    text-indent: 2px;
}

/* Custom dropdown arrow */
.villa-search-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' stroke='%23999' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 24px; /* space for arrow */
}

/* Search button */
.villa-search-form .search-btn {
    padding: 12px 24px;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.villa-search-form .search-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.villa-search-form .search-btn:active {
    transform: translateY(0);
}
/* ============================
   VILLA LIST GRID
   ============================ */

.villa-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.2rem;
    margin-top: 2rem;
}

/* ============================
   PREMIUM VILLA CARD GRID
   ============================ */

.villa-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.4rem;
    margin-top: 2rem;
}



/* ============================
   IMAGE + OVERLAY
   ============================ */


.villa-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.0), rgba(0,0,0,0.35));
}

/* ============================
   FEATURED BADGE
   ============================ */

.villa-featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ffcc00;
    color: #000;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    z-index: 2;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

/
/* ============================
   ICON ROW
   ============================ */


.icon-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.villa-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-item {
    flex: 0 0 auto;
    width: 200px;          /* max width */
    height: 200px;         /* max height */
    overflow: hidden;
    border-radius: 10px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}
.masonry-gallery {
    column-count: 3;
    column-gap: 1rem;
}

@media (max-width: 768px) {
    .masonry-gallery {
        column-count: 1;
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    position: relative;
    cursor: pointer;
}

.masonry-item img,
.masonry-item video {
    width: 100%;
    border-radius: 10px;
    display: block;
    transition: transform 0.25s ease;
}

.masonry-item:hover img,
.masonry-item:hover video {
    transform: scale(1.05);
}

.gallery-caption {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: #666;
}

/* View full gallery button */
.view-full-gallery {
    display: inline-block;
    margin: 1rem auto 0;
    padding: 0.35rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    background: #ffffff;
    color: #003f73;
    border: 1px solid #cfd9e3;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-full-gallery:hover {
    background: #f3f7fb;
    border-color: #b8c7d6;
    color: #002f56;
}
.media-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.media-modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    text-align: center;
}

.media-modal-content img,
.media-modal-content video {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
}

.media-modal-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #fff;
    color: #333;
    font-size: 1.4rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50%;
    cursor: pointer;
}

.media-modal-caption {
    color: #fff;
    margin-top: 0.8rem;
    font-size: 1rem;
}
/* Availability Checker */
.villa-availability {
    margin-top: 3rem;
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.availability-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

#availability-result {
    font-weight: 600;
}

/* Booking Form */
.villa-booking {
    margin-top: 3rem;
    padding: 2rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.booking-form .form-row {
    display: flex;
    gap: 1rem;
}

.booking-form .form-group {
    margin-bottom: 1rem;
    flex: 1;
}

.booking-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.booking-form input,
.booking-form select,
.booking-form textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #cfd9e3;
    border-radius: 6px;
    font-size: 1rem;
}

.booking-submit {
    padding: 0.6rem 1.4rem;
    background: #003f73;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.booking-submit:hover {
    background: #002f56;
}

.booking-conditions {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #444;
}

@media (max-width: 768px) {
    .availability-form,
    .booking-form .form-row {
        flex-direction: column;
    }
}