/* --- Basic Styles --- */
html, body {
    height: 100lvh;
    margin: 0;
    padding: 0;
    background-color: #111111; /* MODIFIED: Fallback color */
    overflow: hidden; /* Prevent body scroll */
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #e0e0e0;
    line-height: 1.6;
    
    /* MODIFIED: Replaced animated gradient with static background image */
    background: url(bg.jpg) no-repeat center center fixed;
    background-size: cover;
}

/* MODIFIED: H2 styles removed */

/* --- SVG Filter (Hidden) --- */
svg { display: none; }

/* --- Glass Base Styles --- */
.glass-card, .glass-nav, .glass-button, .hero-header {
    --bg-color: rgba(0, 0, 0, 0.25);
    --highlight: rgba(255, 255, 255, 0.15);
    --text: #ffffff;
    
    position: relative;
    background: transparent;
    overflow: hidden;
    border-radius: 20px;
}
.glass-filter, .glass-overlay, .glass-specular, .glass-distortion-overlay {
    position: absolute;
    inset: 0;
    border-radius: inherit;
}
.glass-filter {
    z-index: 1;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    filter: url(#glass-distortion) saturate(120%) brightness(1.15);
}
.glass-overlay { z-index: 2; background: var(--bg-color); }
.glass-specular { z-index: 3; box-shadow: inset 1px 1px 1px var(--highlight); }
.glass-content { position: relative; z-index: 4; color: var(--text); }

.glass-distortion-overlay {
    background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.05) 0%, transparent 80%),
                radial-gradient(circle at 80% 70%, rgba(255,255,255,0.05) 0%, transparent 80%);
    background-size: 300% 300%;
    animation: floatDistort 10s infinite ease-in-out;
    mix-blend-mode: overlay;
    z-index: 2;
    pointer-events: none;
}
@keyframes floatDistort {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}
/* --- End Glass Base --- */


/* --- Header --- */
.hero-header {
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    margin: 0 20px 25px 20px;
}
.hero-header .glass-content {
    padding: 20px;
    padding-top: calc(20px + env(safe-area-inset-top)); /* iPhone safe area */
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.hero-header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0;
    white-space: nowrap;
}
.hero-header p {
    font-size: 1.1rem;
    margin: 5px 0 0 0;
    font-weight: 400;
    white-space: nowrap;
}

/* --- Swiping Container --- */
.section-swiper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    height: 100lvh;
    box-sizing: border-box;
}
.section-swiper::-webkit-scrollbar { display: none; }

.swiper-section {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    height: 100%; 
    padding-top: calc(20px + env(safe-area-inset-top)); /* MODIFIED: Default padding */
    padding-bottom: 95px; /* Space for bottom nav */
    box-sizing: border-box;
}
.swiper-section:first-child {
    padding-top: 20px; /* Itinerary has its own header */
}
.swiper-section::-webkit-scrollbar { display: none; }

/* --- Navigation Bar --- */
#main-nav {
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.3);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
}
#main-nav .glass-content { 
    padding: 10px; 
    padding-bottom: calc(10px + env(safe-area-inset-bottom)); /* iPhone safe area */
}
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-around;
    gap: 5px;
}
.nav-item {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.5rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    touch-action: manipulation; /* MODIFIED: Prevents double-tap zoom */
}
.nav-item:hover { background-color: rgba(255, 255, 255, 0.1); }
.nav-item.active { background-color: rgba(255, 255, 255, 0.2); }

/* --- Itinerary Card --- */
.timeline-item {
    margin: 0 20px 25px 20px;
}
.timeline-item .glass-content { padding: 0; }
.timeline-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
    display: block;
    /* MODIFIED: Add z-index to lift image above blur filters */
    position: relative;
    z-index: 5;
}
.timeline-item .date {
    font-size: 1rem;
    font-weight: 700;
    color: #BAE7FF;
    margin-bottom: 10px;
}
.timeline-item h3 {
    font-size: 1.5rem;
    margin: 0 0 15px 0;
    color: #FFBF00;
}
.timeline-item ul {
    list-style: none;
    margin: 10px 0 0 0;
    padding-left: 0;
}
.timeline-item li { margin-bottom: 8px; }
.timeline-item .glass-content > div:not(.alert),
.timeline-item .glass-content > ul,
.timeline-item .glass-content > h3 {
    padding: 0 25px;
}
.timeline-item .glass-content > .date { padding: 25px 25px 0 25px; }
.timeline-item .glass-content > ul { padding: 0 25px 25px 25px; }

/* Alert Box */
.alert {
    padding: 15px 25px;
    font-weight: 700;
    background-color: #C4C4C4;
    color: #121212;
    margin-top: 15px;
    border-radius: 0;
}

/* --- Booking Table Card --- */
.booking-table { margin: 0 20px 25px 20px; }
.booking-table .glass-content { 
    padding: 10px;
    overflow-x: auto;
}
.booking-table table { width: 100%; border-collapse: collapse; }
.booking-table th, .booking-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #444;
    white-space: nowrap;
}
.booking-table th {
    background-color: rgba(51, 51, 51, 0.5);
    color: white;
}
.booking-table tr:last-child td { border-bottom: none; }
.booking-table td strong {
    display: block;
    font-size: 0.9rem;
    color: #c0c0c0;
}

