/* ============================================================
   Avşa visitor portal — site-wide styles
   ------------------------------------------------------------
   Palette tuned for an island / seaside feel. Layout retained:
   15% left nav, 85% main content.
   ============================================================ */

:root {
    --c-aqua:        #0891b2;
    --c-aqua-deep:   #075985;
    --c-aqua-soft:   #e0f2fe;
    --c-sand:        #f7f3ec;
    --c-sand-deep:   #e9e1d2;
    --c-ink:         #0f172a;
    --c-muted:       #64748b;
    --c-border:      #e2e8f0;
    --c-surface:     #ffffff;
    --c-success-bg:  #ecfdf5;
    --c-success-fg:  #065f46;
    --c-success-bd:  #6ee7b7;
    --radius:        10px;
    --shadow-sm:     0 1px 2px rgba(15,23,42,0.05);
    --shadow-md:     0 4px 16px rgba(15,23,42,0.08);
}

* { box-sizing: border-box; }

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    color: var(--c-ink);
    background: var(--c-sand);
    line-height: 1.55;
}

a { color: var(--c-aqua-deep); }
a:hover { color: var(--c-aqua); }

.top-header {
    aspect-ratio: 1920 / 200;
    width: 100%;
    background: linear-gradient(135deg, var(--c-aqua-deep) 0%, var(--c-aqua) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.banner-slider {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
/* Image slides: stacked, cross-fade. The .is-active slide is visible. */
.banner-slider .banner-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    will-change: opacity;
}
.banner-slider .banner-image.is-active { opacity: 1; }
/* Text fallback (no images uploaded yet) */
.banner-slider .banner-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
@media (prefers-reduced-motion: reduce) {
    .banner-slider .banner-image { transition: none !important; }
}
/* Banner backgrounds are user-supplied photos, so white-on-image alone is
   unreliable. Wrap TR | EN in a translucent dark pill so the labels read
   over any image (light sky, bright sand, etc). */
.lang-switcher {
    position: absolute;
    top: 12px;
    right: 22px;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.55);
    padding: 4px 12px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.04em;
}
.lang-switcher a {
    color: #fff;
    text-decoration: none;
    opacity: 0.85;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.lang-switcher a.active { font-weight: 700; opacity: 1; text-decoration: underline; }
.lang-switcher a:hover { opacity: 1; color: #fff; }

.container { display: flex; flex: 1; overflow: hidden; }

.left-section {
    width: 15%;
    background: var(--c-surface);
    border-right: 1px solid var(--c-border);
    overflow-y: auto;
}
.left-section ul { list-style: none; padding: 0; margin: 0; }
.left-section li a {
    display: block;
    padding: 14px 18px;
    color: #334155;
    text-decoration: none;
    border-bottom: 1px solid var(--c-border);
    font-size: 14.5px;
    transition: background 0.15s, color 0.15s, padding-left 0.15s;
}
.left-section li a:hover { background: var(--c-aqua-soft); padding-left: 22px; }
.left-section li a.active {
    background: var(--c-aqua);
    color: #fff;
    font-weight: 600;
}
.left-section li a.active:hover { padding-left: 18px; }

/* Failsafe signal: when serving from the SQLite snapshot (Postgres down or
   MAINTENANCE_MODE on), the left-pane menu shifts to a black-and-white scheme
   (active item = black on white) — a deliberately low-key, admin-recognizable
   cue. Visitors notice nothing odd. */
.left-section.failsafe { background: #f4f4f4; }
.left-section.failsafe li a { color: #111111; }
.left-section.failsafe li a:hover { background: #e2e2e2; }
.left-section.failsafe li a.active { background: #111111; color: #ffffff; }

.main-section {
    width: 85%;
    padding: 26px 32px;
    overflow-y: auto;
    background: var(--c-sand);
}
.main-section h2 { font-size: 24px; margin: 0 0 18px 0; color: var(--c-ink); }

/* ---- Lodging list (search + table) ---- */
.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    background: var(--c-surface);
    padding: 16px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}
.filter-group { display: flex; flex-direction: column; font-size: 13px; }
.filter-group label { font-weight: 600; color: var(--c-muted); margin-bottom: 4px; font-size: 12px; }
.filter-group select,
.filter-group input {
    padding: 7px 10px;
    border: 1px solid var(--c-border);
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    color: var(--c-ink);
}
.search-form button {
    background: var(--c-aqua);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    align-self: end;
    transition: background 0.15s;
}
.search-form button:hover { background: var(--c-aqua-deep); }

.featured-heading {
    margin: 18px 0 10px 0;
    padding: 6px 14px;
    display: inline-block;
    font-size: 15px;
    font-weight: 700;
    color: var(--c-aqua-deep);
    background: var(--c-aqua-soft);
    border-left: 4px solid var(--c-aqua-deep);
    border-radius: 4px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hotel-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--c-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--c-border);
}
.hotel-table th,
.hotel-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--c-border); }
.hotel-table th {
    background: var(--c-sand-deep);
    color: var(--c-ink);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.hotel-table th a { color: inherit; text-decoration: none; }
.hotel-table tr:last-child td { border-bottom: none; }
.hotel-table tr:hover td { background: #fbf8f1; }
.lodging-thumb {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* ============================================================
   Hotel detail page components
   ============================================================ */

.hotel-page { max-width: 1100px; }

/* Banner shown at the top of /hotel/<id> when an admin opens the draft preview. */
.hp-preview-banner {
    background: linear-gradient(135deg, #92400e 0%, #b45309 100%);
    color: #fef3c7;
    border-radius: var(--radius);
    padding: 12px 18px;
    margin: 0 0 18px 0;
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-md);
}
.hp-preview-banner b { color: #fff; letter-spacing: 0.02em; }
.hp-preview-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245,158,11,0.25);
    flex-shrink: 0;
}

.hp-banner {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(135deg, var(--c-aqua-soft) 0%, var(--c-sand-deep) 100%);
    box-shadow: var(--shadow-md);
    margin-bottom: 22px;
}
.hp-banner-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.hp-banner-slide.hp-active { opacity: 1; }
.hp-banner-empty { display: none; }

.hp-hero {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: center;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
}
@media (max-width: 720px) { .hp-hero { grid-template-columns: 1fr; } }
.hp-cover img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    box-shadow: var(--shadow-sm);
}
.hp-hero-meta h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--c-ink);
    letter-spacing: -0.01em;
}
.hp-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin: 0 0 12px 0; }
.hp-meta-list { margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 18px; }
.hp-book-now {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: #2563eb;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--radius, 10px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}
.hp-book-now::before { content: "📅"; font-size: 16px; }
.hp-book-now:hover { background: #1d4ed8; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45); }
.hp-book-now:active { transform: translateY(0); }
@media (max-width: 560px) {
    .hp-book-now { margin-left: 0; width: 100%; justify-content: center; }
}
html { scroll-behavior: smooth; }
.hp-meta-list > div { display: flex; flex-direction: column; }
.hp-meta-list dt {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-muted);
}
.hp-meta-list dd { margin: 0; font-size: 15px; font-weight: 500; color: var(--c-ink); }
.hp-tagline { margin: 6px 0 0 0; color: #334155; font-size: 14.5px; line-height: 1.6; }

.hp-section { margin-bottom: 26px; }
.hp-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--c-ink);
    margin: 0 0 14px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--c-aqua-soft);
}

