/* ============================================
   SAILING TRIP — Croatia 2026
   ============================================ */

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

:root {
    --bg: #F2EFE9;
    --navy: #1A2535;
    --text: #2D3142;
    --text-light: #6B7280;
    --white: #FFFFFF;
    --border: rgba(26, 37, 53, 0.1);
    --shadow: 0 4px 20px rgba(26, 37, 53, 0.08);
    --shadow-hover: 0 10px 36px rgba(26, 37, 53, 0.14);
    --radius: 14px;
    --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   TOPBAR
   ============================================ */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: var(--navy);
}

.topbar-back {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: color 0.2s;
}

.topbar-back:hover { color: white; }

.topbar-title {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    font-weight: 500;
}

/* ============================================
   MAP SECTION
   ============================================ */

.map-section {
    padding: 2.5rem 1.5rem 2rem;
    max-width: 1080px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 1.25rem;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.2rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 0.85rem;
}

#sailing-map {
    width: 100%;
    height: 460px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}

.map-legend {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
}

.legend-item span {
    width: 22px;
    height: 4px;
    border-radius: 2px;
    display: block;
}

/* ============================================
   STICKY DAY NAV
   ============================================ */

.day-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(242, 239, 233, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 1.5rem;
}

.day-nav-inner {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    max-width: 1080px;
    margin: 0 auto;
}

.day-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    padding: 0.38rem 1rem;
    border-radius: 5px;
    transition: all 0.2s;
}

.day-nav a:hover {
    color: var(--navy);
    background: rgba(26,37,53,0.07);
}

.day-nav a.active {
    background: var(--navy);
    color: white;
}

/* ============================================
   DAY CARDS — scrollable list
   ============================================ */

.days-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 6rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.day-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.25s, box-shadow 0.25s;
}

.day-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.day-header {
    background: var(--day-color, var(--navy));
    padding: 1.75rem 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.day-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 55%);
    pointer-events: none;
}

.day-badge {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    padding: 0.22rem 0.8rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.day-route {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.day-route .arrow {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1.3rem;
    opacity: 0.55;
}

.day-meta-top {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.day-meta-top span {
    background: rgba(255,255,255,0.18);
    padding: 0.22rem 0.75rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* Body */
.day-body { padding: 2rem; }

.day-story p {
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.75;
}

.day-story p:last-child { margin-bottom: 0; }

/* Highlights */
.highlights {
    list-style: none;
    margin-top: 1.75rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.highlights li {
    font-size: 0.92rem;
    color: var(--text);
    padding-left: 0.75rem;
    position: relative;
}

.highlights li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--text-light);
}

/* Sightseeing */
.sightseeing {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.sightseeing h4 {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.85rem;
}

.link-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    display: inline-block;
    text-decoration: none;
    background: var(--bg);
    color: var(--navy);
    border: 1px solid var(--border);
    padding: 0.38rem 0.9rem;
    border-radius: 5px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.2s;
}

.chip:hover {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
}

/* ============================================
   PHOTO GALLERY
   ============================================ */

.photo-gallery {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.photos-coming {
    text-align: center;
    color: var(--text-light);
    padding: 2rem 1rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1.5px dashed var(--border);
    font-size: 0.88rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 0.6rem;
}

.gallery-grid a {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.gallery-grid a img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    transition: transform 0.3s;
    display: block;
}

.gallery-grid a:hover img { transform: scale(1.05); }

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: var(--navy);
    color: white;
    padding: 3rem 1.5rem;
    text-align: center;
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.footer-sub {
    opacity: 0.4;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.75rem;
}

.footer-back {
    display: inline-block;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.5rem 1.4rem;
    border-radius: 5px;
    transition: all 0.2s;
}

.footer-back:hover {
    color: white;
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.07);
}

/* ============================================
   BACK TO TOP
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--navy);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(26, 37, 53, 0.28);
    opacity: 0;
    transition: opacity 0.3s, transform 0.25s;
    pointer-events: none;
    z-index: 200;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover { transform: translateY(-3px); }

/* Map tooltip */
.map-tooltip {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 5px;
    border: none;
    padding: 0.4rem 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
    #sailing-map { height: 320px; }
    .day-route { font-size: 1.3rem; }
    .day-body { padding: 1.25rem; }
    .day-header { padding: 1.25rem; }
    .map-section { padding: 1.5rem 1rem 1.25rem; }
    .days-container { padding: 1.5rem 1rem 4rem; gap: 2rem; }
    .day-nav { padding: 0.5rem 1rem; }
    .topbar-title { display: none; }
}