/* --- Calculator Card --- */
.rate-container { margin: 0 20px 25px 20px; }
.rate-container .glass-content {
    display: flex;
    gap: 20px;
    text-align: center;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.rate-item { flex: 1; }
.rate-item span { font-size: 1.1rem; color: #c0c0c0; }
.rate-item strong {
    /* MODIFIED: Removed 'display: block;' to keep rate on the same line */
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-left: 0.5em; /* Added a little space */
}

.calculator { margin: 0 20px; }
.calculator .glass-content { padding: 20px; }
.calc-screen {
    background: rgba(30, 30, 30, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 15px 20px;
    text-align: right;
    margin-bottom: 20px;
}
#calc-thb-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    min-height: 40px;
    word-break: break-all;
}
#calc-eur-display {
    font-size: 1.5rem;
    color: #c0c0c0;
    min-height: 25px;
    word-break: break-all;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}
.calc-btn {
    --bg-color: rgba(0, 0, 0, 0.25);
    --highlight: rgba(255, 255, 255, 0.15);
    --text: #ffffff;
    
    position: relative;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    background: transparent;
    transition: transform 0.2s ease;
    outline: none;
    aspect-ratio: 1 / 1;
    width: 100%;
    touch-action: manipulation; /* MODIFIED: Prevents double-tap zoom */
}
.calc-btn:hover { transform: scale(1.05); }
.calc-btn:active { transform: scale(0.95); }
.calc-btn .glass-filter, .calc-btn .glass-overlay, .calc-btn .glass-specular {
    position: absolute;
    inset: 0;
    border-radius: inherit;
}
.calc-btn .glass-filter {
    z-index: 1;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    filter: url(#glass-distortion) saturate(120%) brightness(1.15);
}
.calc-btn .glass-overlay { z-index: 2; background: var(--bg-color); }
.calc-btn .glass-specular { z-index: 3; box-shadow: inset 1px 1px 1px var(--highlight); }
.calc-btn .glass-content {
    position: relative;
    z-index: 4;
    color: var(--text);
    font-weight: 700;
    font-size: 2rem;
    /* MODIFIED: Replaced flexbox with grid for robust centering */
    display: grid;
    place-items: center;
    height: 100%;
    width: 100%;
}
.calc-btn.special {
    --bg-color: rgba(80, 80, 80, 0.3);
}
.calc-btn.special .glass-content { 
    font-size: 1.5rem;
    white-space: nowrap;
}
.calc-btn.wide {
    grid-column: 4 / 5;
    grid-row: 3 / 5;
    height: 100%;
    border-radius: 50px;
    aspect-ratio: auto;
}

/* --- Address & Info Card Styles --- */
.address-card, .info-card { 
    margin: 0 20px 25px 20px; 
    border-radius: 20px;
}
.address-card .glass-content, .info-card .glass-content { 
    padding: 25px 30px; 
}
.thai-address {
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
    line-height: 1.6;
}
.thai-address-small {
    font-size: 1.1rem;
    color: #e0e0e0;
    line-height: 1.6;
}
.address-note {
    font-size: 1.1rem;
    color: #c0c0c0;
    margin-top: 15px;
}
.address-note strong { color: #fff; }

.info-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.info-list li {
    font-size: 1.1rem;
    padding: 12px 0;
    border-bottom: 1px solid #444;
}
.info-list li:last-child {
    border-bottom: none;
}
.info-list li span {
    color: #c0c0c0;
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
}
.info-list li strong {
    white-space: nowrap;
}

.phrase-note {
    margin: 0 0 15px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #444;
    color: #c0c0c0;
}
.phrase-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}
.phrase-table td {
    padding: 12px 0;
    border-bottom: 1px solid #444;
}
.phrase-table tr:last-child td {
    border-bottom: none;
}
.phrase-table td:first-child {
    font-weight: 700;
    color: #fff;
}
.thai-phrase {
    font-size: 1.1rem;
    color: #e0e0e0;
}

/* --- Mobile Responsive Fixes --- */
@media screen and (max-width: 600px) {
    .hero-header h1 {
        font-size: 2.5rem;
        white-space: normal;
    }
    .hero-header p {
        font-size: 1.1rem;
        white-space: normal;
    }
    .nav-item {
        font-size: 1.2rem;
    }
    
    .swiper-section {
        padding-top: 20px; /* All sections get same top padding */
    }

    .rate-container .glass-content {
        /* MODIFIED: Now allows flex-direction: column but keeps text aligned */
        flex-direction: column;
    }
    .rate-item {
        width: 100%;
    }
    
    .phrase-table {
        display: block;
    }
    .phrase-table tr, .phrase-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    .phrase-table tr {
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 1px solid #444;
    }
    .phrase-table td {
        padding: 5px 0;
        border: none;
    }
    .phrase-table tr:last-child {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }
}