/* Global Styles */
/* Global Styles */
:root {
    /* Light Mode Palette */
    --primary-color: #0d6efd;
    --sampang-blue: #0056b3;
    --sampang-light-blue: #e3f2fd;
    --sampang-accent: #0dcaf0;

    --bg-body: #fafafa;
    --bg-card: #ffffff;
    --bg-navbar-scrolled: rgba(255, 255, 255, 0.95);
    --bg-light-section: #f8f9fa;
    --bg-footer: #222;

    --text-main: #2c3e50;
    --text-muted: #6c757d;
    --text-inverse: #ffffff;

    --border-color: rgba(0, 0, 0, 0.05);
    --shadow-color: rgba(0, 86, 179, 0.1);

    --transition-speed: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --box-shadow-soft: 0 10px 40px -10px var(--shadow-color);
    --box-shadow-hover: 0 20px 50px -10px rgba(0, 86, 179, 0.2);
    --border-radius-lg: 1.5rem;
    --border-radius-md: 1rem;
}



/* Antigravity Transitions */
body,
.card,
.navbar,
.section-padding,
.bg-light,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
i {
    transition: background-color 0.5s ease, color 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    line-height: 1.8;
    /* Increased for breathing room */
    overflow-x: hidden;
    background-color: var(--bg-body);
}

