/**
 * Relaxing Holiday - Frontend Styles
 */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
    --brand: #dc2626;
    --brand-dark: #b91c1c;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f8fafc;
    --white: #ffffff;
    --danger: #b91c1c;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans TC', 'PingFang TC', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

main { min-height: 65vh; }

.section-title {
    margin: 0 0 24px;
    font-size: 30px;
    line-height: 1.2;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { border-color: var(--line); background: #fff; }
.btn-outline:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.logo img { height: 50px; width: auto; }

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 18px;
}

.main-nav a {
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.main-nav a.active,
.main-nav a:hover { color: var(--brand); }

.has-dropdown { position: relative; }
.has-dropdown .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    list-style: none;
    margin: 10px 0 0;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    display: none;
}

.has-dropdown:hover .dropdown { display: block; }
.dropdown li a { display: block; padding: 8px 10px; border-radius: 8px; }
.dropdown li a:hover { background: #f1f5f9; }

.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 13px;
    white-space: nowrap;
}
.lang-switcher a { color: #475569; font-weight: 600; }
.lang-switcher a.active,
.lang-switcher a:hover { color: var(--brand); }

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #334155;
}

/* Hero */
.hero-section { margin-bottom: 40px; }
.hero-slider { position: relative; overflow: hidden; }

.hero-slide {
    display: none;
    min-height: 520px;
    background-size: cover;
    background-position: center;
}
.hero-slide.active { display: block; }

.hero-overlay {
    min-height: 520px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.35), rgba(15, 23, 42, 0.55));
}

