@import url('https://fonts.googleapis.com/css2?family=Michroma:wght@400&family=Saira:wght@300;400;500;600;700;800;900&family=Kanit:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Saira', 'Arial', sans-serif;
    background: linear-gradient(135deg, #e8f6f8 0%, #d4f1f4 25%, #b8e8ec 50%, #9cdfe5 75%, #7dd6dd 100%);
    color: #0d3d47;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Flowing current pattern overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(135deg, rgba(80, 200, 220, 0.04) 25%, transparent 25%),
        linear-gradient(225deg, rgba(80, 200, 220, 0.04) 25%, transparent 25%),
        linear-gradient(45deg, rgba(100, 210, 230, 0.04) 25%, transparent 25%),
        linear-gradient(315deg, rgba(100, 210, 230, 0.04) 25%, transparent 25%);
    background-size: 120px 120px, 120px 120px, 120px 120px, 120px 120px;
    background-position: 0 0, 60px 0, 60px -60px, 0px 60px;
    pointer-events: none;
    z-index: 0;
    animation: currentFlow 50s linear infinite;
}

@keyframes currentFlow {
    0% {
        background-position: 0 0, 60px 0, 60px -60px, 0px 60px;
    }

    100% {
        background-position: 120px 120px, 180px 120px, 180px 60px, 120px 180px;
    }
}

/* Fluid luminescence effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(ellipse at 15% 25%, rgba(80, 200, 220, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 75%, rgba(100, 210, 230, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(125, 214, 221, 0.1) 0%, transparent 60%);
    animation: fluidFlow 18s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes fluidFlow {
    0% {
        opacity: 0.5;
        transform: scale(1) translateX(0);
    }

    100% {
        opacity: 0.8;
        transform: scale(1.12) translateX(30px);
    }
}

.content-wrapper {
    position: relative;
    z-index: 1;
}

/* Futuristic Header with River Flow Elements */
header {
    background: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: blur(28px);
    backdrop-filter: blur(28px);
    border-bottom: 3px solid rgba(80, 200, 220, 0.7);
    padding: 1.5rem 3rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 40px rgba(80, 200, 220, 0.35),
        0 0 80px rgba(125, 214, 221, 0.2) inset;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-branding {
    flex: 1;
    min-width: 200px;
}

.site-title a {
    text-decoration: none;
    font-size: 2.4rem;
    font-weight: 400;
    font-family: 'Michroma', monospace;
    background: linear-gradient(135deg, #16a0b8 0%, #50c8dc 50%, #7dd6dd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 12px;
    text-transform: uppercase;
    transition: all 0.4s ease;
    position: relative;
    filter: drop-shadow(0 0 30px rgba(80, 200, 220, 0.6));
}

.site-title a:hover {
    filter: drop-shadow(0 0 45px rgba(125, 214, 221, 0.9));
    letter-spacing: 16px;
}

.site-tagline {
    font-size: 0.95rem;
    color: #16a0b8;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-top: 0.5rem;
    font-weight: 300;
    font-family: 'Kanit', sans-serif;
}

/* Navigation Menu */
#menu {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

#menu ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    justify-content: flex-end;
}

#menu li {
    margin: 0 1.3rem;
    font-size: 1rem;
    line-height: 2.5rem;
    position: relative;
}

#menu li::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #16a0b8, #50c8dc);
    transition: width 0.4s ease;
    box-shadow: 0 0 20px rgba(80, 200, 220, 1);
}

#menu li:hover::before {
    width: 100%;
}

#menu a {
    text-decoration: none;
    color: #0d3d47;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Kanit', sans-serif;
}

#menu li:hover a {
    color: #16a0b8;
    text-shadow: 0 0 25px rgba(80, 200, 220, 0.8);
}

/* Hero Section with River Theme */
.hero-section {
    text-align: center;
    padding: 5rem 2rem 4rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, rgba(212, 241, 244, 0.5) 100%);
}

