/* =========================================================
   GLOBAL RESET & BASE
========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'Poppins', sans-serif;
    background: #00121f;
    color: white;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

.section-title {
    text-align: center;
    font-size: 38px;
    margin-bottom: 40px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* =========================================================
   HEADER
========================================================= */
.bd-header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    padding: 25px 50px;
    background: rgba(0, 15, 30, 0.45);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 50;
}

.bd-header .logo {
    font-size: 26px;
    font-weight: 600;
    color: #00A7CC;
}

.bd-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

/* Hamburger hidden on desktop */
.bd-hamburger {
    display: none;
}

.bd-nav a {
    color: #d6e8f3;
    text-decoration: none;
    font-size: 15px;
    transition: 0.3s ease;
}

.bd-nav a:hover {
    color: #00A7CC;
}

/* =========================================================
   HERO SECTION
========================================================= */
.bluedepth-hero {
    position: relative;
    width: 100%;
    height: 80vh;
    background: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e') center/cover no-repeat;
    overflow: hidden;
}

.bluedepth-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 30, 60, 0.5), rgba(0, 15, 30, 0.85));
    z-index: 1;
}

.bluedepth-hero-inner {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    padding: 0 40px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;   /* <-- ⬅⬅⬅ 新增这个 */
    text-align: center;    /* <-- 可选，让文字也置中 */
}

.hero-title {
    font-size: 60px;
    margin-bottom: 15px;
    filter: blur(6px);
    opacity: 0;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 35px;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    display: flex;
    justify-content: center;    /* ⭐ 强制水平置中 */
}

.hero-btn {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    transition: 0.3s ease;
}

.btn-primary {
    background: #00A7CC;
}

.btn-outline {
    border: 2px solid #00A7CC;
}

.hero-btn:hover {
    transform: translateY(-3px);
    background: #0090b0;
}

.light-ray {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255,255,255,0.12), transparent 70%);
    transform: translateX(-100%);
    z-index: 2;
}

#bubbleCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

/* =========================================================
   ABOUT SECTION
========================================================= */
.bd-about {
    padding: 120px 80px;
    display: flex;
    gap: 60px;
    align-items: center;
    background: #001a2e;
}

.about-left img {
    border-radius: 12px;
    width: 100%;
    object-fit: cover;
}

.about-right h2 {
    font-size: 42px;
    margin-bottom: 20px;
}

.about-right p {
    font-size: 18px;
    line-height: 1.7;
    color: #cce3f1;
}

