/* ============================================================
   PERUMNAS KATALOG - Frontend Styles
   Mobile First Responsive Design
   ============================================================ */

:root {
    --primary: #00723F;
    --primary-light: #00965A;
    --primary-dark: #005A32;
    --primary-rgb: 0, 114, 63;
    --secondary: #F5A623;
    --secondary-dark: #D4911E;
    --accent: #E8F5E9;
    --dark: #1B2A1D;
    --dark-light: #2C3E2E;
    --light-bg: #F4F7F5;
    --gray: #6B7C6E;
    --gray-light: #A8B5AA;
    --white: #FFFFFF;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    background: var(--light-bg);
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---- Navbar ---- */
.navbar-perumnas {
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1050;
    transition: var(--transition);
}

.navbar-perumnas .navbar-brand {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-perumnas .navbar-brand img {
    height: 36px;
}

.navbar-perumnas .nav-link {
    color: var(--dark);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.navbar-perumnas .nav-link:hover,
.navbar-perumnas .nav-link.active {
    color: var(--primary);
    background: var(--accent);
}

/* ---- Hero Carousel ---- */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section .carousel-item {
    height: 60vh;
    min-height: 300px;
    max-height: 600px;
    position: relative;
}

.hero-section .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 3rem 2rem 2rem;
    color: var(--white);
}

.hero-overlay h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-overlay p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-overlay .btn-hero {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.hero-overlay .btn-hero:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 4px;
}

/* ---- Section Styles ---- */
.section {
    padding: 2.5rem 0;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header .btn-see-all {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ---- Stats Banner ---- */
.stats-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    padding: 1.5rem 0;
}

.stat-item {
    text-align: center;
    padding: 0.75rem;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    opacity: 0.85;
    margin-top: 0.25rem;
}

/* ---- Card Styles ---- */
.card-location {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    border: none;
}

.card-location:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-location .card-img-wrapper {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.card-location .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-location:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-location .card-body {
    padding: 1rem;
}

.card-location .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-location .card-meta {
    font-size: 0.8rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-distance {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(var(--primary-rgb), 0.9);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-province {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.6);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
}

/* Product card */
.card-product {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    border: none;
}

.card-product:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-product .card-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-product .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-product .card-body {
    padding: 1rem;
}

.card-product .product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.card-product .product-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.card-product .product-specs {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--gray);
    flex-wrap: wrap;
}

.card-product .product-specs span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Province card */
.card-province {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    border: 2px solid transparent;
}

.card-province:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.card-province .province-icon {
    width: 48px;
    height: 48px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: var(--primary);
    font-size: 1.2rem;
}

.card-province h6 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.card-province .count {
    font-size: 0.75rem;
    color: var(--gray);
}

/* ---- Buttons ---- */
.btn-primary-perumnas {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-primary-perumnas:hover {
    background: var(--primary-light);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.btn-outline-perumnas {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-outline-perumnas:hover {
    background: var(--primary);
    color: var(--white);
}

/* ---- Location Detail ---- */
.location-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.location-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.location-header .breadcrumb a {
    color: rgba(255,255,255,0.7);
}

.location-header .breadcrumb-item.active {
    color: var(--white);
}

/* ---- Location Hero Banner ---- */
.location-hero {
    position: relative;
    overflow: hidden;
    max-height: 400px;
}

.location-hero img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.location-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 30%, rgba(0,0,0,0.7));
    display: flex;
    align-items: flex-end;
    padding-bottom: 2rem;
    color: var(--white);
}

.location-hero-overlay h1 {
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    margin-bottom: 0.25rem;
}

.location-hero-overlay .breadcrumb a {
    color: rgba(255,255,255,0.7);
}

.location-hero-overlay .breadcrumb-item.active {
    color: var(--white);
}

.location-hero-overlay .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.5);
}

@media (min-width: 768px) {
    .location-hero,
    .location-hero img {
        max-height: 450px;
        height: 450px;
    }
    .location-hero-overlay h1 {
        font-size: 2.2rem;
    }
}

@media (min-width: 992px) {
    .location-hero,
    .location-hero img {
        max-height: 500px;
        height: 500px;
    }
    .location-hero-overlay h1 {
        font-size: 2.5rem;
    }
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.gallery-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-grid img:hover {
    opacity: 0.85;
}

.info-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.info-card h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
}

/* ---- Booking Form ---- */
.booking-form {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary);
}

.booking-form h5 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.booking-form .form-control,
.booking-form .form-select {
    border-radius: var(--radius-sm);
    border: 1px solid #ddd;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
}

.booking-form .form-control:focus,
.booking-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

/* ---- Footer ---- */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 2.5rem 0 1rem;
}

.footer h5 {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer a {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

.footer a:hover {
    color: var(--secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    text-align: center;
}

.footer .logo-footer {
    height: 40px;
    margin-bottom: 1rem;
}

/* ---- Loading / Skeleton ---- */
.skeleton {
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

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

/* ---- Search box ---- */
.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
    outline: none;
}

.search-box .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

/* ---- CTA Section ---- */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.cta-section h3 {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.cta-section p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.cta-section .btn {
    background: var(--secondary);
    color: var(--dark);
    font-weight: 700;
    border: none;
    padding: 0.7rem 2rem;
    border-radius: 50px;
}

.cta-section .btn:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

/* ---- Floating Form Minat Button ---- */
.btn-floating-minat {
    position: fixed;
    right: 0;
    top: 50%;
    z-index: 998;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border: none;
    border-radius: 16px 0 0 16px;
    padding: 14px 14px 12px 16px;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    cursor: pointer;
    box-shadow:
        -4px 4px 20px rgba(var(--primary-rgb), 0.5),
        -2px 2px 8px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.2);
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-floating-minat.show {
    opacity: 1;
    transform: translateX(0);
    animation: sideBouncyFloat 2.5s ease-in-out infinite;
}

.btn-floating-minat:hover {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-light), #00b35f);
    box-shadow:
        -6px 6px 30px rgba(var(--primary-rgb), 0.6),
        -2px 4px 14px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.3);
    animation: none !important;
    transform: translateX(-6px) !important;
}

.btn-floating-minat:active {
    transform: translateX(0) scale(0.94) !important;
}

.btn-floating-minat i {
    font-size: 1.6rem;
    animation: iconBouncyPulse 1.8s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.btn-floating-minat .btn-floating-label {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Ring ping effect */
.btn-floating-minat::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 20px 0 0 20px;
    border: 2px solid var(--primary);
    opacity: 0;
    animation: ringPing 3s ease-out infinite;
}

.btn-floating-minat::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 10px;
    width: 8px;
    height: 8px;
    background: #FF5252;
    border-radius: 50%;
    border: 2px solid var(--white);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    animation: dotBlink 1.5s ease-in-out infinite;
}

@keyframes sideBouncyFloat {
    0%   { transform: translateX(0); }
    15%  { transform: translateX(-10px); }
    30%  { transform: translateX(3px); }
    45%  { transform: translateX(-6px); }
    60%  { transform: translateX(1px); }
    75%  { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}

@keyframes iconBouncyPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    20%  { transform: scale(1.3) rotate(-8deg); }
    40%  { transform: scale(0.95) rotate(4deg); }
    60%  { transform: scale(1.15) rotate(-3deg); }
    80%  { transform: scale(1); }
}

@keyframes ringPing {
    0%   { opacity: 0.6; transform: scale(1); }
    70%  { opacity: 0; transform: scale(1.25); }
    100% { opacity: 0; transform: scale(1.25); }
}

@keyframes dotBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

/* Mobile: smaller, repositioned so fully visible */
@media (max-width: 767.98px) {
    .btn-floating-minat {
        top: auto;
        bottom: 80px;
        padding: 10px 10px 8px 12px;
        border-radius: 12px 0 0 12px;
    }

    .btn-floating-minat i {
        font-size: 1.25rem;
    }

    .btn-floating-minat .btn-floating-label {
        font-size: 0.45rem;
        letter-spacing: 0.5px;
    }

    .btn-floating-minat::after {
        top: 4px;
        left: 6px;
        width: 6px;
        height: 6px;
    }

    .btn-floating-minat::before {
        inset: -3px;
        border-radius: 15px 0 0 15px;
    }
}

/* Hide when form is visible in viewport */
.btn-floating-minat.near-form {
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
}

/* ---- Back to top ---- */
.btn-back-top {
    position: fixed;
    bottom: 28px;
    right: 24px;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    cursor: pointer;
    transition: var(--transition);
}

.btn-back-top.show {
    display: flex;
}

.btn-back-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ---- KPR Simulator ---- */
.kpr-simulator {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--secondary);
    margin-bottom: 1rem;
}

.kpr-simulator h5 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.kpr-simulator .form-label {
    margin-bottom: 0.3rem;
    color: #555;
}

.kpr-simulator .form-control {
    border-radius: var(--radius-sm);
    border: 1px solid #ddd;
    font-size: 0.85rem;
    padding: 0.45rem 0.65rem;
}

.kpr-simulator .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.kpr-simulator .input-group-text {
    font-size: 0.8rem;
    background: #f8f9fa;
    border-color: #ddd;
}

.kpr-simulator .dp-preset,
.kpr-simulator .btn-outline-secondary {
    font-size: 0.7rem;
    padding: 2px 10px;
}

.kpr-result {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 1.25rem;
}

.kpr-result-main {
    text-align: center;
    padding: 1.25rem 1rem 0.75rem;
    color: #fff;
}

.kpr-result-main small {
    color: rgba(255,255,255,0.8);
    font-size: 0.75rem;
}

.kpr-cicilan {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-top: 0.25rem;
    letter-spacing: -0.5px;
}

.kpr-result-detail {
    background: rgba(0,0,0,0.15);
    padding: 0.75rem 1rem;
}

.kpr-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
    padding: 3px 0;
}

.kpr-detail-row span:last-child {
    font-weight: 600;
    color: #fff;
}

.kpr-detail-row.total {
    border-top: 1px solid rgba(255,255,255,0.2);
    margin-top: 4px;
    padding-top: 6px;
    font-size: 0.8rem;
}

.kpr-detail-row.total span {
    font-weight: 700;
    color: #fff;
}

.kpr-disclaimer {
    font-size: 0.7rem;
    color: var(--gray-light);
    margin: 0.75rem 0 0;
    line-height: 1.4;
}

/* Standalone KPR page */
.kpr-page-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
}