.hero-title {
    font-size: 6rem;
    font-weight: 400;
    font-family: 'Michroma', monospace;
    background: linear-gradient(135deg, #16a0b8 0%, #50c8dc 50%, #7dd6dd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 25px;
    position: relative;
    filter: drop-shadow(0 0 50px rgba(80, 200, 220, 0.6));
    animation: titleFlow 4.5s ease-in-out infinite;
}

@keyframes titleFlow {

    0%,
    100% {
        filter: drop-shadow(0 0 50px rgba(80, 200, 220, 0.6));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 70px rgba(125, 214, 221, 0.9));
        transform: scale(1.02);
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #16a0b8;
    letter-spacing: 8px;
    text-transform: uppercase;
    font-weight: 300;
    margin-top: 2rem;
    text-shadow: 0 0 30px rgba(80, 200, 220, 0.5);
    font-family: 'Kanit', sans-serif;
}

/* River Flow SVG Animation */
.river-svg {
    width: 100%;
    height: 320px;
    margin-top: 3rem;
}

.river-path {
    fill: none;
    stroke: #50c8dc;
    stroke-width: 8;
    opacity: 0;
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    animation: flowRiver 4s ease-out forwards;
    filter: drop-shadow(0 0 12px rgba(80, 200, 220, 0.7));
    stroke-linecap: round;
}

.river-path:nth-child(2) {
    stroke: #7dd6dd;
    stroke-width: 6;
    animation-delay: 0.3s;
}

.river-path:nth-child(3) {
    stroke: #9fe4e8;
    stroke-width: 4;
    animation-delay: 0.6s;
}

@keyframes flowRiver {
    to {
        stroke-dashoffset: 0;
        opacity: 0.8;
    }
}

.river-fill {
    fill: #b8e8ec;
    opacity: 0;
    animation: fillRiver 2.5s ease-out 1.2s forwards;
}

@keyframes fillRiver {
    from {
        opacity: 0;
        transform: scaleX(0);
        transform-origin: left;
    }

    to {
        opacity: 0.25;
        transform: scaleX(1);
    }
}

.river-bank {
    fill: #c8f0e8;
    opacity: 0;
    animation: revealBank 2s ease-out 0.5s forwards;
}

@keyframes revealBank {
    from {
        opacity: 0;
    }

    to {
        opacity: 0.4;
    }
}

.flow-arrow {
    fill: #50c8dc;
    opacity: 0;
    animation: pulseArrow 2.5s ease-in-out 2s infinite;
}

.flow-arrow:nth-child(1) {
    animation-delay: 2s;
}

.flow-arrow:nth-child(2) {
    animation-delay: 2.5s;
}

.flow-arrow:nth-child(3) {
    animation-delay: 3s;
}

@keyframes pulseArrow {

    0%,
    100% {
        opacity: 0;
        transform: translateX(0);
    }

    50% {
        opacity: 0.8;
        transform: translateX(40px);
    }
}

.current-particle {
    fill: #7dd6dd;
    opacity: 0;
    animation: driftParticle 6s ease-in-out infinite;
}

.current-particle:nth-child(1) {
    animation-delay: 0s;
}

.current-particle:nth-child(2) {
    animation-delay: 2s;
}

.current-particle:nth-child(3) {
    animation-delay: 4s;
}

@keyframes driftParticle {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }

    25% {
        opacity: 0.7;
    }

    50% {
        transform: translate(200px, -30px) scale(1.3);
        opacity: 0.9;
    }

    75% {
        opacity: 0.5;
    }
}

.bridge-structure {
    stroke: #2b7a8a;
    stroke-width: 3;
    fill: none;
    opacity: 0;
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: buildBridge 3s ease-out 1.5s forwards;
}

@keyframes buildBridge {
    to {
        stroke-dashoffset: 0;
        opacity: 0.7;
    }
}

.boat-element {
    fill: #2b7a8a;
    opacity: 0;
    animation: sailBoat 8s ease-in-out 3s infinite;
}

@keyframes sailBoat {

    0%,
    100% {
        transform: translateX(-100px);
        opacity: 0;
    }

    10%,
    90% {
        opacity: 0.8;
    }

    50% {
        transform: translateX(600px);
    }
}

/* River Gallery Section */
.river-gallery {
    max-width: 1600px;
    margin: 3rem auto;
    padding: 0 2rem 4rem;
}

.region-section {
    margin-bottom: 4rem;
}

