@import url('https://fonts.googleapis.com/css2?family=Cuprum:ital,wght@0,400..700;1,400..700&family=DynaPuff:wght@400..700&family=Lilita+One&family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Gasoek+One&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #005dd6;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 40px;
}

.navbar {
    display: flex;
    position: fixed;
    justify-content: center;
    align-items: center;
    top: 0;
    background-color: #f8f8f8;
    margin: 20px 25px;
    padding: 8px 40px;
    border: 2px solid black;
    border-radius: 30px;
    box-shadow: 3px 3px 0 black;
    z-index: 99;
}

.navbar a {
    text-decoration: none;
    color: black;
    font-weight: bold;
    margin: 0 10px;
    font-family: 'Cuprum';
    padding: 5px;
    transition: 0.3s;
}

.navbar a button {
    font-family: 'Cuprum';
    font-size: 15px;
    font-weight: bold;
    border-radius: 20px;
    padding: 8px 15px;
    background-color: rgb(255, 217, 0);
}

.navbar a:hover {
    color: rgb(243, 223, 9);
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0);
}

.nav-links {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 0;
}

.dropdown-pendahuluan,
.dropdown-rencana,
.dropdown-hasil,
.dropdown-penutup {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.dropdown-pendahuluan:hover .dropdown-pendahuluan-content,
.dropdown-rencana:hover .dropdown-rencana-content,
.dropdown-hasil:hover .dropdown-hasil-content,
.dropdown-penutup:hover .dropdown-penutup-content {
    display: block;
}

.dropdown-pendahuluan-content,
.dropdown-rencana-content,
.dropdown-hasil-content,
.dropdown-penutup-content {
    display: none;
    position: absolute;
    top: 100%;
    transform: none;
    border-radius: 5px;
    border: 3px solid black;
    z-index: 10;
    padding: 0;
}

.dropdown-pendahuluan-content a,
.dropdown-rencana-content a,
.dropdown-hasil-content a,
.dropdown-penutup-content a {
    color: black;
    background-color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    display: block;
    text-align: center;
    width: 100%;
    margin: 0;
}

.title {
    margin-top: 85px;
    margin-bottom: 20px;
}

.YOGIS {
    color: white;
    text-align: center;
    font-size: 100px;
    font-family: 'Gasoek One';
    -webkit-text-stroke: 2px black;
    text-shadow: 5px 5px black;
    margin-bottom: -100px;
}

.PENDAHULUAN {
    margin-top: -10px;
    color: rgb(255, 196, 0);
    margin-top: 50px;
    text-align: center;
    font-size: 100px;
    font-family: 'lilita one';
    -webkit-text-stroke: 2px black;
    text-shadow: 5px 5px black;
}

.clouds {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.moving {
    font-family: 'Pixelify Sans';
    font-size: 30px;
    background-color: white;
    padding-bottom: 0px;
    border: 4px solid black;
}

.booth {
    align-items: center;
    border-radius: 10px;
    padding: 20px;
    padding-bottom: -5px;
    margin: 20px;
    border: 3px solid black;
    box-shadow: 3px 3px 0 black;
    background-color: #f8f8f8;
}

h1.judul-booth {
    font-family: 'Gasoek One';
    text-align: center;
    font-size: 50px;
    color: #ffd700;
    -webkit-text-stroke: 2px black;
    text-shadow: 5px 5px black;
    margin-bottom: 10px;
}

/* Initial states for animations */
.booth-initial {
    opacity: 0;
    transform: translateY(30px);
}

.title-initial {
    opacity: 0;
    transform: scale(0.8);
}

.text-initial {
    opacity: 0;
    transform: translateY(20px);
}

/* Animation classes */
.booth-animate {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.title-animate {
    animation: popIn 0.7s cubic-bezier(0.17, 0.67, 0.83, 0.67) forwards;
}

.text-animate {
    animation: fadeInParagraph 1s ease forwards;
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    40% {
        opacity: 1;
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInParagraph {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced styles for the booth section */
.booth {
    transition: box-shadow 0.5s ease, transform 0.5s ease;
}

.booth:hover {
    transform: translateY(-5px);
    box-shadow: 6px 6px 0 black;
}

/* Text highlight effect */
.booth p {
    position: relative;
    line-height: 1.8;
    text-align: center;
    margin-top: 20px;
}

/* Add a gradual text reveal effect */
.text-animate::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, transparent, #f8f8f8);
    animation: revealText 1.5s ease forwards;
}

@keyframes revealText {
    0% {
        left: 0;
    }

    100% {
        left: 100%;
    }
}

/* Title animation enhancement */
h1.judul-booth {
    position: relative;
    overflow: hidden;
}

h1.judul-booth::before {
    content: '';
    position: absolute;
    bottom: 0;
    margin-top: 5px;
    left: 50%;
    width: 0;
    height: 4px;
    background-color: #BF2604;
    transform: translateX(-50%);
    transition: width 0.5s ease;
}

.booth:hover h1.judul-booth::before {
    width: 70%;
}

/* Add subtle border animation */
@keyframes borderPulse {
    0% {
        border-color: black;
    }

    50% {
        border-color: #ffd700;
    }

    100% {
        border-color: black;
    }
}

.booth-animate {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards,
        borderPulse 3s ease infinite 1s;
}


h1.produk {
    font-family: 'Gasoek One';
    text-align: center;
    margin-top: 20px;
    font-size: 50px;
    color: white;
    -webkit-text-stroke: 2px black;
    text-shadow: 5px 5px black;
}

/* Improved container with evenly distributed layout */
.container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(min-content, auto);
    gap: 20px;
    max-width: 1200px;
    margin: 20px auto;
    width: 90%;
    padding: 15px;
}

/* Reset all card positions to let the grid handle placement naturally */
.card {
    background-color: #fff;
    border-radius: 15px;
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 3px solid black;
    box-shadow: 3px 3px 0 black;
    height: 100%;
    /* Make all cards take full height of their grid area */
}

/* First card - Bagi Kelompok */
.card:nth-child(1) {
    grid-column: 1;
    grid-row: span 2;
    /* Spans two rows since it has more content */
}

/* Second card - Bagi Siswi */
.card:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

/* Third card - Bagi Guru */
.card:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
}

/* Fourth card - Bagi Pelangan */
.card:nth-child(4) {
    grid-column: 2 / span 2;
    /* Spans columns 2 and 3 */
    grid-row: 2;
}

/* Update card content styling for better text layout */
.card-content {
    color: #333;
    font-size: 15px;
    font-family: 'cuprum';
    line-height: 1.5;
    margin-top: 10px;
    overflow-y: auto;
    /* Add scrolling if content overflows */
    flex: 1;
    /* Allow content to expand */
}

/* Improved media query with better breakpoints */
@media (max-width: 992px) {
    .container {
        grid-template-columns: 1fr 1fr;
        /* Two columns on medium screens */
        gap: 15px;
    }

    .card:nth-child(1) {
        grid-column: 1;
        grid-row: span 1;
        /* Don't span on smaller screens */
    }

    .card:nth-child(4) {
        grid-column: span 2;
        /* Still span two columns */
    }
}

@media (max-width: 576px) {
    .container {
        grid-template-columns: 1fr;
        /* One column on small screens */
    }

    .card:nth-child(n) {
        grid-column: 1;
        grid-row: auto;
    }
}

.card-title {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 10px;
    display: inline-block;
    background-color: #ffaa00;
    padding: 5px 12px;
    border-radius: 12px;
    width: fit-content;
    color: white;
    -webkit-text-stroke: 1.50px rgb(0, 0, 0);
    font-family: 'Lilita One';
}

/* Enhanced Animation Styles for Yogi's Penutup */

/* ---------- SCROLL ANIMATIONS ---------- */
/* Initial opacity states for scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-left.active {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-right.active {
    opacity: 1;
    transform: translateX(0);
}

.pop-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.pop-in.active {
    opacity: 1;
    transform: scale(1);
}

/* ---------- NAVBAR ANIMATIONS ---------- */
.navbar {
    animation: slideDown 1s ease forwards;
}

@keyframes slideDown {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-links a {
    position: relative;
    overflow: hidden;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: rgb(243, 223, 9);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
    left: 0;
}

.home {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ---------- CARDS ANIMATION ---------- */
.card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffaa00, transparent);
    transition: left 0.8s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 5px 5px 0 black;
}

.card:hover::before {
    left: 100%;
}

.card-title {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.card:hover .card-title {
    transform: scale(1.05);
    background-color: #ff8800;
}

/* ---------- BOOTH CONTENT ANIMATION ---------- */
.booth p {
    position: relative;
    overflow: hidden;
}

.booth p::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffaa00;
    transition: width 0.6s ease;
}

.booth:hover p::after {
    width: 100%;
}

/* ---------- MOVING MARQUEE ENHANCEMENT ---------- */
.moving {
    background: linear-gradient(90deg, #fff, #f8f8f8, #fff);
    background-size: 200% auto;
    animation: gradientBG 10s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Pulsing effect for buttons */
.navbar a button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.navbar a button:hover {
    background-color: #ffcc00;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 217, 0, 0.4);
}

.navbar a button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.navbar a button:hover::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }

    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Enhanced Card Content Animation */
.card-content {
    position: relative;
    transition: transform 0.4s ease;
}

.card:hover .card-content {
    transform: translateY(-5px);
}

/* 3D card effect */
.card {
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card:hover {
    transform: rotateX(5deg) rotateY(-5deg) translateY(-8px);
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.2);
}

/* Text animation for moving marquee */
@keyframes textGlow {

    0%,
    100% {
        color: #000;
        text-shadow: 0 0 0 transparent;
    }

    50% {
        color: #c28100;
        text-shadow: 0 0 10px rgba(255, 170, 0, 0.5);
    }
}

.moving {
    animation: gradientBG 10s ease infinite, textGlow 3s ease-in-out infinite;
}

p{
    font-family: 'Cuprum';
    font-size: 15px;
}