/* Gradient Text Utility - Youthful Vibe */
.text-gradient {
    background: linear-gradient(135deg, var(--sampang-blue), var(--sampang-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Scroll Animation Styles */
.hidden {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.show {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    line-height: 1.8;
    /* Increased for breathing room */
    overflow-x: hidden;
    background-color: var(--bg-body);
}

/* Gradient Text Utility - Youthful Vibe */
.text-gradient {
    background: linear-gradient(135deg, var(--sampang-blue), var(--sampang-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Scroll Animation Styles */
.hidden {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.show {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.5px;
    /* Modern tight spacing */
    margin-bottom: 1rem;
    color: var(--text-main);
}

section {
    position: relative;
    overflow: hidden;
}

.section-padding {
    padding: 100px 0;
    /* More whitespace */
}

/* Navigation - Modern Glass */
/* Navigation - Modern Glass */
.navbar {
    transition: all 0.4s ease;
    padding: 20px 0;
    background: transparent;
    backdrop-filter: none;
}

.navbar.scrolled {
    padding: 15px 0;
    background: var(--bg-navbar-scrolled);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff !important;
    letter-spacing: -1px;
    transition: color 0.3s ease;
}

.navbar-brand span {
    transition: color 0.3s ease;
}

.navbar.scrolled .navbar-brand {
    color: var(--text-main) !important;
}

.navbar.scrolled .navbar-brand .text-white-50 {
    color: var(--text-muted) !important;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff !important;
    margin: 0 10px;
    padding: 8px 5px !important;
    position: relative;
    border-radius: 0;
    transition: color 0.3s ease;
}

.navbar.scrolled .nav-link {
    color: var(--text-main) !important;
}

/* Elegant Underline Effect */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 0;
    background-color: var(--sampang-light-blue);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff !important;
    /* No background change, just line */
    background: transparent;
    transform: translateY(0);
    /* Remove jump */
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
    color: var(--sampang-blue) !important;
    background: transparent;
}

/* Navbar Toggle */
.navbar-toggler {
    border: none;
    outline: none;
    box-shadow: none !important;
}

/* Mobile Menu Glassmorphism */
@media (max-width: 991px) {
    .navbar-collapse {
        margin-top: 15px;
        background: var(--bg-card);
        backdrop-filter: blur(10px);
        padding: 20px;
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }



    .nav-link {
        color: var(--text-main) !important;
        margin: 5px 0;
        border-bottom: 1px solid var(--border-color);
    }
}

.navbar .btn {
    font-size: 0.85rem;
    padding: 8px 20px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--sampang-blue), #0069d9);
    border: none;
    border-radius: 50px;
    /* Youthful pill shape */
    padding: 12px 30px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.4);
    background: linear-gradient(45deg, #0069d9, var(--sampang-blue));
}

/* Hero Section */
#hero {
    width: 100%;
    height: 100vh;
    /* Full screen impact */
    margin-top: -86px;
    /* Offset for taller navbar */
    padding-top: 86px;
    position: relative;
    background-color: #333;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    #hero {
        height: 450px;
    }
}

/* Wave Divider */
.custom-shape-divider-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 1;
    pointer-events: none;
    /* Ensure clicks pass through */
}

.custom-shape-divider-bottom svg {
    position: relative;
    display: block;
    width: calc(133% + 1.3px);
    height: 100px;
}

.custom-shape-divider-bottom .shape-fill {
    fill: rgba(255, 255, 255, 0.5);
    /* Semi-transparent White */
}

#hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Semi-transparent black overlay */
    z-index: 1;
}

#hero .container {
    z-index: 2;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

.animate-slide-up {
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

.delay-1 {
    animation-delay: 0.6s;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.animate-bounce {
    animation: bounce 2s infinite;
    animation-delay: 1.5s;
}

/* Divider */
.divider {
    width: 60px;
    height: 4px;
    background-color: var(--sampang-blue);
    border-radius: 2px;
}

/* Card Styles & Hover Effects */
/* Card Styles & Hover Effects */
.card,
.team-card,
.potensi-card,
.feature-box,
.gambutan-card {
    border: none;
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-soft);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden;
    /* Ensure images don't bleed */
}

.card:hover,
.team-card:hover,
.potensi-card:hover,
.feature-box:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-hover) !important;
}

.hover-effect {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.hover-effect:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
}

.hover-up {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-up:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Kontak Icon Box */
.icon-box {
    width: 50px;
    height: 50px;
    background-color: var(--sampang-light-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Footer */
footer {
    background-color: var(--bg-footer);
}

/* Profil Section Tabs */
.nav-pills .nav-link {
    color: var(--sampang-blue);
    background-color: transparent;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-pills .nav-link:hover {
    background-color: rgba(0, 74, 153, 0.1);
    transform: translateY(-2px);
}

.nav-pills .nav-link.active {
    background-color: var(--sampang-blue) !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(0, 74, 153, 0.3);
}

.tab-content {
    border: 1px solid var(--border-color);
}

/* Decorative Background */
.decorative-bg {
    background-color: var(--bg-body);
    background-image:
        radial-gradient(at 0% 0%, hsla(210, 100%, 76%, 0.2) 0px, transparent 50%),
        radial-gradient(at 50% 100%, hsla(200, 100%, 86%, 0.2) 0px, transparent 50%),
        linear-gradient(135deg, var(--bg-card) 0%, var(--bg-light-section) 100%);
    background-attachment: fixed;
}

.decorative-bg section {
    background-color: transparent !important;
}

.decorative-bg .card,
.decorative-bg .history-content,
.decorative-bg figure,
.decorative-bg .team-card {
    background: var(--bg-card) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.decorative-bg .bg-light {
    background-color: var(--bg-light-section) !important;
}

.decorative-bg .bg-white {
    background-color: var(--bg-card) !important;
}

.decorative-bg .accordion-item {
    background-color: var(--bg-card);
}

/* Hero Text Styles */
#hero h1,
#hero h2,
#hero p {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.hero-title {
    font-size: 3.5rem;
    /* Larger, bolder */
    font-weight: 800;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -1px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    /* Modern soft shadow */
    margin-bottom: 1rem;
    line-height: 1.1;
}

/* Feature Box (Layanan) */
.feature-box {
    background: var(--bg-card);
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.feature-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--sampang-blue);
    opacity: 0;
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.feature-box:hover::before {
    opacity: 1;
}

.feature-icon-wrapper {
    width: 70px;
    height: 70px;
    background: rgba(13, 110, 253, 0.1);
    color: var(--sampang-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.feature-box:hover .feature-icon-wrapper {
    background: var(--sampang-blue);
    color: #fff;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
}

/* Hero Overlay via Pseudo-element */
.carousel-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Semi-transparent black */
    z-index: 1;
}

/* Ensure caption is above the overlay */
.carousel-caption {
    z-index: 2;
}

/* --- Sambutan Section Enhancements --- */
#sambutan {
    background-color: var(--bg-light-section);
    /* Safe fallback */
    background-image:
        radial-gradient(at 100% 0%, hsla(210, 100%, 90%, 0.5) 0px, transparent 50%),
        radial-gradient(at 0% 100%, hsla(200, 100%, 90%, 0.5) 0px, transparent 50%);
    position: relative;
    overflow: hidden;
}

.sambutan-card {
    background: var(--bg-card);
    border: none;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--box-shadow-soft);
    position: relative;
    z-index: 2;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.sambutan-card:hover {
    transform: translateY(-5px);
}

/* Decorative huge quote icon */
.sambutan-card::before {
    content: '\F557';
    /* Bootstrap Icon: quote */
    font-family: 'bootstrap-icons';
    position: absolute;
    top: -20px;
    right: 20px;
    font-size: 15rem;
    color: var(--sampang-blue);
    opacity: 0.05;
    pointer-events: none;
    line-height: 1;
}

/* Badge specific style for Kades title */
.badge-kades {
    background: var(--sampang-blue);
    color: #fff;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0, 74, 153, 0.3);
}

.kades-img-container {
    padding: 15px;
    position: relative;
    z-index: 2;
}

.kades-img-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px dashed var(--sampang-blue);
    animation: rotate 20s linear infinite;
    z-index: -1;
    opacity: 0.5;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.blockquote-custom {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    font-style: italic;
}

/* Potensi Desa Section Styles */
.potensi-card {
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.potensi-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2) !important;
}

.potensi-img-wrapper img {
    transform: scale(1);
}

.potensi-card:hover .potensi-img-wrapper img {
    transform: scale(1.1);
}

.potensi-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
    z-index: 2;
}

.potensi-content {
    transform: translateY(10px);
    transition: transform 0.3s ease;
}


/* Running Text Animation */
.running-text-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(90deg, var(--sampang-blue), #004e92, var(--sampang-blue));
    color: #fff;
    overflow: hidden;
    white-space: nowrap;
    z-index: 2000;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.running-text-label {
    background: #ffc107;
    /* Warning yellow for contrast */
    color: #000;
    font-weight: 800;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2001;
    font-size: 0.8rem;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.running-text {
    display: inline-block;
    padding-left: 20px;
    /* Gap after label */
    animation: marquee 25s linear infinite;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Adjust Navbar to sit below running text */
.navbar {
    top: 40px;
    /* Height of running text */
}

@keyframes marquee {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-100%, 0);
    }
}

/* Profil Tabs Styling - Premium Solid Look */
#pills-tab button.nav-link,
#pills-tab button.nav-link:focus,
#pills-tab button.nav-link:active {
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
    font-weight: 700;
    border: 0 !important;
    /* Force remove border */
    outline: none !important;
    /* Force remove outline */
    border-radius: 12px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s ease;
    margin: 0 8px;
    opacity: 1 !important;
    padding: 12px 24px !important;
}

#pills-tab button.nav-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
    background-color: var(--bg-light-section) !important;
    color: var(--sampang-blue) !important;
}

#pills-tab button.nav-link.active {
    background: linear-gradient(135deg, var(--sampang-blue), #004e92) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.4) !important;
    transform: scale(1.05);
}

/* Floating Language Switcher */
#floating-lang-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1050;
}

#floating-lang-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

#floating-lang-btn:hover,
#floating-lang-btn[aria-expanded='true'] {
    transform: scale(1.1);
    background: var(--sampang-blue);
}

