/* =========================================================
   SP Pool Thailand — home page
   Hero (3D water park), why-us cards, video, gallery,
   lightbox, about, contact.
   ========================================================= */

/* ---------- HERO ---------- */
.hero {
    height: 100svh; min-height: 620px; overflow: hidden;
    background: linear-gradient(180deg, #4aa6e6, #cdeefa 45%, #f1e2b8); /* shown until / if WebGL fails */
}
#hero-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse 55% 45% at 50% 50%, rgba(6, 40, 70, .42), rgba(6, 40, 70, 0) 70%);
}
.hero-content {
    position: absolute; inset: 0; z-index: 5; padding: 80px 16px 40px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    pointer-events: none;
}
.hero-content > * { pointer-events: auto; }
.hero h1 {
    color: #fff; font-size: clamp(44px, 8vw, 96px); font-weight: 700; line-height: 1.1; letter-spacing: -1px;
    text-shadow: 0 4px 30px rgba(6, 40, 70, .5);
}
.hero h1 span { color: var(--sun); }
.hero-lead { margin-top: 14px; color: #fff; font-size: clamp(18px, 2.4vw, 26px); text-shadow: 0 2px 14px rgba(6, 40, 70, .6); }
.hero .btn { margin-top: 30px; padding: 16px 32px; font-size: 18px; }
.scroll-hint {
    position: absolute; bottom: 92px; left: 50%; z-index: 5; width: 28px; height: 44px; margin-left: -14px;
    border: 2px solid rgba(255, 255, 255, .85); border-radius: 20px;
}
.scroll-hint::after {
    content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
    border-radius: 2px; background: #fff; animation: scroll-dot 1.8s ease-in-out infinite;
}
@keyframes scroll-dot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- WHY US ---------- */
.why { padding: 40px 0 110px; background: linear-gradient(180deg, #fff, var(--bg-water)); }
.why-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-card {
    position: relative; overflow: hidden; padding: 36px 30px; border-radius: var(--radius);
    background: #fff; border: 1px solid rgba(81, 165, 242, .18); box-shadow: var(--shadow);
    transition: transform .35s var(--ease), box-shadow .35s;
}
.why-card::before {
    content: ""; position: absolute; right: -70px; top: -70px; width: 200px; height: 200px; border-radius: 50%;
    background: radial-gradient(circle, rgba(46, 196, 214, .22), transparent 70%); transition: transform .5s;
}
.why-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }
.why-card:hover::before { transform: scale(1.4); }
.why-card .num { position: absolute; right: 26px; top: 20px; font-size: 44px; font-weight: 700; color: rgba(81, 165, 242, .13); }
.why-card h3 { margin-top: 22px; font-size: 22px; font-weight: 600; }
.why-card p { margin-top: 10px; color: var(--muted); font-weight: 300; line-height: 1.75; }

/* ---------- VIDEO (sky → sand band, as on the original site) ---------- */
.video {
    overflow: hidden; padding: 140px 0 160px; color: #fff;
    background: linear-gradient(180deg, #3d95d8 0%, #6aadde 45%, #a9d3c9 75%, #ecdf9c 100%);
}
.video-grid { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.video-frame {
    position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius);
    background: #000; border: 6px solid rgba(255, 255, 255, .6); box-shadow: 0 30px 70px rgba(6, 40, 70, .35);
}
.video-frame img, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-play {
    position: absolute; inset: 0; display: grid; place-items: center; border: 0; cursor: pointer;
    background: linear-gradient(180deg, rgba(6, 40, 70, 0), rgba(6, 40, 70, .35));
}
.video-play span {
    width: 88px; height: 88px; display: grid; place-items: center; border-radius: 50%;
    background: var(--sun); color: var(--ink); transition: transform .25s;
    animation: play-pulse 2s infinite;
}
.video-play svg { width: 30px; height: 30px; margin-left: 5px; }
.video-play:hover span { transform: scale(1.1); }
@keyframes play-pulse {
    0% { box-shadow: 0 0 0 0 rgba(250, 224, 86, .7); }
    70%, 100% { box-shadow: 0 0 0 26px rgba(250, 224, 86, 0); }
}
.video .tag { color: #fff; background: rgba(255, 255, 255, .2); }
.video h2 { text-shadow: 0 2px 16px rgba(6, 40, 70, .25); }
.video p { margin-top: 16px; font-size: 17px; font-weight: 300; line-height: 1.8; text-shadow: 0 1px 8px rgba(6, 40, 70, .3); }
.video .btn { margin-top: 28px; }

/* ---------- GALLERY ---------- */
.gallery { padding: 60px 0 130px; }
.gallery-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: -16px 0 32px; }
.gallery-filters button {
    padding: 10px 20px; border-radius: 999px; cursor: pointer;
    font-size: 15px; font-weight: 500; color: var(--brand-blue);
    background: #fff; border: 2px solid rgba(47, 127, 196, .2); transition: background .2s, color .2s, border-color .2s;
}
.gallery-filters button:hover { border-color: var(--brand-blue); }
.gallery-filters button[aria-pressed="true"] { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }

.gallery-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; grid-auto-flow: dense; gap: 14px;
}
.gallery-item { position: relative; overflow: hidden; border-radius: var(--radius-sm); background: #e6f4fb; }
.gallery-item.is-p { grid-row: span 2; }
.gallery-item.is-feature { grid-column: span 2; grid-row: span 2; }
.gallery-item[hidden] { display: none; }
.gallery-item a { display: block; width: 100%; height: 100%; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery-item figcaption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px;
    color: #fff; font-size: 15px; font-weight: 500;
    background: linear-gradient(180deg, transparent, rgba(6, 40, 70, .75));
    transform: translateY(100%); transition: transform .35s var(--ease); pointer-events: none;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item:hover figcaption, .gallery-item a:focus-visible + figcaption { transform: none; }
.gallery-more { margin-top: 36px; text-align: center; }

/* lightbox */
.lightbox {
    position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
    background: rgba(4, 26, 44, .94); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox figure { text-align: center; }
.lightbox img { max-width: min(1100px, 92vw); max-height: 78vh; margin: 0 auto; border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lightbox figcaption { margin-top: 14px; color: #fff; font-size: 16px; }
.lightbox button {
    position: absolute; width: 54px; height: 54px; border: 0; border-radius: 50%; cursor: pointer;
    background: rgba(255, 255, 255, .15); color: #fff; font-size: 30px; line-height: 1;
}
.lightbox button:hover { background: rgba(255, 255, 255, .3); }
.lb-close { top: 20px; right: 20px; }
.lb-prev, .lb-next { top: 50%; margin-top: -27px; }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-count { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .8); font-size: 14px; }

/* ---------- ABOUT (underwater) ---------- */
.about {
    overflow: hidden; padding: 150px 0 160px; color: #fff;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(46, 196, 214, .55), transparent 60%),
        linear-gradient(180deg, #1b86c4 0%, var(--deep) 100%);
}
.about::before {
    content: ""; position: absolute; inset: 0; opacity: .22; pointer-events: none;
    background:
        repeating-radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .5) 0 2px, transparent 3px 60px),
        repeating-radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .35) 0 2px, transparent 3px 80px);
    animation: shimmer 14s linear infinite alternate;
}
@keyframes shimmer { to { transform: translate(-40px, 30px) scale(1.08); } }
.about-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about .tag { color: var(--sun); background: rgba(250, 224, 86, .15); }
.about h3 { margin-top: 24px; font-size: 22px; font-weight: 600; color: var(--sun); }
.about p { margin-top: 12px; font-size: 17px; font-weight: 300; line-height: 1.9; color: rgba(255, 255, 255, .92); }
.highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hl-card {
    padding: 24px; border-radius: 22px;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    transition: background .3s;
}
.hl-card:hover { background: rgba(255, 255, 255, .16); }
.hl-card:nth-child(even) { margin-top: 28px; margin-bottom: -28px; }
.hl-card .ic { width: 52px; height: 52px; border-radius: 16px; color: var(--ink); background: linear-gradient(135deg, var(--sun), var(--sun-dark)); box-shadow: 0 10px 24px rgba(250, 224, 86, .3); }
.hl-card .ic svg { width: 26px; height: 26px; }
.hl-card strong { display: block; margin-top: 14px; font-size: 18px; font-weight: 600; }
.hl-card span { display: block; margin-top: 4px; font-size: 14px; font-weight: 300; color: rgba(255, 255, 255, .8); }

/* ---------- CONTACT ---------- */
.contact { padding: 60px 0 80px; background: linear-gradient(180deg, #fff, var(--sand-soft)); }
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: stretch; }
.map { position: relative; min-height: 460px; overflow: hidden; border-radius: var(--radius); background: #e6f4fb; box-shadow: var(--shadow); }
.map iframe { width: 100%; height: 100%; min-height: 460px; border: 0; }
.map .btn { position: absolute; left: 16px; top: 16px; padding: 12px 20px; font-size: 15px; }
.contact-card {
    position: relative; overflow: hidden; padding: 90px 36px 40px; border-radius: var(--radius);
    color: #fff; text-align: center;
    background: linear-gradient(180deg, #3d95d8 0%, #6aadde 50%, #e7d98f 100%);
    box-shadow: 0 30px 70px rgba(47, 127, 196, .3);
}
.contact-card .wave-in { position: absolute; top: 0; left: 0; width: 100%; height: 70px; fill: #fff; }
.contact-card h3 { font-size: 28px; font-weight: 600; text-shadow: 0 2px 12px rgba(6, 40, 70, .25); }
.phones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.phones a {
    display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 10px; border-radius: 16px;
    font-size: 18px; font-weight: 600; color: var(--ink); text-decoration: none;
    background: rgba(255, 255, 255, .9); transition: transform .2s, background .2s;
}
.phones a:hover { transform: translateY(-3px); background: #fff; }
.phones svg { width: 16px; height: 16px; color: var(--brand-blue); }
.contact-card .btn-line { margin-top: 26px; }
.socials { display: flex; justify-content: center; gap: 14px; margin-top: 28px; }
.socials a { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; color: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .18); transition: transform .2s; }
.socials a:hover { transform: translateY(-4px) scale(1.05); }
.socials svg { width: 26px; height: 26px; }
.socials .fb { background: #1877f2; }
.socials .ln { background: var(--line-green); }
.socials .yt { background: #ff0000; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
    .why-cards { grid-template-columns: 1fr; }
    .video-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
    .video { padding: 110px 0 130px; text-align: center; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
    .hl-card:nth-child(even) { margin: 0; }
    .map, .map iframe { min-height: 340px; }
}
@media (max-width: 520px) {
    .highlights, .phones { grid-template-columns: 1fr; }
    .contact-card { padding: 80px 20px 32px; }
    .lb-prev, .lb-next { top: auto; bottom: 12px; margin: 0; }
}
