/* =========================================
   DÜĞÜN UYGULAMASI - SAGE GREEN / BOTANİK TEMA
   (Davetiye renk paletinden ilham alındı)
   ========================================= */
:root {
    /* Sage Green — Açık & Pastel Tonlar */
    --sage:       #8fa870;   /* Açık sage - daha nefes alan */
    --sage-light: #b5c99a;   /* Çok açık sage */
    --sage-dark:  #6b8050;   /* Koyu sage (hover vs.) */
    --sage-muted: #aabf90;

    /* Nötr — Çok Açık Krem (Davetiye kağıdı gibi) */
    --cream:      #f5f2ec;
    --warm-bg:    #f0ece4;
    --card-bg:    #fdfcf9;
    --border:     #e4dfd4;
    --text:       #2a2820;
    --text-muted: #9a9488;

    --font-heading: 'Playfair Display', serif;
    --font-body:    'Montserrat', sans-serif;

    --radius: 14px;
    --ease:   cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--warm-bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    /* Subtle grain texture via repeating-linear-gradient */
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(122,140,90,.07) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 20%, rgba(122,140,90,.05) 0%, transparent 45%);
}

/* ---------- CARD ---------- */
.container { width: 100%; max-width: 480px; }

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow:
        0 2px 4px rgba(0,0,0,.04),
        0 8px 24px rgba(0,0,0,.06),
        0 0 0 1px rgba(122,140,90,.15);
    overflow: hidden;
    animation: riseUp .7s var(--ease) both;
}

/* ---------- HEADER ---------- */
.header {
    background: linear-gradient(160deg, #3d4d28 0%, #4e6134 100%);
    padding: 44px 30px 36px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(122,140,90,.3) 0%, transparent 65%);
    pointer-events: none;
}

.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 18px;
}
.ornament-line {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sage-light));
}
.ornament-line.right {
    background: linear-gradient(90deg, var(--sage-light), transparent);
}
.ornament i { color: var(--sage-light); font-size: 1.1rem; }

.couple-names {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: -0.5px;
    line-height: 1.1;
}
.couple-names em { color: var(--sage-light); font-style: normal; }

.subtitle {
    margin-top: 10px;
    font-size: 0.72rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,.45);
    font-weight: 400;
}

/* ---------- ACCORDION ---------- */
.accordion { border-top: 1px solid var(--border); }

.acc-item { border-bottom: 1px solid var(--border); }

.acc-btn {
    width: 100%;
    background: transparent;
    border: none;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text);
    transition: color .3s var(--ease), background .3s var(--ease);
    text-align: left;
    gap: 12px;
}
.acc-btn:hover { color: var(--sage-dark); background: rgba(122,140,90,.05); }

.acc-btn-left { display: flex; align-items: center; gap: 14px; }

.acc-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--warm-bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    color: var(--sage);
    transition: background .3s var(--ease), border-color .3s var(--ease);
    flex-shrink: 0;
}

.acc-item.open .acc-btn { color: var(--sage-dark); }
.acc-item.open .acc-icon {
    background: var(--sage);
    border-color: var(--sage);
    color: #fff;
}

.chevron {
    color: var(--text-muted);
    font-size: .85rem;
    transition: transform .4s var(--ease);
    flex-shrink: 0;
}
.acc-item.open .chevron { transform: rotate(180deg); color: var(--sage); }

/* Left sage bar when open */
.acc-item.open .acc-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--sage);
    border-radius: 0 2px 2px 0;
}
.acc-item { position: relative; }

/* Accordion Content */
.acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .55s var(--ease), opacity .4s var(--ease);
    opacity: 0;
}
.acc-item.open .acc-body {
    max-height: 1200px;
    opacity: 1;
}

.acc-inner { padding: 4px 28px 28px; }

.section-desc {
    font-size: .82rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 20px;
}

/* ---------- SEARCH INPUT ---------- */
.search-wrap { position: relative; margin-bottom: 6px; }

.search-wrap i {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sage);
    font-size: .9rem;
}

