/* ===============================================
   Animations & Keyframes
   =============================================== */

/* Sun Icon Rotation */
@keyframes rotateSun {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Slideshow Background Animation */
@keyframes imageAnimation {
    0% {
        opacity: 0;
        animation-timing-function: ease-in;
    }

    8% {
        opacity: 1;
        transform: scale(1.15);
        animation-timing-function: ease-out;
    }

    17% {
        opacity: 1;
        transform: scale(1.20);
    }

    25% {
        opacity: 0;
        transform: scale(1.40);
    }

    100% {
        opacity: 0;
    }
}

/* Wave Animations (Shared Keyframes) */
@keyframes move-forever1 {
    0% {
        transform: translate(85px, 0%);
    }

    100% {
        transform: translate(-90px, 0%);
    }
}

@keyframes move-forever2 {
    0% {
        transform: translate(-90px, 0%);
    }

    100% {
        transform: translate(85px, 0%);
    }
}

@keyframes move-forever3 {
    0% {
        transform: translate(-90px, 0%);
    }

    100% {
        transform: translate(85px, 0%);
    }
}

/* Home Page Waves */
.wave1 use {
    animation: move-forever1 10s linear -2s infinite;
}

.wave2 use {
    animation: move-forever2 8s linear -2s infinite;
}

.wave3 use {
    animation: move-forever3 6s linear -2s infinite;
}

.wave4 use {
    animation: move-forever1 12s linear -2s infinite;
}

.wave5 use {
    animation: move-forever2 5s linear -2s infinite;
}

/* About Page Waves */
.about-wave1 use {
    animation: move-forever1 10s linear -2s infinite;
}

.about-wave2 use {
    animation: move-forever2 8s linear -2s infinite;
}

.about-wave3 use {
    animation: move-forever3 6s linear -2s infinite;
}

.about-wave4 use {
    animation: move-forever1 12s linear -2s infinite;
}

.about-wave5 use {
    animation: move-forever2 5s linear -2s infinite;
}

/* Paper Boat Animation */
@keyframes boatRideWave5 {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes boatMove {
    0% {
        left: -150px;
    }

    94% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

/* Fish Animations */
@keyframes fishSwim {
    0% {
        right: 100%;
        transform: translateX(-100%) scaleX(1);
        opacity: 0;
    }

    2% {
        opacity: 0.4;
    }

    90% {
        right: -200px;
        transform: translateX(0) scaleX(1);
        opacity: 0.4;
    }

    94% {
        opacity: 0;
    }

    100% {
        right: -200px;
        opacity: 0;
    }
}

@keyframes fishSwimRightToLeft {
    0% {
        right: -200px;
        transform: translateX(0) scaleX(-1);
        opacity: 0;
    }

    2% {
        opacity: 0.7;
    }

    90% {
        right: 100%;
        transform: translateX(-100%) scaleX(-1);
        opacity: 0.7;
    }

    94% {
        opacity: 0;
    }

    100% {
        right: 100%;
        opacity: 0;
    }
}

@keyframes fishSwimLeftToRightFast {
    0% {
        left: -200px;
        transform: translateX(0) scaleX(1);
        opacity: 0;
    }

    2% {
        opacity: 0.6;
    }

    90% {
        left: 100%;
        transform: translateX(0) scaleX(1);
        opacity: 0.6;
    }

    94% {
        opacity: 0;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

@keyframes fishSwimLeftToRightSlow {
    0% {
        left: -200px;
        transform: translateX(0) scaleX(1);
        opacity: 0;
    }

    2% {
        opacity: 0.6;
    }

    90% {
        left: 100%;
        transform: translateX(0) scaleX(1);
        opacity: 0.6;
    }

    94% {
        opacity: 0;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

@keyframes fishSwimRightToLeftSlow {
    0% {
        right: -180px;
        transform: translateX(0) scaleX(-1);
        opacity: 0;
    }

    2% {
        opacity: 0.55;
    }

    90% {
        right: 100%;
        transform: translateX(-100%) scaleX(-1);
        opacity: 0.55;
    }

    94% {
        opacity: 0;
    }

    100% {
        right: 100%;
        opacity: 0;
    }
}

@keyframes fishSwimLeftToRight {
    0% {
        left: -200px;
        transform: translateX(0) scaleX(1);
        opacity: 0;
    }

    2% {
        opacity: 0.45;
    }

    90% {
        left: 100%;
        transform: translateX(0) scaleX(1);
        opacity: 0.45;
    }

    94% {
        opacity: 0;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Button & UI Animations */
@keyframes left-slide {
    0% {
        left: -50%;
        opacity: 0.1;
    }

    50%,
    100% {
        left: 150%;
        opacity: 0.75;
    }
}

/* ===============================================
   Restored Animation Classes
   =============================================== */

/* Sun Icon */
#sunIcon {
    animation: rotateSun 20s linear infinite;
}

#sunIcon:hover {
    opacity: 1 !important;
    animation: rotateSun 10s linear infinite;
}

/* Slideshow Background */
.cb-slideshow li {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    color: transparent;
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: none;
    opacity: 0;
    z-index: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    animation: imageAnimation 72s linear infinite 0s;
}

.cb-slideshow li:nth-child(1) {
    background-image: url(../img/letter_bg_01.jpg)
}

.cb-slideshow li:nth-child(2) {
    background-image: url(../img/letter_bg_02.jpg);
    animation-delay: 12s;
}

.cb-slideshow li:nth-child(3) {
    background-image: url(../img/letter_bg_03.jpg);
    animation-delay: 24s;
}

.cb-slideshow li:nth-child(4) {
    background-image: url(../img/letter_bg_04.jpg);
    animation-delay: 36s;
}

.cb-slideshow li:nth-child(5) {
    background-image: url(../img/letter_bg_05.jpg);
    animation-delay: 48s;
}

.cb-slideshow li:nth-child(6) {
    background-image: url(../img/letter_bg_06.jpg);
    animation-delay: 60s;
}

/* Paper Boat */
.paper-boat {
    position: absolute;
    bottom: 0px;
    left: -150px;
    width: 150px;
    z-index: 10;
    /* Sync with wave5 (5s duration, -2s delay). Keep boatMove. */
    animation: boatRideWave5 5s ease-in-out infinite -2s, boatMove 85s linear infinite -20s;
    transform-origin: center bottom;
}

/* Paper Boat (About Page - Reverse Direction) */
@keyframes boatRideWaveReverse {

    0%,
    100% {
        transform: translateY(0) rotate(5deg) scaleX(-1);
    }

    50% {
        transform: translateY(-20px) rotate(-5deg) scaleX(-1);
    }
}

@keyframes boatMoveRightToLeft {
    0% {
        left: 100%;
        margin-left: 0px;
    }

    100% {
        left: -200px;
        margin-left: 0px;
    }
}

.paper-boat-about {
    position: absolute;
    bottom: 0px;
    left: 100%;
    width: 150px;
    z-index: 10;
    /* Sync with wave5 (5s duration, -2s delay). Keep boatMove. */
    animation: boatRideWaveReverse 5s ease-in-out infinite -2s, boatMoveRightToLeft 85s linear infinite -20s;
    transform-origin: center bottom;
}

/* Fish Animations */
.about-fish {
    position: absolute;
    top: 20%;
    right: -200px;
    width: 150px;
    z-index: 1;
    opacity: 0.4;
    animation: fishSwim 85s linear infinite;
    pointer-events: none;
}

.about-fish-2 {
    position: absolute;
    top: 60%;
    /* Different lane */
    right: -100px;
    width: 75px;
    /* 50% smaller */
    z-index: 1;
    opacity: 0.7;
    /* 70% opacity */
    animation: fishSwimRightToLeft 85s linear infinite;
    pointer-events: none;
    transform: scaleX(-1);
    /* Face left */
}

.about-fish-3 {
    position: absolute;
    top: 80%;
    /* Bottom lane */
    left: -200px;
    width: 120px;
    /* Medium size */
    z-index: 1;
    opacity: 0.6;
    /* 60% opacity */
    animation: fishSwimLeftToRightSlow 100s linear infinite -10s;
    /* Slower, different start time */
    pointer-events: none;
}

.about-fish-4 {
    position: absolute;
    top: 40%;
    /* Middle-top lane */
    right: -150px;
    width: 90px;
    /* Small-Medium size */
    z-index: 1;
    opacity: 0.5;
    /* 50% opacity */
    animation: fishSwimRightToLeft 95s linear infinite -40s;
    /* Different speed/delay */
    pointer-events: none;
    transform: scaleX(-1);
    /* Face left */
}

.about-fish-5 {
    position: absolute;
    top: 50%;
    /* Middle lane */
    left: -200px;
    width: 110px;
    /* Medium size */
    z-index: 1;
    opacity: 0.6;
    /* 60% opacity */
    animation: fishSwimLeftToRightFast 75s linear infinite -25s;
    /* Faster speed */
    pointer-events: none;
}

.about-fish-6 {
    position: absolute;
    top: 70%;
    /* Bottom-middle lane */
    right: -180px;
    width: 100px;
    /* Medium size */
    z-index: 1;
    opacity: 0.55;
    /* 55% opacity */
    animation: fishSwimRightToLeftSlow 105s linear infinite -15s;
    /* Slowest speed */
    pointer-events: none;
    transform: scaleX(-1);
    /* Face left */
}

.about-fish-7 {
    position: absolute;
    top: 30%;
    /* Top lane */
    left: -180px;
    width: 80px;
    /* Small size */
    z-index: 1;
    opacity: 0.45;
    /* 45% opacity */
    animation: fishSwimLeftToRight 90s linear infinite -5s;
    /* Medium-Fast speed */
    pointer-events: none;
}

/* Shiny Button Effect (ported from fx.css) */
.fx-btn-blick {
    position: relative;
    overflow: hidden;
}

.fx-btn-blick:before {
    content: "";
    background-color: #fff;
    height: 100%;
    width: 3em;
    display: block;
    position: absolute;
    top: 0;
    -webkit-transform: skewX(-45deg) translateX(0);
    transform: skewX(-45deg) translateX(0);
    -webkit-transition: none;
    transition: none;
    opacity: 0;
    -webkit-animation: left-slide 2s infinite;
    animation: left-slide 2s infinite;
}

.about-fish-8 {
    position: absolute;
    top: 10%;
    /* Very top lane */
    right: -160px;
    width: 85px;
    /* Smallish size */
    z-index: 1;
    opacity: 0.5;
    /* 50% opacity */
    animation: fishSwimRightToLeft 92s linear infinite -12s;
    /* Varied speed/delay */
    pointer-events: none;
    transform: scaleX(-1);
    /* Face left */
}

.about-fish-9 {
    position: absolute;
    top: 85%;
    /* Very bottom lane */
    left: -200px;
    width: 130px;
    /* Largeish size */
    z-index: 1;
    opacity: 0.65;
    /* 65% opacity */
    animation: fishSwimLeftToRight 110s linear infinite -30s;
    /* Very Slow speed */
    pointer-events: none;
}

.about-fish-10 {
    position: absolute;
    top: 25%;
    /* Between top and middle-top */
    right: -200px;
    width: 140px;
    /* Large size */
    z-index: 1;
    opacity: 0.6;
    /* 60% opacity */
    animation: fishSwimRightToLeft 150s linear infinite -8s;
    /* Super Slow (Shark) */
    pointer-events: none;
    transform: scaleX(-1);
    /* Face left */
}

.about-fish-11 {
    position: absolute;
    top: 90%;
    /* Very bottom lane */
    left: -200px;
    width: 65px;
    /* Small size */
    z-index: 1;
    opacity: 0.8;
    /* High opacity */
    animation: fishSwimLeftToRight 65s linear infinite -5s;
    /* Fast speed */
    pointer-events: none;
}

.about-fish-12 {
    position: absolute;
    top: 65%;
    /* Middle-bottom lane */
    left: -200px;
    width: 120px;
    /* Bigger size */
    z-index: 1;
    opacity: 0.75;
    /* Good opacity */
    animation: fishSwimLeftToRight 80s linear infinite -20s;
    /* Medium speed */
    pointer-events: none;
}