/* Public Pages Enhancement - Animations & Modern Effects */

/* Smooth transitions & animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Hero Section Enhancements */
.hero-carousel {
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    animation: fadeInUp 0.8s ease-out;
}

.hero-slide {
    animation: fadeInUp 0.8s ease-out;
}

.hero-text h2 {
    animation: slideInUp 1s ease-out 0.3s both;
}

.hero-text p {
    animation: slideInUp 1s ease-out 0.5s both;
}

.hero-text button {
    animation: slideInUp 1s ease-out 0.7s both;
    position: relative;
    overflow: hidden;
}

.hero-text button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    transition: left 0.5s ease;
}

.hero-text button:hover::before {
    left: 100%;
}

/* Card Animations */
.card {
    animation: fadeInUp 0.6s ease-out;
}

.card:nth-child(2) {
    animation-delay: 0.1s;
}

.card:nth-child(3) {
    animation-delay: 0.2s;
}

.card h3 {
    position: relative;
    transition: color 0.3s ease;
}

.card h3::after {
    transition: width 0.3s ease;
}

.card:hover h3::after {
    width: 60px;
}

/* Profil Items */
.profil-item {
    animation: scaleIn 0.5s ease-out;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profil-item:nth-child(1) {
    animation-delay: 0.1s;
}

.profil-item:nth-child(2) {
    animation-delay: 0.2s;
}

.profil-item:nth-child(3) {
    animation-delay: 0.3s;
}

.profil-icon-wrapper {
    box-shadow: 0 8px 16px rgba(11,77,162,0.15);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profil-item:hover .profil-icon-wrapper {
    box-shadow: 0 12px 24px rgba(11,77,162,0.25);
}

/* Button Animations */
.btn-orange {
    position: relative;
    overflow: hidden;
}

.btn-orange::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-orange:active::after {
    width: 300px;
    height: 300px;
}

/* Running Text */
.running-text-container {
    animation: slideInDown 0.6s ease-out;
}

.news-item {
    animation: shimmer 2s ease-in-out infinite;
}

/* Menu Items */
.menu > li > a {
    position: relative;
    transition: all 0.3s ease;
}

.menu > li > a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary, #ff6b35);
    transition: width 0.3s ease;
}

.menu > li:hover > a::before {
    width: 100%;
}

/* Berita Grid */
.berita-grid {
    animation: fadeInUp 0.8s ease-out;
}

.blog-card {
    animation: fadeInUp 0.6s ease-out;
}

.blog-card:nth-child(1) {
    animation-delay: 0.1s;
}

.blog-card:nth-child(2) {
    animation-delay: 0.2s;
}

.blog-card:nth-child(3) {
    animation-delay: 0.3s;
}

.blog-card-thumb {
    overflow: hidden;
    position: relative;
}

.blog-card-thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover .blog-card-thumb::after {
    opacity: 1;
}

.blog-card-thumb img {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.blog-card:hover .blog-card-thumb img {
    transform: scale(1.08);
}

/* Galeri Items */
.galeri-foto-item {
    animation: scaleIn 0.5s ease-out;
}

.galeri-foto-item:nth-child(1) {
    animation-delay: 0.05s;
}

.galeri-foto-item:nth-child(2) {
    animation-delay: 0.1s;
}

.galeri-foto-item:nth-child(3) {
    animation-delay: 0.15s;
}

.galeri-foto-item:nth-child(4) {
    animation-delay: 0.2s;
}

.galeri-foto-item img {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.galeri-foto-item:hover img {
    transform: scale(1.12);
}

/* Testimoni Carousel */
.testimoni-slide {
    animation: fadeInUp 0.6s ease-out;
}

/* Partnership Carousel */
.partnership-item {
    animation: slideInLeft 0.8s ease-out;
    transition: transform 0.3s ease;
}

.partnership-item:hover {
    transform: scale(1.1);
}

/* Modal Animations */
.modal {
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: slideUp 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Animations */
@media (max-width: 768px) {
    .card {
        animation: fadeInUp 0.5s ease-out;
    }

    .blog-card {
        animation: fadeInUp 0.5s ease-out;
    }

    .profil-item {
        animation: scaleIn 0.4s ease-out;
    }

    .hero-text h2 {
        animation-delay: 0.1s;
    }

    .hero-text p {
        animation-delay: 0.2s;
    }

    .hero-text button {
        animation-delay: 0.3s;
    }
}

/* Loading State */
.loading {
    animation: shimmer 1.5s ease-in-out infinite;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Focus States untuk Accessibility */
.btn-orange:focus,
.card:focus,
.blog-card:focus {
    outline: 2px solid var(--primary, #0b4da2);
    outline-offset: 2px;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Transition untuk semua elemen */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