.hp-long-desc {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 20px 24px;
    color: #1e293b;
    font-size: 15px;
    line-height: 1.7;
    box-shadow: var(--shadow-sm);
}
.hp-long-desc p { margin: 0 0 10px 0; }
.hp-long-desc p:last-child { margin-bottom: 0; }
.hp-long-desc ul, .hp-long-desc ol { margin: 8px 0 12px 22px; padding: 0; }
.hp-long-desc h3, .hp-long-desc h4 { margin: 14px 0 6px 0; }
.hp-long-desc a { color: var(--c-aqua-deep); text-decoration: underline; }

.hp-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 720px) { .hp-two-col { grid-template-columns: 1fr; } }

.hp-card-block {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}
.hp-card-block h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-muted);
    margin: 0 0 12px 0;
}
.hp-fact-list { list-style: none; padding: 0; margin: 0; }
.hp-fact-list li {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px dashed var(--c-border);
    font-size: 13.5px;
    line-height: 1.3;
}
.hp-fact-list li:last-child { border-bottom: none; }
.hp-fact-list b { font-weight: 700; color: var(--c-aqua-deep); }

.hp-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
@media (max-width: 720px) { .hp-gallery { grid-template-columns: repeat(2, 1fr); } }
.hp-gallery img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-sm);
}
.hp-gallery img:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.hp-map {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-sm);
}