.region-title {
    font-size: 2.8rem;
    font-weight: 400;
    font-family: 'Michroma', monospace;
    background: linear-gradient(135deg, #16a0b8 0%, #50c8dc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin-bottom: 2.5rem;
    position: relative;
    padding-left: 25px;
}

.region-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 85%;
    background: linear-gradient(180deg, #16a0b8, #50c8dc);
    box-shadow: 0 0 25px rgba(80, 200, 220, 1);
    border-radius: 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
    justify-items: center;
}

.gallery-grid .river-card {
    max-width: 480px;
    width: 100%;
}

/* River Card - Flowing meets Technology */
.river-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    isolation: isolate;
    z-index: 1;
}

.river-card:hover {
    transform: translateY(-20px) scale(1.03);
    z-index: 10;
}

/* Liquid flow border effect */
.card-container {
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(212, 241, 244, 0.88) 100%);
    border-radius: 18px;
    border: 2px solid rgba(80, 200, 220, 0.6);
    box-shadow: 0 10px 50px rgba(80, 200, 220, 0.35),
        0 0 30px rgba(125, 214, 221, 0.22) inset;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.river-card:hover .card-container {
    border-color: rgba(80, 200, 220, 1);
    box-shadow: 0 25px 70px rgba(80, 200, 220, 0.55),
        0 0 50px rgba(125, 214, 221, 0.38) inset;
}

/* Current flow lines */
.flow-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.river-card:hover .flow-lines {
    opacity: 1;
}

.flow-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(80, 200, 220, 0.5), transparent);
    height: 2px;
    width: 100%;
    animation: flowCurrent 3s ease-in-out infinite;
}

.flow-line:nth-child(1) {
    top: 20%;
    animation-delay: 0s;
}

.flow-line:nth-child(2) {
    top: 40%;
    animation-delay: 1s;
}

.flow-line:nth-child(3) {
    top: 60%;
    animation-delay: 2s;
}

.flow-line:nth-child(4) {
    top: 80%;
    animation-delay: 0.5s;
}

@keyframes flowCurrent {

    0%,
    100% {
        opacity: 0.2;
        transform: translateX(-100%);
    }

    50% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* River stream scan effect */
.stream-scan {
    position: absolute;
    left: -100%;
    top: 0;
    bottom: 0;
    width: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(80, 200, 220, 0.35),
            transparent);
    z-index: 3;
    pointer-events: none;
}

.river-card:hover .stream-scan {
    animation: streamScan 2.5s ease-in-out;
}

@keyframes streamScan {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Image Container */
.river-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 18px;
}

/* Portrait orientation - manually add this class to portrait images */
.river-image-wrapper.portrait {
    aspect-ratio: 3/4;
}

.river-image-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(80, 200, 220, 0.15) 0%,
            transparent 50%,
            rgba(125, 214, 221, 0.15) 100%);
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.5s ease;
}

.river-card:hover .river-image-wrapper::before {
    opacity: 0.75;
}

.river-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    filter: saturate(0.95) contrast(1.08) brightness(1.05);
}

.river-card:hover .river-image {
    transform: scale(1.18);
    filter: saturate(1.15) contrast(1.12) brightness(1.08);
}

