/* Elmar Mediterranean — site styles (mobile-first) */

:root {
    --blue: #2c5aa0;
    --blue-dark: #1e3d72;
    --mint: #a8e6cf;
    --mint-dark: #88b7a5;
    --text: #333;
    --line: #eee;
    --white: #fff;

    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);

    --header-h: 64px;
    --section-pad: clamp(2rem, 8vh, 6rem);
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---------- Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text);
    background: linear-gradient(180deg, #fff8ef 0%, #ffeede 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.25;
}
h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }

.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 1rem;
}

.section { padding-block: var(--section-pad); }

/* ---------- Animation ---------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
}
.fade-in { animation: fadeIn 0.8s ease-out both; }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-100%); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Header / navigation ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--header-h);
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-brand {
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--blue);
    white-space: nowrap;
}

/* Hamburger (mobile) — morphs into an X when open */
.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 3px;
    background: var(--blue);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.desktop-nav { display: none; }

.mobile-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 99;
    flex-direction: column;
    background: var(--white);
    overflow-y: auto;
    overscroll-behavior: contain;
    animation: slideIn 0.3s ease;
}
.mobile-nav:not([hidden]) { display: flex; }

.mobile-lang {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    border-bottom: 1px solid var(--line);
}
.mobile-lang a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1.1rem;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
}
.mobile-lang a.active { background: var(--blue); color: var(--white); }

.mobile-menu {
    display: flex;
    flex-direction: column;
    padding: 20px;
}
.mobile-menu a {
    padding: 15px;
    color: var(--text);
    font-size: 1.1rem;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition: all 0.3s;
}
.mobile-menu a:hover {
    background: #f5f5f5;
    color: var(--blue);
    padding-left: 25px;
}

body.nav-open { overflow: hidden; }

@media (min-width: 769px) {
    .navbar { padding: 1rem 2rem; }
    .nav-toggle, .mobile-nav { display: none !important; }

    .desktop-nav {
        display: flex;
        align-items: center;
        gap: 2rem;
    }

    .lang-selector { display: flex; gap: 0.5rem; }
    .lang-selector a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.4rem;
        height: 2.4rem;
        font-size: 1.5rem;
        text-decoration: none;
        border-radius: 50%;
        opacity: 0.7;
        transition: all 0.3s ease;
    }
    .lang-selector a.active,
    .lang-selector a:hover {
        opacity: 1;
        background: var(--blue);
        transform: scale(1.1);
    }

    .nav-menu {
        display: flex;
        gap: 2rem;
        list-style: none;
    }
    .nav-menu a {
        color: var(--text);
        text-decoration: none;
        transition: color 0.3s ease;
    }
    .nav-menu a:hover { color: var(--blue); }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .desktop-nav, .nav-menu { gap: 1.25rem; }
}

/* ---------- Buttons ---------- */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: var(--white);
    font: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(44, 90, 160, 0.3);
}
.cta-button.small { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
.cta-button.secondary { background: linear-gradient(135deg, var(--mint), var(--mint-dark)); }
.cta-button.secondary:hover { box-shadow: 0 8px 20px rgba(168, 230, 207, 0.3); }

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

@media (max-width: 480px) {
    .button-row .cta-button,
    .contact-form .cta-button { width: 100%; }
}

/* ---------- Welcome (home hero) ---------- */
.welcome-section {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    padding-block: clamp(3rem, 10vh, 8rem);
    text-align: center;
    color: var(--white);
    background: url("../images/corfu.jpg") center / cover no-repeat, #3d5f7a;
}
.welcome-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.44) 0%, rgba(0, 0, 0, 0.28) 45%, rgba(0, 0, 0, 0.4) 100%);
}
.welcome-section::after {
    content: "";
    position: absolute;
    inset: 12% 8%;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.08) 50%, rgba(0, 0, 0, 0) 78%);
    filter: blur(10px);
    pointer-events: none;
}
.welcome-section .container { position: relative; z-index: 1; }

.welcome-section h1,
.welcome-section h2,
.welcome-section p {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5), 0 4px 14px rgba(0, 0, 0, 0.25);
}
.welcome-section h2 { margin-top: 0.5rem; }

.welcome-text {
    max-width: 60ch;
    margin: 1rem auto 1.5rem;
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 2.2vw, 1.6rem);
    font-weight: 700;
    line-height: 1.5;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45), 0 6px 18px rgba(0, 0, 0, 0.22);
}
.welcome-text:empty { display: none; }
.welcome-text--multiline { white-space: pre-line; }

/* ---------- Properties ---------- */
.properties-section { position: relative; }
.properties-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
}
.properties-section .container { position: relative; }

.properties-grid,
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    margin-top: 2rem;
}

.property-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.property-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
}
.property-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: #e9e4dc;
    transition: transform 0.4s ease;
}
.property-card:hover .property-img { transform: scale(1.05); }

