/**
 * Design Improvements CSS
 * Perbaikan desain untuk website Pondokpanjang
 * File ini berisi CSS untuk mempercantik tampilan dengan tetap profesional
 */

/* ============================================
   1. HERO SECTION IMPROVEMENTS
   ============================================ */

.hero-slide {
    position: relative;
    overflow: hidden;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(139, 115, 85, 0.95) 0%, 
        rgba(107, 90, 69, 0.9) 50%,
        rgba(139, 115, 85, 0.95) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content > div {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ============================================
   2. SECTION HEADERS IMPROVEMENTS
   ============================================ */

.section-header {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.section-title {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--color-primary) 0%, 
        var(--color-primary-light) 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.section-title:hover::after {
    width: 100px;
}

.section-title i {
    background: linear-gradient(135deg, 
        var(--color-primary) 0%, 
        var(--color-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5em;
    filter: drop-shadow(0 2px 4px rgba(139, 115, 85, 0.2));
}

.section-link {
    color: var(--color-primary);
    position: relative;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.section-link:hover {
    color: var(--color-primary-dark);
    gap: 1rem;
}

.section-link:hover::after {
    width: 100%;
}

/* ============================================
   3. CARD DESIGN IMPROVEMENTS
   ============================================ */

.card {
    background: var(--color-white);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(139, 115, 85, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--color-primary) 0%, 
        var(--color-primary-light) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: 1;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--color-primary);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
}

.card-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(0, 0, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card:hover .card-img-wrapper::after {
    opacity: 1;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.card-title a {
    color: var(--color-gray-800);
    transition: color 0.2s ease;
}

.card-title a:hover {
    color: var(--color-primary);
}

.card-text {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-gray-600);
    margin-bottom: 1rem;
}

.card-date {
    font-size: 0.875rem;
    color: var(--color-gray-500);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

/* Staggered animation for cards */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }

/* ============================================
   4. PENGUMUMAN TICKER IMPROVEMENTS
   ============================================ */

.pengumuman-ticker {
    background: linear-gradient(135deg, 
        #f8fafc 0%, 
        #f1f5f9 100%);
    border: 1px solid rgba(139, 115, 85, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.pengumuman-ticker::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, 
        var(--color-primary) 0%, 
        var(--color-primary-light) 100%);
}

.pengumuman-ticker-item i {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.1); 
    }
}

.pengumuman-ticker-item a {
    transition: color 0.2s ease;
}

.pengumuman-ticker-item a:hover {
    color: var(--color-primary);
}

/* ============================================
   5. SPACING & LAYOUT IMPROVEMENTS
   ============================================ */

section {
    margin-bottom: 4rem;
}

.section-berita,
.section-pengumuman,
.section-kalender,
.section-galeri,
.section-video {
    padding: 2rem 0;
}

.content-area {
    padding: 2rem;
}

@media (min-width: 992px) {
    .content-area {
        padding: 3rem;
    }
    
    section {
        margin-bottom: 5rem;
    }
}

/* ============================================
   6. TYPOGRAPHY IMPROVEMENTS
   ============================================ */

h2.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

h3.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

/* ============================================
   7. BUTTON IMPROVEMENTS
   ============================================ */

.btn-hero {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.btn-hero:hover::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   8. ANIMATIONS
   ============================================ */

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

/* ============================================
   9. RESPONSIVE IMPROVEMENTS
   ============================================ */

@media (max-width: 767.98px) {
    .hero-content > div {
        padding: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    section {
        margin-bottom: 3rem;
    }
    
    .section-title::after {
        width: 40px;
    }
}

/* ============================================
   10. LOADING STATES
   ============================================ */

.card-skeleton {
    background: linear-gradient(90deg, 
        #f0f0f0 25%, 
        #e0e0e0 50%, 
        #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 16px;
    height: 300px;
}

@keyframes loading {
    0% { 
        background-position: 200% 0; 
    }
    100% { 
        background-position: -200% 0; 
    }
}

/* ============================================
   11. SMOOTH SCROLL
   ============================================ */

html {
    scroll-behavior: smooth;
}

/* ============================================
   12. FOCUS STATES (Accessibility)
   ============================================ */

.card-title a:focus,
.section-link:focus,
.btn-hero:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   13. PRINT STYLES
   ============================================ */

@media print {
    .card:hover {
        transform: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .section-link::after {
        display: none;
    }
}

/* ============================================
   14. LAYANAN MENU (Kategori-style)
   ============================================ */

.section-layanan .android-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.25rem;
    padding: 0.5rem 0;
}

.section-layanan .android-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, rgba(var(--item-color-rgb), 0.1) 0%, rgba(var(--item-color-rgb), 0.05) 100%);
    border: 2px solid rgba(var(--item-color-rgb), 0.15);
    border-radius: 16px;
    text-decoration: none;
    color: #1a1a1a;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    animation: androidFadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.section-layanan .android-menu-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--item-color) 0%, rgba(var(--item-color-rgb), 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.section-layanan .android-menu-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(var(--item-color-rgb), 0.25);
    border-color: var(--item-color);
}

.section-layanan .android-menu-item:hover::before {
    opacity: 0.1;
}

.section-layanan .android-menu-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--item-color) 0%, rgba(var(--item-color-rgb), 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(var(--item-color-rgb), 0.2);
}

.section-layanan .android-menu-item:hover .android-menu-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(var(--item-color-rgb), 0.35);
}

.section-layanan .android-menu-icon-wrapper i {
    font-size: 1.5rem;
    color: #fff;
    transition: transform 0.3s ease;
}

.section-layanan .android-menu-item:hover .android-menu-icon-wrapper i {
    transform: scale(1.1);
}

.section-layanan .android-menu-label {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
    position: relative;
    z-index: 1;
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.section-layanan .android-menu-item:hover .android-menu-label {
    color: var(--item-color);
    font-weight: 600;
}

@keyframes androidFadeInUp {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 767.98px) {
    .section-layanan .android-menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.9rem;
    }

    .section-layanan .android-menu-item {
        padding: 1rem 0.5rem;
    }

    .section-layanan .android-menu-icon-wrapper {
        width: 46px;
        height: 46px;
    }

    .section-layanan .android-menu-icon-wrapper i {
        font-size: 1.2rem;
    }

    .section-layanan .android-menu-label {
        font-size: 0.8rem;
    }
}

/* ============================================
   15. UMKM MOBILE CAROUSEL
   ============================================ */

.umkm-carousel-mobile {
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, #ff7a18 0%, #ff3d71 60%, #ff2d55 100%);
    box-shadow: 0 10px 24px rgba(255, 77, 45, 0.25);
    position: relative;
    overflow: hidden;
}

.umkm-carousel-mobile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35) 0%, transparent 45%),
                radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 30% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

.umkm-carousel-mobile .carousel-inner {
    position: relative;
    z-index: 1;
}

@media (max-width: 767.98px) {
    .umkm-carousel-mobile {
        padding: 0.75rem;
        margin: 0;
    }
}

.umkm-mobile-card {
    display: block;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(139, 115, 85, 0.15);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.umkm-mobile-card:hover {
    transform: translateY(-3px);
    border-color: rgba(139, 115, 85, 0.4);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.umkm-mobile-image {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    background: #f3f4f6;
}

.umkm-mobile-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.umkm-mobile-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 1.5rem;
}

.umkm-mobile-body {
    padding: 0.6rem 0.7rem 0.75rem;
}

.umkm-mobile-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    color: #111827;
    margin: 0 0 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.2em;
}

.umkm-mobile-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ff3d00;
    margin: 0;
}

.umkm-carousel-mobile .carousel-control-prev,
.umkm-carousel-mobile .carousel-control-next {
    width: 36px;
    height: 36px;
    top: 45%;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    backdrop-filter: blur(4px);
}

.umkm-carousel-mobile .carousel-control-prev-icon,
.umkm-carousel-mobile .carousel-control-next-icon {
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.umkm-carousel-mobile .carousel-indicators {
    bottom: -22px;
}

.umkm-carousel-mobile .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    border: none;
}

.umkm-carousel-mobile .carousel-indicators .active {
    background-color: #ffffff;
}

/* Force hero height auto for UMKM mobile carousel */
@media (max-width: 767.98px) {
    .hero-section-umkm {
        height: auto !important;
        min-height: unset !important;
        padding: 0 !important;
    }

    .hero-section-umkm .carousel,
    .hero-section-umkm .carousel-inner,
    .hero-section-umkm .carousel-item {
        height: auto !important;
        min-height: unset !important;
    }
}

/* Ensure mobile bottom nav is always fixed */
@media (max-width: 767.98px) {
    .bottom-nav {
        display: flex !important;
        position: fixed !important;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2000;
        visibility: visible !important;
        opacity: 1 !important;
        transform: translateZ(0);
    }

    .main-content {
        padding-bottom: 80px;
    }

    body {
        padding-bottom: 80px;
    }
}

@media (max-width: 575.98px) {
    .section-layanan .android-menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
}