.lang-dropdown-menu {
    bottom: 100% !important;
    /* Pop upwards */
    top: auto !important;
    right: 0 !important;
    left: auto !important;
    margin-bottom: 15px !important;
    border-radius: 15px;
    padding: 10px;
    min-width: 160px;
    transform-origin: bottom right;
    animation: fadeInUp 0.3s ease;
}

.lang-dropdown-menu .dropdown-item {
    border-radius: 10px;
    padding: 8px 15px;
    font-weight: 500;
    transition: all 0.2s;
}

.lang-dropdown-menu .dropdown-item:hover {
    background-color: var(--sampang-light-blue);
    color: var(--sampang-blue);
}

.lang-dropdown-menu .dropdown-item.active {
    background-color: var(--sampang-blue);
    color: white;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fix for Operating Hours Badge on Mobile to maintain layout consistency */
.text-fixed {
    white-space: normal;
    /* Allow nice wrapping */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (max-width: 576px) {
    .text-fixed {
        font-size: 0.7rem !important;
        /* Smaller text */
        padding: 6px 15px !important;
        /* Compact padding */
        line-height: 1.2;
        max-width: 90%;
        /* Prevent horizontal overflow */
    }

    .text-fixed i {
        margin-right: 5px !important;
    }
}

/* --- Responsive Audit Fixes (Profil Desa & Global) --- */
@media (max-width: 991px) {
    /* Adjust Section Padding/Spacing */
    .section-padding {
        padding: 60px 0;
    }

    /* Navbar Branding Adjustments */
    .navbar-brand img {
        height: 40px;
    }

    .navbar-brand div span:first-child {
        font-size: 1rem !important;
    }

    .navbar-brand div span:last-child {
        font-size: 0.55rem !important;
    }

    /* Hero Height on Tablet/Mobile */
    #hero {
        height: auto;
        min-height: 500px;
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    /* Adjust Heading Sizes */
    h2 {
        font-size: 1.75rem;
    }
    
    h4 {
        font-size: 1.3rem;
    }

    /* Profil Tabs - Better Mobile Experience */
    #pills-tab {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start !important;
        padding-bottom: 10px; /* Space for scrollbar if needed */
        -webkit-overflow-scrolling: touch;
    }

    #pills-tab .nav-item {
        flex: 0 0 auto;
    }

    #pills-tab button.nav-link {
        padding: 10px 16px !important;
        font-size: 0.85rem;
        white-space: nowrap;
        margin: 0 4px;
    }

    /* Table Adjustments */
    .table-responsive {
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius-md);
    }
    
    /* Stats Cards in Ekonomi */
    .card h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .section-padding {
        padding: 40px 0;
    }

    /* Stack Tabs on very small screens for better clickability */
    #pills-tab {
        flex-wrap: wrap;
        overflow-x: visible;
        flex-direction: column;
    }

    #pills-tab .nav-item {
        width: 100%;
        margin-bottom: 8px;
    }

    #pills-tab button.nav-link {
        width: 100%;
        margin: 0;
        text-align: center;
        justify-content: center;
    }

    /* Running Text Adjustment */
    .running-text-label {
        padding: 0 10px;
        font-size: 0.7rem;
    }
}