/* River Info Overlay */
.river-info {
    position: relative;
    padding: 2rem;
    z-index: 5;
    background: linear-gradient(to top,
            rgba(255, 255, 255, 0.94) 0%,
            rgba(212, 241, 244, 0.82) 60%,
            transparent 100%);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 0 0 18px 18px;
    border-top: 1px solid rgba(80, 200, 220, 0.6);
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.river-location {
    font-size: 1.9rem;
    font-weight: 600;
    font-family: 'Michroma', monospace;
    color: #16a0b8;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin: 0;
    transition: all 0.3s ease;
    text-shadow: 0 0 30px rgba(80, 200, 220, 0.6);
}

.river-card:hover .river-location {
    color: #50c8dc;
    text-shadow: 0 0 45px rgba(125, 214, 221, 0.9);
}

/* Fluid hexagonal frame corners */
.fluid-frame {
    position: absolute;
    z-index: 4;
    pointer-events: none;
    transition: all 0.5s ease;
}

.fluid-tl {
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    border-top: 3px solid rgba(80, 200, 220, 0.7);
    border-left: 3px solid rgba(80, 200, 220, 0.7);
    border-radius: 10px 0 0 0;
}

.fluid-tr {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-top: 3px solid rgba(80, 200, 220, 0.7);
    border-right: 3px solid rgba(80, 200, 220, 0.7);
    border-radius: 0 10px 0 0;
}

.fluid-bl {
    bottom: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    border-bottom: 3px solid rgba(80, 200, 220, 0.7);
    border-left: 3px solid rgba(80, 200, 220, 0.7);
    border-radius: 0 0 0 10px;
}

.fluid-br {
    bottom: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-bottom: 3px solid rgba(80, 200, 220, 0.7);
    border-right: 3px solid rgba(80, 200, 220, 0.7);
    border-radius: 0 0 10px 0;
}

.river-card:hover .fluid-frame {
    border-color: rgba(80, 200, 220, 1);
    box-shadow: 0 0 25px rgba(80, 200, 220, 1);
}

.river-card:hover .fluid-tl,
.river-card:hover .fluid-br {
    width: 50px;
    height: 50px;
}

.river-card:hover .fluid-tr,
.river-card:hover .fluid-bl {
    width: 50px;
    height: 50px;
}

/* Footer with River Flow Style */
footer {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.90) 0%, rgba(212, 241, 244, 0.90) 100%);
    -webkit-backdrop-filter: blur(28px);
    backdrop-filter: blur(28px);
    border-top: 3px solid rgba(80, 200, 220, 0.7);
    padding: 3rem 2rem;
    margin-top: 4rem;
    text-align: center;
    box-shadow: 0 -4px 40px rgba(80, 200, 220, 0.35);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-title {
    font-size: 1.4rem;
    font-family: 'Michroma', monospace;
    background: linear-gradient(135deg, #16a0b8 0%, #50c8dc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

#langlist {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 50px;
    padding: 0.5rem;
    border: 2px solid rgba(80, 200, 220, 0.6);
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(15px);
    margin-bottom: 2rem;
    box-shadow: 0 0 40px rgba(80, 200, 220, 0.25) inset;
}

#langlist li {
    display: inline-block;
    list-style: none;
    margin: 0.3rem;
    padding: 0.8rem 1.4rem;
    border-radius: 30px;
    transition: all 0.3s ease;
}

#langlist a {
    text-decoration: none;
    color: #0d3d47;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: 'Kanit', sans-serif;
}

#langlist .highlight {
    background: linear-gradient(135deg, #16a0b8, #50c8dc);
    box-shadow: 0 0 30px rgba(80, 200, 220, 0.7);
}

#langlist .highlight a {
    color: #ffffff;
    font-weight: bold;
}

#langlist li:not(.highlight):hover {
    background: rgba(80, 200, 220, 0.28);
    box-shadow: 0 0 25px rgba(80, 200, 220, 0.6);
}

#langlist li:not(.highlight):hover a {
    color: #16a0b8;
    text-shadow: 0 0 20px rgba(80, 200, 220, 0.7);
}

.footer-credits {
    color: #16a0b8;
    font-size: 0.95rem;
    letter-spacing: 2px;
    margin-top: 2rem;
    font-weight: 400;
    font-family: 'Kanit', sans-serif;
}

.footer-credits strong {
    background: linear-gradient(135deg, #16a0b8 0%, #50c8dc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-family: 'Michroma', monospace;
}

/* Responsive Design */
@media screen and (max-width: 968px) {
    header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }

    .site-branding {
        margin-bottom: 1rem;
    }

    #menu {
        justify-content: center;
    }

    #menu ul {
        justify-content: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }

    .hero-title {
        font-size: 4rem;
        letter-spacing: 15px;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        letter-spacing: 6px;
    }

    .river-card {
        }

    .river-location {
        font-size: 1.6rem;
    }
}

@media screen and (max-width: 600px) {
    .site-title a {
        font-size: 1.8rem;
        letter-spacing: 5px;
    }

    .site-tagline {
        font-size: 0.8rem;
    }

    #menu li {
        margin: 0 0.5rem;
        font-size: 0.9rem;
    }

    .hero-title {
        font-size: 2.8rem;
        letter-spacing: 10px;
    }

    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 5px;
    }

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

    .river-card {
        }

    .river-location {
        font-size: 1.4rem;
    }

    .river-info {
        padding: 1.5rem;
    }

    .region-title {
        font-size: 2rem;
    }
}