.property-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    gap: 0.5rem;
    padding: 1.5rem;
}
.property-info h3 { color: var(--blue); }
.property-info .cta-button { margin-top: auto; }

@media (hover: none) {
    .property-card:hover { transform: none; box-shadow: var(--shadow); }
    .property-card:hover .property-img { transform: none; }
}

/* ---------- Videos ---------- */
.video-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
}
.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- Why us (currently hidden) ---------- */
.features-list {
    list-style: none;
    max-width: 800px;
    margin: 2rem auto 0;
    display: grid;
    gap: 1rem;
}
.features-list li {
    padding: 1rem 1rem 1rem 2.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-sm);
    transition: background 0.3s ease;
}
.features-list li:hover { background: rgba(172, 230, 207, 0.9); }

/* ---------- Contact ---------- */
.contact-form {
    max-width: 500px;
    margin: 2rem auto 0;
}
.contact-page > .container > p { margin-top: 0.5rem; }

.form-group { margin-bottom: 1.5rem; }

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--blue);
}

input, select, textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    font: inherit;
    font-size: 16px; /* prevents iOS zoom on focus */
    color: var(--text);
    background-color: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
select {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%232c5aa0' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.alert {
    max-width: 500px;
    margin: 1.5rem auto 0;
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}
.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.contact-direct {
    padding: 0 1rem 2rem;
    text-align: center;
}
.contact-direct a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.contact-direct a:hover { text-decoration: underline; }

/* ---------- Property page ---------- */
.property-hero {
    position: relative;
    height: clamp(45vh, 60vw, 80vh);
    overflow: hidden;
    background: #e9e4dc;
}
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-overlay {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    padding: 1.25rem;
    color: var(--white);
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--radius);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.hero-overlay h1 { font-size: clamp(1.6rem, 5vw, 3.5rem); }
.hero-overlay p { margin-top: 0.5rem; }

@media (min-width: 769px) {
    .hero-overlay {
        left: 2rem;
        right: auto;
        bottom: 2rem;
        max-width: min(700px, calc(100% - 4rem));
        padding: 2rem;
    }
}

.property-full-description { margin-top: 1.5rem; max-width: 75ch; }
.property-full-description > * + * { margin-top: 1rem; }
.property-full-description h4 {
    margin-top: 1.75rem;
    font-size: 1.15rem;
    color: var(--blue);
}
.property-full-description ul { padding-left: 1.25rem; }
.property-full-description li + li { margin-top: 0.35rem; }

/* Map */
.map-wrapper {
    position: relative;
    display: block;
    margin-top: 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.map-wrapper iframe {
    display: block;
    width: 100%;
    height: 350px;
    border: 0;
    pointer-events: none;
}
.map-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 30px 10px 15px;
    color: var(--white);
    font-weight: 600;
    text-align: center;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    pointer-events: none;
}

/* Gallery grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}
.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: #e9e4dc;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
}
.gallery-item:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.gallery-thumb {
    width: 100%;
    aspect-ratio: 5 / 4;
    height: auto;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-item:hover .gallery-thumb { transform: scale(1.1); }

.thumbnail-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 2px 10px;
    color: var(--white);
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
}

@media (max-width: 600px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .thumbnail-badge { right: 6px; bottom: 6px; padding: 1px 7px; font-size: 0.8rem; }
    .gallery-item:hover, .gallery-item:hover .gallery-thumb { transform: none; }
}

/* Gallery modal (lightbox) */
.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    touch-action: pan-y pinch-zoom;
}
.gallery-modal[hidden] { display: none; }

.modal-content {
    max-width: 90%;
    max-height: 90%;
    margin: 0;
}
.modal-image {
    max-width: 100%;
    max-height: 80vh;
    max-height: 80dvh;
    margin-inline: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}
.modal-caption {
    padding: 10px;
    color: var(--white);
    text-align: center;
}

.modal-btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    color: var(--white);
    font-size: 2rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.2);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}
.modal-btn:hover { background: rgba(255, 255, 255, 0.4); }
.modal-close { top: 20px; right: 20px; }
.modal-prev, .modal-next { top: 50%; transform: translateY(-50%); }
.modal-prev { left: 20px; }
.modal-next { right: 20px; }

@media (max-width: 768px) {
    .modal-content { max-width: 100%; }
    .modal-image { max-height: 70vh; max-height: 70dvh; }
    .modal-btn { width: 44px; height: 44px; font-size: 1.5rem; }
    .modal-close { top: 12px; right: 12px; }
    .modal-prev { left: 8px; }
    .modal-next { right: 8px; }
    .modal-prev, .modal-next { top: auto; bottom: 16px; transform: none; }
}

/* ---------- Footer ---------- */
.site-footer {
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: 0.9rem;
}
.site-footer a { color: var(--blue); }

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