.hero-content {
    max-width: 680px;
    color: #fff;
    padding: 140px 0 90px;
}
.hero-content h1 { margin: 0 0 14px; font-size: 42px; line-height: 1.15; }
.hero-content p { margin: 0 0 22px; font-size: 18px; color: #e2e8f0; }

.hero-placeholder {
    background: linear-gradient(120deg, #0f766e, #0f172a);
    color: #fff;
    padding: 120px 0;
    text-align: center;
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}
.slider-prev { left: 16px; }
.slider-next { right: 16px; }

.slider-dots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.slider-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}
.slider-dots .dot.active { background: #fff; }

/* Common sections */
.section-destinations,
.section-tours,
.section-blog,
.section-destinations-list,
.section-tours-list,
.blog-section,
.about-section,
.contact-section {
    padding: 48px 0;
}

.page-hero,
.dest-hero,
.tour-hero {
    padding: 48px 0;
    background: #0f172a;
    color: #fff;
}

.tour-hero,
.dest-hero {
    background-size: cover;
    background-position: center;
    position: relative;
}

.page-hero h1,
.tour-hero h1,
.dest-hero h1 {
    margin: 8px 0 0;
    font-size: 36px;
}

.breadcrumb { color: #cbd5e1; font-size: 13px; }
.breadcrumb a:hover { text-decoration: underline; }

/* Cards / grids */
.destinations-grid,
.tours-grid,
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.destinations-grid-lg,
.blog-grid-lg { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.destination-card,
.tour-card,
.blog-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.destination-card:hover,
.tour-card:hover,
.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.card-image { position: relative; height: 220px; background: #e2e8f0 center / cover no-repeat; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-overlay { position: absolute; inset: 0; background: linear-gradient(transparent, rgba(0, 0, 0, 0.4)); }

.card-body { padding: 14px 14px 16px; }
.card-body h3 { margin: 0 0 6px; font-size: 20px; line-height: 1.3; }
.card-body p { margin: 0; color: var(--muted); font-size: 14px; }

.card-dest, .tour-count { color: var(--brand); font-weight: 600; }
.card-price strong { color: var(--text); }
.card-date { color: #94a3b8; margin-top: 8px; }

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}
.badge-hot { background: #dc2626; }
.badge-featured { left: auto; right: 10px; background: #f59e0b; }

.section-more { text-align: center; margin-top: 24px; }

/* Listing layout */
.tours-layout,
.contact-layout,
.tour-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
}

.blog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
}

.tours-main,
.tour-main,
.blog-main { min-width: 0; }

.tours-sidebar,
.tour-sidebar,
.blog-sidebar,
.contact-info,
.contact-form,
.sidebar-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
}

.tour-sidebar,
.blog-sidebar { display: flex; flex-direction: column; gap: 18px; }

.filter-group { margin-bottom: 14px; }
.filter-group label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted); }

/* Tour detail */
.tour-detail,
.dest-content,
.blog-detail { padding: 32px 16px 56px; }

.tour-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}
.tour-gallery img,
.tour-thumbnail,
.post-thumbnail { border-radius: 12px; width: 100%; object-fit: cover; }
.tour-thumbnail,
.post-thumbnail { max-height: 440px; margin-bottom: 20px; }

.tour-section {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 18px;
}

.tour-section h2,
.tour-section h3 { margin: 0 0 10px; }

.highlight-list,
.includes-list,
.excludes-list { margin: 0; padding-left: 20px; }

.itinerary-day {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    border-top: 1px dashed #d1d5db;
    padding-top: 12px;
    margin-top: 12px;
}
.itinerary-day:first-child { border-top: 0; margin-top: 0; padding-top: 0; }

.day-number { font-weight: 700; color: var(--brand); }
.day-content h4 { margin: 0 0 6px; }
.day-content p { margin: 0 0 6px; }
.day-meals, .day-hotel { color: var(--muted); font-size: 14px; }

.tour-includes-excludes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.price-box { text-align: center; }
.price-label, .price-per { color: var(--muted); margin: 0; }
.price-value { margin: 8px 0; font-size: 32px; font-weight: 800; color: var(--brand); }

.departures-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.departures-table th,
.departures-table td {
    text-align: left;
    border-bottom: 1px solid var(--line);
    padding: 8px 4px;
    vertical-align: top;
}
.status-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 3px 8px;
    font-weight: 700;
    font-size: 11px;
}
.status-available { background: #dcfce7; color: #166534; }
.status-limited { background: #fef3c7; color: #92400e; }
.status-full { background: #fee2e2; color: #991b1b; }

/* Blog detail */
.post-content {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.post-content p { margin: 0 0 12px; }
.post-content h2, .post-content h3 { margin-top: 20px; }
.post-content img,
.post-content video,
.post-content iframe,
.post-content table {
    max-width: 100%;
}
.post-content pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.related-post {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}
.related-post:last-child { border-bottom: 0; }
.related-post img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }

/* About / contact */
.about-content,
.dest-description {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px;
}

.contact-layout { grid-template-columns: 360px minmax(0, 1fr); }
.contact-item { margin-bottom: 14px; }
.contact-item strong { display: block; margin-bottom: 6px; }
.contact-item a { color: var(--brand); }

/* Forms */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
}
input:focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* Helpers */
.pagination {
    margin-top: 22px;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.pagination a {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #334155;
    background: #fff;
}
.pagination a.active,
.pagination a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

.no-results {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 18px;
    color: #64748b;
}

.alert {
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid transparent;
    margin-bottom: 12px;
}
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #166534; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: var(--danger); }

/* Footer */
.site-footer {
    margin-top: 48px;
    background: #0f172a;
    color: #e2e8f0;
    padding: 44px 0 18px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 20px;
}

.footer-logo { display: inline-block; margin-bottom: 12px; }
.footer-logo img {
    display: block;
    max-height: 50px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}
.footer-col h4 { margin: 0 0 10px; color: #fff; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 6px 0; }
.footer-col a { color: #cbd5e1; }
.footer-col a:hover { color: #fff; }

.social-links { display: flex; gap: 10px; margin-top: 10px; }
.social-links img { width: 22px; height: 22px; }
.social-links svg { width: 22px; height: 22px; display: block; }

.footer-bottom {
    margin-top: 26px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.28);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #94a3b8;
}

.footer-links { display: inline-flex; gap: 12px; }

.section-cta {
    padding: 44px 0;
    text-align: center;
    background: #ecfeff;
    border-top: 1px solid #bae6fd;
}
.section-cta h2 { margin-top: 0; margin-bottom: 14px; }

.about-banner {
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
}
.about-banner img {
    display: block;
    width: 100%;
    height: auto;
}

@media (max-width: 980px) {
    .main-nav {
        position: absolute;
        top: 73px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
        display: none;
        padding: 10px 16px 14px;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; align-items: flex-start; gap: 6px; }
    .has-dropdown .dropdown {
        position: static;
        display: block;
        box-shadow: none;
        border: 0;
        padding: 0;
        margin: 4px 0 0 12px;
    }
    .nav-toggle { display: block; }
    .lang-switcher { margin-left: auto; }

    .hero-slide,
    .hero-overlay { min-height: 400px; }
    .hero-content { padding: 90px 0 50px; }
    .hero-content h1 { font-size: 32px; }

    .destinations-grid,
    .tours-grid,
    .blog-grid,
    .destinations-grid-lg,
    .blog-grid-lg { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .tours-layout,
    .tour-layout,
    .blog-layout,
    .contact-layout { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .section-title { font-size: 26px; }
    .page-hero h1, .tour-hero h1, .dest-hero h1 { font-size: 28px; }
    .destinations-grid,
    .tours-grid,
    .blog-grid,
    .destinations-grid-lg,
    .blog-grid-lg { grid-template-columns: 1fr; }
    .tour-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tour-includes-excludes,
    .form-row { grid-template-columns: 1fr; }
    .itinerary-day { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}
