/* Homepage Styles */
.headline-font {
    font-family: 'Playfair Display', serif;
}

.hover-grow {
    display: inline-block;
}

.hover-grow:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease-in-out;
}

.dropdown-content {
    display: none;
    position: absolute;
    z-index: 20;
    background-color: #333;
    color: white;
}

.dropdown-content a {
    color: white;
}

/* CSS untuk navbar normal */
header.sticky {
    transition: all 0.5s ease-in-out;
}

/* CSS untuk navbar yang diperkecil */
header.shrink {
    padding-top: 10px;
    padding-bottom: 10px;
}

header.shrink .container {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

header.shrink img {
    height: 60px;
    width: 200px;
}

header.shrink .text-lg {
    font-size: 1rem;
}

header.shrink .inconsolata-font {
    font-size: 1rem;
}

header.sticky img {
    transition: all 0.3s ease-in-out;
}

header.sticky .text-lg {
    transition: all 0.3s ease-in-out;
}

header.sticky .inconsolata-font {
    transition: all 0.3s ease-in-out;
}

header.sticky {
    transition: all 0.3s ease-in-out;
    margin-bottom: 0;
    padding-bottom: 0;
}

.dropdown-content a:hover {
    background-color: #FEFF01;
    color: black;
}

.judson-font {
    font-family: 'Judson', serif;
}

.inconsolata-font {
    font-family: 'Inconsolata', monospace;
}

.arvo-font {
    font-family: 'Arvo', serif;
}

/* Slideshow Styles */
.slideshow-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    transition: opacity 0.5s ease, all 0.5s ease;
}

.slideshow-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 1s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
    z-index: 100;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}

.no-outline:focus {
    outline: none;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 2s ease-out, transform 2s ease-out;
}

.hover-underline:hover {
    text-decoration: underline;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in {
    opacity: 0;
    transform: translateX(-100%);
    transition: opacity 1.4s ease-out, transform 1.4s ease-out;
}

.slide-in.visible {
    opacity: 1;
    transform: translateX(0);
}

.zoom-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 1.8s ease-out, transform 1.8s ease-out;
}

.zoom-out {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 1.4s ease-out, transform 1.4s ease-out;
}

.zoom-in.visible {
    opacity: 1;
    transform: scale(1);
}

.zoom-out.visible {
    opacity: 1;
    transform: scale(1);
}

.card-transition {
    transition: transform 2s ease, box-shadow 2s ease;
}

.card-transition:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-transition:active {
    transform: scale(0.95);
}

.card {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1s ease, transform 1s ease;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.card.visible {
    opacity: 1;
    transform: scale(1);
}

/* Unified Animated Background with Red Topology */
.unified-section {
    position: relative;
    overflow: hidden;
    background-color: white;
    z-index: 1;
}

.topology-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.7;
}

/* Floating animation */
.floating {
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Glow effect */
.glow {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 5px rgba(254, 255, 1, 0.5);
    }
    to {
        box-shadow: 0 0 20px rgba(254, 255, 1, 0.8);
    }
}

.toggle-slideshow:hover {
    background: rgba(0,0,0,0.9);
}

/* Cloud Gradient Overlay */
.cloud-gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 180px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0.9) 80%, #ffffff 100%);
    z-index: 10;
    pointer-events: none;
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none"><path d="M0,0 C200,60 400,100 500,30 C600,70 800,40 1000,80 L1000,100 L0,100 Z" /></svg>');
    mask-size: 100% 100%;
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none"><path d="M0,0 C200,60 400,100 500,30 C600,70 800,40 1000,80 L1000,100 L0,100 Z" /></svg>');
    -webkit-mask-size: 100% 100%;
    animation: cloudFloat 15s ease-in-out infinite alternate;
}

/* Add a second cloud layer for more depth */
.cloud-gradient-overlay::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 9;
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none"><path d="M0,20 C150,5 300,50 500,10 C700,40 850,10 1000,30 L1000,100 L0,100 Z" /></svg>');
    mask-size: 120% 100%;
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none"><path d="M0,20 C150,5 300,50 500,10 C700,40 850,10 1000,30 L1000,100 L0,100 Z" /></svg>');
    -webkit-mask-size: 120% 100%;
    animation: cloudFloatReverse 20s ease-in-out infinite alternate;
    opacity: 0.7;
}

/* Third cloud layer for more realistic effect */
.cloud-layer-three {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 60%, rgba(255,255,255,0.7) 90%, #ffffff 100%);
    z-index: 8;
    pointer-events: none;
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none"><path d="M0,40 C100,10 250,60 400,20 C550,40 750,5 900,30 C950,45 980,25 1000,40 L1000,100 L0,100 Z" /></svg>');
    mask-size: 150% 100%;
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none"><path d="M0,40 C100,10 250,60 400,20 C550,40 750,5 900,30 C950,45 980,25 1000,40 L1000,100 L0,100 Z" /></svg>');
    -webkit-mask-size: 150% 100%;
    animation: cloudFloatSlow 25s ease-in-out infinite alternate;
    opacity: 0.6;
}

@keyframes cloudFloat {
    0% {
        mask-position: 0% 0%;
        -webkit-mask-position: 0% 0%;
    }
    100% {
        mask-position: 100% 0%;
        -webkit-mask-position: 100% 0%;
    }
}

@keyframes cloudFloatReverse {
    0% {
        mask-position: 100% 0%;
        -webkit-mask-position: 100% 0%;
    }
    100% {
        mask-position: 0% 0%;
        -webkit-mask-position: 0% 0%;
    }
}

@keyframes cloudFloatSlow {
    0% {
        mask-position: 30% 0%;
        -webkit-mask-position: 30% 0%;
    }
    100% {
        mask-position: 70% 0%;
        -webkit-mask-position: 70% 0%;
    }
}

/* Ensure smooth transition between slideshow and content */
#slideshowContainer {
    margin-bottom: -2px;
}

.unified-section {
    margin-top: -2px;
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .floating,
    .glow,
    .cloud-gradient-overlay,
    .cloud-gradient-overlay::before,
    .cloud-layer-three {
        animation: none;
    }
    
    .fade-in,
    .slide-in,
    .zoom-in,
    .zoom-out,
    .card {
        transition: none;
        opacity: 1;
        transform: none;
    }
    
    .topology-canvas {
        display: none;
    }
}

/* Mobile Responsiveness Improvements */
@media (max-width: 768px) {
    .slideshow-container {
        height: 300px;
    }
    
    .prev, .next {
        padding: 12px;
        font-size: 16px;
    }
    
    .floating {
        animation: none;
    }
    
    .topology-canvas {
        opacity: 0.3;
    }
}

@media (max-width: 480px) {
    .slideshow-container {
        height: 250px;
    }
    
    .prev, .next {
        padding: 8px;
        font-size: 14px;
    }
}

/* Lazy Loading */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-image.loaded {
    opacity: 1;
}