.kpr-page-card .kpr-simulator {
    box-shadow: none;
    padding: 0;
    border-top: none;
}

.kpr-page-card .kpr-simulator h5 {
    font-size: 1.2rem;
}

.kpr-page-card .kpr-cicilan {
    font-size: 2rem;
}

.kpr-page-card .kpr-detail-row {
    font-size: 0.85rem;
}

/* ---- 404 ---- */
.page-404 {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.page-404 h1 {
    font-size: 5rem;
    font-weight: 800;
    color: var(--primary);
}

/* ---- Responsive (Tablet) ---- */
@media (min-width: 768px) {
    .hero-section .carousel-item {
        height: 70vh;
        max-height: 700px;
    }

    .hero-overlay h2 {
        font-size: 2rem;
    }

    .hero-overlay p {
        font-size: 1rem;
    }

    .section {
        padding: 3.5rem 0;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-grid img {
        height: 160px;
    }

    .card-location .card-img-wrapper {
        height: 200px;
    }
}

/* ---- Responsive (Desktop) ---- */
@media (min-width: 992px) {
    .hero-overlay h2 {
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .gallery-grid img {
        height: 180px;
    }
}

@media (min-width: 1200px) {
    .hero-section .carousel-item {
        height: 80vh;
        max-height: 800px;
    }
}