input[type="text"] {
    width: 100%;
    padding: 12px 0 12px 22px;
    border: none;
    border-bottom: 1.5px solid var(--border);
    background: transparent;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    outline: none;
    transition: border-color .3s var(--ease);
}
input[type="text"]:focus { border-bottom-color: var(--sage); }
input[type="text"]::placeholder { color: #ccc; font-weight: 300; }

/* ---------- RESULTS ---------- */
.result-box { 
    margin-top: 10px; 
    background: var(--card-bg, #fff);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.clickable-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 0;
    border-bottom: 1px solid #f5f0e8;
    cursor: pointer;
    transition: padding-left .25s var(--ease), color .25s var(--ease);
    opacity: 0;
    animation: fadeSlide .3s var(--ease) forwards;
}
.clickable-result:last-child { border-bottom: none; }
.clickable-result:hover { padding-left: 8px; color: var(--sage-dark); }
.clickable-result strong { font-weight: 500; font-size: .95rem; }
.clickable-result i { color: var(--sage-muted); font-size: .8rem; }

@keyframes fadeSlide {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ---------- MAP / KROKI ---------- */
.welcome-box {
    background: var(--warm-bg);
    border-radius: var(--radius);
    padding: 18px 20px 14px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    text-align: center;
}
.welcome-box h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 4px;
}
.highlight-text { color: var(--sage-dark); font-weight: 600; }

.map-container {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #fefcf8;
}
.venue-blueprint { width: 100%; display: block; }

/* Ping */
.table-ping {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 24px; height: 24px;
    transition: top .6s var(--ease), left .6s var(--ease);
}
.ping-dot {
    width: 12px; height: 12px;
    background: var(--sage-dark);
    border-radius: 50%;
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 0 0 2px rgba(255,255,255,.8);
}
.ping-wave {
    width: 34px; height: 34px;
    background: rgba(122,140,90,.35);
    border-radius: 50%;
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: ping 2s infinite ease-out;
}
@keyframes ping {
    0%   { transform: translate(-50%,-50%) scale(.5); opacity: 1; }
    100% { transform: translate(-50%,-50%) scale(2.5); opacity: 0; }
}

/* Secondary btn */
.secondary-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: .78rem;
    cursor: pointer;
    margin-top: 10px;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .2s;
}
.secondary-btn:hover { color: var(--sage-dark); }

/* ---------- UPLOAD ---------- */
.hidden-input { display: none; }

.upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 38px 20px;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all .3s var(--ease);
    background: var(--warm-bg);
    color: var(--text-muted);
}
.upload-zone:hover {
    border-color: var(--sage);
    background: rgba(122,140,90,.05);
    color: var(--sage-dark);
}
.upload-zone i { font-size: 1.8rem; color: var(--sage); }
.upload-zone span { font-size: .9rem; font-weight: 500; }
.upload-zone small { font-size: .75rem; color: #ccc; }

/* Preview */
.preview-area { margin-top: 20px; }
.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.preview-item {
    position: relative;
    padding-top: 100%;
    background: #eee;
    border-radius: 8px;
    overflow: hidden;
}
.preview-item img, .preview-item video {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

/* Action buttons */
.btn-row { display: flex; gap: 10px; }
.btn-primary, .btn-ghost {
    flex: 1;
    padding: 13px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: .85rem;
    font-weight: 500;
    letter-spacing: .5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .25s var(--ease);
    border: none;
}
.btn-primary { background: var(--sage-dark); color: #fff; }
.btn-primary:hover { background: var(--sage); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-ghost:hover { border-color: #f00; color: #d32f2f; background: #fff5f5; }

/* Upload Status */
.upload-status {
    margin-top: 16px;
    padding: 14px;
    border-radius: 8px;
    font-size: .85rem;
    text-align: center;
    display: none;
}
.upload-status.success { background: #f0fff4; color: #276749; border: 1px solid #c3e6cb; display: block; }
.upload-status.error   { background: #fff5f5; color: #c62828; border: 1px solid #f5c6cb; display: block; }
.upload-status.loading { background: var(--warm-bg); color: var(--text-muted); border: 1px solid var(--border); display: block; }

/* ---------- FOOTER ---------- */
.footer {
    padding: 22px 28px;
    text-align: center;
    font-size: .72rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* ---------- UTILITY ---------- */
.hidden { display: none !important; }

@keyframes riseUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Stagger delays for search results */
.clickable-result:nth-child(1) { animation-delay: .05s; }
.clickable-result:nth-child(2) { animation-delay: .10s; }
.clickable-result:nth-child(3) { animation-delay: .15s; }
.clickable-result:nth-child(4) { animation-delay: .20s; }
.clickable-result:nth-child(5) { animation-delay: .25s; }
.clickable-result:nth-child(6) { animation-delay: .30s; }
.clickable-result:nth-child(7) { animation-delay: .35s; }
.clickable-result:nth-child(8) { animation-delay: .40s; }

/* ---------- TIMELINE ---------- */
.timeline {
    position: relative;
    padding: 15px 0;
    margin-top: 5px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 56px;
    top: 25px;
    bottom: 25px;
    width: 1px;
    background: var(--sage);
    opacity: 0.35;
}
.timeline-item {
    display: flex;
    align-items: stretch;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUpItem 0.5s var(--ease) forwards;
}
.timeline-item:nth-child(1) { animation-delay: 0.05s; }
.timeline-item:nth-child(2) { animation-delay: 0.15s; }
.timeline-item:nth-child(3) { animation-delay: 0.25s; }
.timeline-item:nth-child(4) { animation-delay: 0.35s; }
.timeline-item:nth-child(5) { animation-delay: 0.45s; }
.timeline-item:nth-child(6) { animation-delay: 0.55s; }
.timeline-item:last-child { margin-bottom: 0; }

@keyframes fadeUpItem {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.timeline-left-icon {
    width: 36px;
    text-align: right;
    font-size: 1.15rem;
    color: var(--sage-dark);
    margin-right: 16px;
    padding-top: 1px;
    flex-shrink: 0;
    opacity: 0.85;
}

.timeline-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1.5px solid var(--sage);
    margin-right: 20px;
    margin-top: 7px;
    flex-shrink: 0;
    z-index: 2;
    box-shadow: 0 0 0 5px var(--card-bg); /* Keeps the line away from the dot */
}

.timeline-content {
    flex-grow: 1;
}

.timeline-content .time {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}

.timeline-content .desc {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =========================================
   HARİTA (KROKİ) STİLLERİ
   ========================================= */
.map-container {
    margin-top: 30px;
    width: 100%;
    overflow-x: auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
}

.kroki-svg {
    width: 100%;
    min-width: 300px;
    height: auto;
    display: block;
}

.area-shape {
    fill: var(--cream);
    stroke: var(--sage-muted);
    stroke-width: 2;
}

.pist-shape {
    fill: transparent;
    stroke: var(--sage);
    stroke-dasharray: 6 6;
}

.area-text {
    font-family: var(--font-heading);
    font-size: 14px;
    fill: var(--text-muted);
    text-anchor: middle;
    letter-spacing: 1px;
}

.pist-text {
    font-size: 24px;
    fill: var(--sage);
    font-weight: bold;
}

.table-shape {
    fill: var(--sage-light);
    stroke: var(--sage);
    stroke-width: 2;
    transition: all 0.5s var(--ease);
}

.table-text {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: bold;
    fill: #ffffff;
    text-anchor: middle;
    pointer-events: none;
}

/* Vurgulanan Masa */
.table-active {
    fill: var(--sage-dark) !important;
    stroke: #ffffff !important;
    stroke-width: 4 !important;
    filter: drop-shadow(0 0 12px var(--sage));
    animation: pulseMap 2s infinite;
}

@keyframes pulseMap {
    0% { filter: drop-shadow(0 0 8px var(--sage)); }
    50% { filter: drop-shadow(0 0 20px var(--sage)); }
    100% { filter: drop-shadow(0 0 8px var(--sage)); }
}