/* ---- Lightbox overlay (gallery) ---- */
.hp-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.hp-lightbox.open { display: flex; }
.hp-lightbox img {
    max-width: 88vw;
    max-height: 88vh;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    user-select: none;
}
.hp-lb-btn {
    position: absolute;
    background: rgba(255, 255, 255, 0.14);
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.1s;
}
.hp-lb-btn:hover { background: rgba(255, 255, 255, 0.28); }
.hp-lb-btn:active { transform: scale(0.94); }
.hp-lb-prev  { left: 24px;  top: 50%; transform: translateY(-50%); }
.hp-lb-next  { right: 24px; top: 50%; transform: translateY(-50%); }
.hp-lb-close { right: 24px; top: 24px; font-size: 32px; }
.hp-lb-prev:active { transform: translateY(-50%) scale(0.94); }
.hp-lb-next:active { transform: translateY(-50%) scale(0.94); }
@media (max-width: 720px) {
    .hp-lb-prev  { left: 8px; }
    .hp-lb-next  { right: 8px; }
    .hp-lb-close { right: 8px; top: 8px; }
    .hp-lb-btn   { width: 42px; height: 42px; font-size: 24px; }
}

/* ============================================================
   Reservation form (used on hotel page)
   ============================================================ */
.reservation-section { margin-top: 40px; }
.res-title { font-size: 22px; font-weight: 700; color: var(--c-ink); margin-bottom: 16px; }

.res-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: var(--shadow-md);
    max-width: 560px;
    border: 1px solid var(--c-border);
}
.res-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.res-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.res-field label { font-size: 13px; font-weight: 600; color: #374151; }
.res-field input[type="text"],
.res-field input[type="number"],
.res-field input[type="date"],
.res-field textarea {
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    background: #f9fafb;
    outline: none;
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.res-field input:focus,
.res-field textarea:focus {
    border-color: var(--c-aqua);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(8,145,178,0.12);
}
.res-field textarea { resize: vertical; }
.res-guest-fields { margin-bottom: 4px; }
.res-guest-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--c-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 10px 0;
}
.res-submit-btn {
    margin-top: 8px;
    padding: 11px 28px;
    background: var(--c-aqua);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    width: 100%;
}
.res-submit-btn:hover { background: var(--c-aqua-deep); }
.res-success-msg {
    margin-top: 16px;
    padding: 14px 18px;
    background: var(--c-success-bg);
    border: 1px solid var(--c-success-bd);
    border-radius: 6px;
    color: var(--c-success-fg);
    font-size: 14px;
}

/* ============================================================
   Contact form
   ============================================================ */
.contact-form .field { margin-bottom: 15px; display: flex; align-items: flex-start; }
.contact-form label { width: 150px; display: inline-block; font-weight: 600; padding-top: 8px; }
.contact-form input,
.contact-form textarea,
.contact-form select {
    /* --c-border (#e2e8f0) disappears against the cream page bg; use a
       darker slate so the field is actually visible. */
    border: 1px solid #94a3b8;
    padding: 9px 12px;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    flex: 1;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-form input:hover,
.contact-form textarea:hover,
.contact-form select:hover { border-color: #64748b; }
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--c-aqua-deep);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}
.contact-form button {
    padding: 10px 22px;
    background: var(--c-aqua);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.contact-form button:hover { background: var(--c-aqua-deep); }