.about-icons {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.icon-box {
    background: rgba(255,255,255,0.06);
    padding: 15px;
    border-radius: 8px;
    font-size: 15px;
}

/* =========================================================
   COURSES SECTION
========================================================= */
.bd-courses {
    padding: 120px 50px;
    background: #002238;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
}

.course-card {
    background: rgba(255,255,255,0.05);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: 0.3s ease;
    opacity: 1 !important;
}

.course-card:hover {
    transform: translateY(-8px);
    background: rgba(255,255,255,0.08);
}

.course-card h3 {
    font-size: 26px;
    margin-bottom: 12px;
}

.course-card p {
    font-size: 15px;
    color: #cfe4f5;
    margin-bottom: 20px;
}

.btn-learn {
    padding: 10px 22px;
    border: 1px solid #00A7CC;
    border-radius: 6px;
    background: transparent;
    color: #00A7CC;
    cursor: pointer;
    transition: 0.3s ease;
}

.btn-learn:hover {
    background: #00A7CC;
    color: white;
}

/* 让卡片成为 3D 翻转容器 */
.course-card {
    background: transparent;
    width: 100%;
    height: 260px;
    perspective: 1000px;  /* 必须有 */
    position: relative;
}

/* 内部两面共享的 wrapper */
.course-card > div {
    width: 100%;
    height: 100%;
    padding: 30px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    backface-visibility: hidden;   /* 必须 */
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.7s ease;
    padding-top: 60px;
    padding-bottom: 60px;
}

/* 正面 */
.card-front {
    transform: rotateY(0deg);
}

/* 反面 */
.card-back {
    transform: rotateY(180deg);
    background: rgba(255,255,255,0.08);
}

/* 卡片翻转后的状态 */
.course-card.flipped .card-front {
    transform: rotateY(-180deg);
}

.course-card.flipped .card-back {
    transform: rotateY(0deg);
}

/* 按钮样式不需更改 */
.btn-back {
    padding: 12px 22px;
    border: 1px solid #00A7CC;
    background: transparent;
    color: #00A7CC;
    border-radius: 8px;
}
.btn-back:hover {
    background: #00A7CC;
    color: #fff;
}


/* =========================================================
   TRIPS SECTION
========================================================= */
.bd-trips {
    padding: 120px 50px;
    background: #001a2c;
}

.trip-scroll {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.trip-card {
    min-width: 320px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.trip-card img {
    border-radius: 10px;
    margin-bottom: 10px;
}

.bd-trips .trip-card img {
    height: 340px;             /* ⭐你可以改成你想要的高度，例如 240/250/300 */
    width: 100%;
    object-fit: cover;         /* ⭐自动裁切填满 */
    border-radius: 10px;
    display: block;
}

/* Hide scrollbar in mobile */
.trip-scroll::-webkit-scrollbar {
    display: none;
}

/* Mobile controls */
.trip-controls {
    display: none; /* desktop 不显示 */
    margin-top: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.trip-controls button {
    background: rgba(255,255,255,0.15);
    border: none;
    font-size: 26px;
    color: white;
    padding: 10px 18px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s ease;
}

.trip-controls button:hover {
    background: rgba(255,255,255,0.3);
}

.t-counter {
    font-size: 16px;
    color: #aee6ff;
}

/* Only show controls on mobile */
@media (max-width: 768px) {
    .trip-controls {
        display: flex;
    }
}

/* 强制 trip-scroll 在 mobile 不出现滚动条 */
@media (max-width: 768px) {
    .trip-scroll {
        overflow-x: scroll;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE */
        scroll-behavior: smooth;
    }
    .trip-scroll::-webkit-scrollbar {
        display: none; /* Chrome / Safari */
    }
}

@media (min-width: 769px) {
    .trip-controls {
        display: none !important;
    }
}


/* =========================================================
   GALLERY SECTION
========================================================= */
.bd-gallery {
    padding: 100px 50px;
    background: #002238;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 60px;
}

.gallery-grid img {
    border-radius: 10px;
    transition: 0.3s ease;
    opacity: 1 ;
    transform: none;
}

.bd-gallery .gallery-grid img {
    width: 100%;
    height: 350px;        /* ⭐ 调整图片高度（你可以改 200/300） */
    object-fit: cover;    /* ⭐ 自动裁切填满，不会变形 */
    border-radius: 10px;
    display: block;
}

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

/* 波浪上下错位 */
.gallery-grid img:nth-child(1) { margin-top: 20px; }
.gallery-grid img:nth-child(2) { margin-top: 100px; }
.gallery-grid img:nth-child(3) { margin-top: -5px; }
.gallery-grid img:nth-child(4) { margin-top: 80px; }
.gallery-grid img:nth-child(5) { margin-top: -20px; }
.gallery-grid img:nth-child(6) { margin-top: 30px; }

.gallery-grid img {
    transition: transform 0.4s ease, 
                box-shadow 0.4s ease,
                opacity 0.4s ease;
}

.gallery-grid img:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0px 12px 30px rgba(0, 0, 0, 0.25);
    opacity: 0.95;
}

@keyframes waveMove {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(25px, -10px); }
    50%  { transform: translate(10px, 15px); }
    75%  { transform: translate(-20px, -5px); }
    100% { transform: translate(0, 0); }
}

.gallery-grid img:nth-child(odd) {
    animation: waveMove 6s ease-in-out infinite;
}

.gallery-grid img:nth-child(even) {
    animation: waveMove 7s ease-in-out infinite;
}


/* Mobile */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-grid img:nth-child(n) {
        margin-top: 0;  /* 手机不需要波浪 */
    }
}

/* =========================================================
   FORCE HIDE MOBILE HORIZONTAL SCROLLBAR (ALL BROWSERS)
========================================================= */
@media (max-width: 768px) {

    .gallery-grid {
        -ms-overflow-style: none;      /* IE, Edge */
        scrollbar-width: none;         /* Firefox */
    }

    .gallery-grid::-webkit-scrollbar {
        display: none !important;      /* Chrome, Safari */
        width: 0;
        height: 0;
    }
}

.gallery-grid {
    overflow-x: auto;
    overflow-y: hidden;    /* ⭐ 防止横向滑动条反射成纵向 */
}

/* =========================================================
   MOBILE GALLERY CONTROLS WITH COUNTER
========================================================= */
.gallery-controls {
    display: none; /* ⭐ Desktop 完全隐藏 */
}

@media (max-width: 768px) {

    .gallery-controls {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 25px;
        margin-top: 18px;
        margin-bottom: 10px;
        opacity: 0.9;
    }

    .gallery-controls button {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        border: none;
        background: rgba(255,255,255,0.18);
        backdrop-filter: blur(6px);
        color: white;
        font-size: 26px;
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        transition: 0.25s ease;
    }

    .gallery-controls button:active {
        transform: scale(0.88);
        opacity: 0.8;
    }

    .g-counter {
        font-size: 17px;
        font-weight: 500;
        color: #cfe8ff;
        letter-spacing: 1px;
    }
}

@media (min-width: 769px) {
    .gallery-grid {
        overflow: visible !important;
    }

    .gallery-grid::-webkit-scrollbar {
        display: none !important;
    }
}

/* =========================================================
   TESTIMONIALS SECTION
========================================================= */
.bd-testimonials {
    padding: 120px 50px;
    background: #001a2e;
}

.testimonials-grid {
    display: flex;
    gap: 30px;
}

.review-card {
    background: rgba(255,255,255,0.06);
    padding: 30px;
    border-radius: 12px;
    width: 33.3%;
    font-size: 16px;
    line-height: 1.6;
}

/* =========================================================
   CONTACT SECTION
========================================================= */
.bd-contact {
    padding: 120px 50px;
    background: #001a2d;
}

.contact-wrapper {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    justify-content: center;
    max-width: 1200px;
    margin: auto;
}

.contact-info {
    width: 45%;
}

.contact-info h3 {
    font-size: 28px;
    margin-bottom: 15px;
}

.contact-line {
    margin: 8px 0;
    font-size: 16px;
    color: #bcd3e3;
}

.contact-form {
    width: 45%;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-form input,
.contact-form textarea {
    padding: 14px 16px;
    border-radius: 8px;
    border: none;
    outline: none;
    background: rgba(255,255,255,0.08);
    color: white;
    font-size: 15px;
}

.contact-form textarea {
    height: 130px;
    resize: none;
}

.contact-btn {
    padding: 14px;
    font-size: 16px;
    background: #00A7CC;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s ease;
}

.contact-btn:hover {
    background: #008bad;
}

/* Mobile */
@media (max-width: 768px) {
    .contact-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .contact-info,
    .contact-form {
        width: 100%;
    }
}


/* =========================================================
   FOOTER
========================================================= */
.bd-footer {
    padding: 80px 40px;
    background: #000c14;
    text-align: center;
}

.bd-footer h2 {
    font-size: 32px;
    color: #00A7CC;
    margin-bottom: 10px;
}

.bd-footer p {
    font-size: 14px;
    color: #9db8c9;
    margin: 5px 0;
}

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

@media (max-width: 991px) {

    .bd-about {
        flex-direction: column;
        text-align: center;
    }

    .about-icons {
        grid-template-columns: 1fr 1fr;
    }

    .course-grid {
        grid-template-columns: 1fr;
    }

    .trip-scroll {
        overflow-x: scroll;
    }

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

    .testimonials-grid {
        flex-direction: column;
    }

    .review-card {
        width: 100%;
    }
}

@media (max-width: 600px) {

    .hero-title {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 200px;
    }

    .bd-about,
    .bd-courses,
    .bd-gallery,
    .bd-trips {
        padding: 80px 30px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   MOBILE – Horizontal Swipe Gallery
========================================================= */
@media (max-width: 768px) {

    .gallery-grid {
        display: flex;                /* ⭐ 改成横向 */
        gap: 20px;
        overflow-x: auto;             /* ⭐ 横向滑动 */
        scroll-snap-type: x mandatory; 
        padding-bottom: 10px;
    }

    .gallery-grid img {
        min-width: 75%;               /* ⭐ Mobile 一次看到 1.2 张 */
        height: 230px;                /* ⭐ Mobile 比较矮 */
        object-fit: cover;
        border-radius: 10px;
        flex-shrink: 0;               /* ⭐ 防止变形 */
        scroll-snap-align: center;    /* ⭐ 中心吸附 */
        margin-top: 0 !important;     /* ⭐ 取消波浪 margin-top */
        animation: none !important;   /* ⭐ Mobile 不要 wave */
    }

    .gallery-grid::-webkit-scrollbar {
        display: none;                /* ⭐ 隐藏滚动条 */
    }
    .bd-testimonials{
        padding-bottom: 50px;
    }
    .bd-contact{
        padding-top: 50px;
    }
}

/* MOBILE VERSION */
@media (max-width: 768px) {

    /* 隐藏横向菜单 */
    .bd-nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 65%;
        background: rgba(0,20,40,0.95);
        flex-direction: column;
        padding: 100px 30px;
        gap: 25px;
        transition: 0.4s ease;
    }

    /* 菜单出现 */
    .bd-nav ul.active {
        right: 0;
    }

    /* Hamburger appear */
    .bd-hamburger {
        display: block;
        width: 32px;
        cursor: pointer;
        z-index: 9999;
    }

    .bd-hamburger span {
        display: block;
        height: 3px;
        background: white;
        margin: 6px 0;
        border-radius: 2px;
        transition: 0.4s;
    }

    /* Hamburger transform to X */
    .bd-hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .bd-hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .bd-hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}