/* ===================================
   Gopolice - Responsive Styles
   Hanya perbaikan tampilan, struktur konten tidak diubah
   =================================== */

/* ---------- Container & spacing global ---------- */
@media (max-width: 991px) {
    .container,
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .container,
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* ========== Extra Large (≥1200px) ========== */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    .hero-content h1 {
        font-size: 4.5rem;
    }
}

/* ========== Large (992px - 1199px) ========== */
@media (max-width: 1199px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
    .section-title h2 {
        font-size: 2.5rem;
    }
}

/* ========== Medium - Tablet & Mobile: menu disembunyikan, tampil overlay saat hamburger diklik (seperti Kitago) ========== */
@media (max-width: 991px) {
    .navbar {
        position: relative;
    }
    .navbar .container-fluid {
        position: relative;
        flex-wrap: wrap;
    }
    /* Tombol hamburger (garis 3): jelas terlihat, area tap nyaman */
    .navbar-toggler {
        padding: 0.5rem 0.6rem;
        min-width: 48px;
        min-height: 48px;
        border: 2px solid rgba(255, 255, 255, 0.6) !important;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .navbar-toggler:hover,
    .navbar-toggler:focus {
        border-color: #fff !important;
        box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.4);
        outline: none;
    }
    .navbar-toggler-icon {
        width: 1.5rem;
        height: 1.25rem;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        transition: opacity 0.2s ease;
    }
    .navbar-toggler.active .navbar-toggler-icon {
        opacity: 0;
    }
    /* Menu navigasi disembunyikan secara default — tampil hanya saat class .open (toggle manual seperti Kitago) */
    .navbar-collapse {
        display: none !important;
        padding: 0;
        margin: 0;
    }
    .navbar-collapse.open {
        display: flex !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: linear-gradient(180deg, #0a192f 0%, #1e3a8a 100%);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        padding: 0.75rem 0;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        z-index: 9998;
        border-top: 2px solid rgba(251, 191, 36, 0.4);
    }
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        text-align: left;
        padding: 0;
        margin: 0;
    }
    .navbar-nav .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }
    .navbar-nav .nav-link {
        padding: 1rem 1.25rem !important;
        font-size: 1rem;
        min-height: 50px;
        display: flex;
        align-items: center;
        color: #fff !important;
    }
    .navbar-nav .nav-link.active {
        color: var(--secondary-color) !important;
        background: rgba(255, 255, 255, 0.06);
    }
    /* Dropdown di mobile: submenu rapi di dalam overlay */
    .navbar-nav .dropdown-menu {
        position: static !important;
        float: none;
        display: none;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.25);
        margin: 0 0 0.25rem 1rem;
        padding: 0.4rem 0;
        border-left: 3px solid var(--secondary-color);
        border-radius: 0 8px 8px 0;
    }
    .navbar-nav .dropdown.show .dropdown-menu {
        display: block !important;
    }
    .navbar-nav .dropdown .dropdown-item {
        padding: 0.7rem 1rem;
        color: rgba(255, 255, 255, 0.95);
    }
    .navbar-nav .dropdown .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
    .navbar-actions {
        margin-left: 0;
        margin-top: 1rem;
        justify-content: flex-start;
    }
    .btn-register {
        width: auto;
        max-width: 220px;
    }
    .hero-content h1 {
        font-size: 2.75rem;
        line-height: 1.2;
    }
    .hero-content .lead {
        font-size: 1.2rem;
    }
    .section-title h2 {
        font-size: 2.2rem;
    }
    .section-title {
        margin-bottom: 3rem;
    }
    .section-title p {
        font-size: 1.05rem;
    }
    .stats-section {
        margin-top: -70px;
        padding: 3rem 1rem;
    }
    .stat-number {
        font-size: 2.75rem;
    }
    .stat-label {
        font-size: 1rem;
    }
    .section {
        padding: 4rem 0;
    }
}

/* ========== Small - Mobile landscape & besar (576px - 768px) ========== */
@media (max-width: 768px) {
    body.has-topbar {
        padding-top: 100px;
    }
    body:not(.has-topbar) {
        padding-top: 0;
    }

    /* ---- Top bar mobile ---- */
    .gopolice-top-bar {
        padding: 0.4rem 0;
        font-size: 0.8rem;
    }
    .gopolice-top-bar .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .gopolice-top-bar-inner {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .gopolice-top-bar-left {
        gap: 0.5rem;
    }
    .gopolice-top-bar-left .gopolice-top-item span {
        display: none;
    }
    .gopolice-top-bar-left .gopolice-top-item {
        padding: 0.35rem;
    }
    .gopolice-top-bar-right {
        gap: 0.35rem;
    }
    .gopolice-top-social {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    .gopolice-top-login {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    .gopolice-top-login span {
        display: inline;
    }

    /* ---- Navbar mobile ---- */
    .navbar {
        padding: 0.5rem 0;
    }
    .navbar .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    .logo-img {
        height: 42px;
        margin-right: 8px;
    }
    .brand-text {
        font-size: 0.95rem;
        line-height: 1.2;
    }
    .navbar-toggler {
        padding: 0.5rem 0.6rem;
        min-width: 48px;
        min-height: 48px;
    }
    .navbar-actions {
        margin-left: 0;
        margin-top: 0.75rem;
        width: 100%;
    }
    .btn-register {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }

    /* ---- Hero section ---- */
    .hero-section {
        min-height: 85vh;
        min-height: 520px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .hero-content {
        padding: 1.25rem 1rem;
        max-width: 100%;
    }
    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.25;
        margin-bottom: 1rem;
    }
    .hero-content .lead {
        font-size: 1.05rem;
        margin-bottom: 1.5rem;
    }
    .hero-content .mt-4 {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        margin-top: 1.25rem !important;
    }
    .hero-content .mt-4 .btn-hero {
        margin: 0 !important;
        width: 100%;
        max-width: 280px;
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
        text-align: center;
    }

    /* ---- Statistics ---- */
    .stats-section {
        margin-top: -50px;
        padding: 2rem 0.75rem;
        border-radius: 24px 24px 0 0;
    }
    .stats-section .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    .stats-section [class*="col-"] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        margin-bottom: 0.75rem;
    }
    .stat-box {
        padding: 1.25rem 0.75rem;
    }
    .stat-number {
        font-size: 2.25rem;
        margin-bottom: 0.25rem;
    }
    .stat-label {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    /* ---- Sections umum ---- */
    .section {
        padding: 3rem 0;
    }
    .section-title {
        margin-bottom: 2.5rem;
    }
    .section-title h2 {
        font-size: 1.85rem;
        line-height: 1.3;
    }
    .section-title p {
        font-size: 0.95rem;
        margin-top: 1rem;
    }

    /* ---- Cards & feature ---- */
    .card-img-top {
        height: 180px;
    }
    .card-body {
        padding: 1.25rem;
    }
    .card-title {
        font-size: 1.2rem;
    }
    .feature-box {
        padding: 1.75rem 1.25rem;
        margin-bottom: 1rem;
    }
    .feature-icon {
        font-size: 2.75rem;
    }
    .feature-box h4 {
        font-size: 1.15rem;
    }
    .feature-box p {
        font-size: 0.95rem;
    }

    /* ---- Typography global ---- */
    h1 {
        font-size: 1.85rem;
    }
    h2 {
        font-size: 1.65rem;
    }
    h3 {
        font-size: 1.35rem;
    }
    p {
        font-size: 0.95rem;
    }

    /* ---- Footer ---- */
    .footer {
        text-align: center;
        padding: 2.5rem 0 !important;
    }
    .footer .col-lg-4,
    .footer .col-md-6 {
        margin-bottom: 1.75rem;
    }
    .footer h5 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    .footer p,
    .footer .text-muted,
    .footer ul li a {
        font-size: 0.95rem;
    }
    .footer .slogan-text {
        font-size: 1.15rem;
    }
}

/* ========== Extra small - HP (≤576px) ========== */
@media (max-width: 576px) {
    body.has-topbar {
        padding-top: 96px;
    }

    .gopolice-top-bar .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .hero-section {
        min-height: 80vh;
        min-height: 480px;
    }
    .hero-content {
        padding: 1rem 0.75rem;
    }
    .hero-content h1 {
        font-size: 1.65rem;
        margin-bottom: 0.75rem;
    }
    .hero-content .lead {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }
    .hero-content .mt-4 .btn-hero {
        max-width: 100%;
        padding: 0.85rem 1.25rem;
        font-size: 0.9rem;
    }

    .stats-section {
        margin-top: -40px;
        padding: 1.75rem 0.5rem;
        border-radius: 20px 20px 0 0;
    }
    .stat-box {
        padding: 1rem 0.5rem;
    }
    .stat-number {
        font-size: 1.85rem;
    }
    .stat-label {
        font-size: 0.8rem;
    }

    .section {
        padding: 2.5rem 0;
    }
    .section-title {
        margin-bottom: 2rem;
    }
    .section-title h2 {
        font-size: 1.6rem;
    }
    .section-title p {
        font-size: 0.9rem;
    }

    /* CTA section - tombol stack rapi */
    .section.bg-primary {
        padding-top: 2rem !important;
        padding-bottom: 3rem !important;
    }
    .section.bg-primary h2 {
        font-size: 1.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    .section.bg-primary .lead {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem !important;
    }
    .section.bg-primary .mt-4 {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.75rem !important;
        width: 100%;
    }
    .section.bg-primary .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        margin: 0 !important;
        padding: 0.85rem 1.5rem;
        font-size: 0.9rem;
    }

    .card-body {
        padding: 1rem;
    }
    .card-title {
        font-size: 1.1rem;
    }
    .feature-box {
        padding: 1.5rem 1rem;
    }
    .feature-icon {
        font-size: 2.5rem;
    }
    .feature-box h4 {
        font-size: 1.1rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    .btn-sm {
        padding: 0.5rem 1.25rem;
        font-size: 0.8rem;
    }

    h1 { font-size: 1.65rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

/* ========== Sangat kecil (≤380px) ========== */
@media (max-width: 380px) {
    .hero-content h1 {
        font-size: 1.45rem;
    }
    .hero-content .lead {
        font-size: 0.9rem;
    }
    .brand-text {
        font-size: 0.85rem;
    }
    .logo-img {
        height: 36px;
    }
    .stat-number {
        font-size: 1.65rem;
    }
    .section-title h2 {
        font-size: 1.45rem;
    }
}

/* ========== Landscape mobile ========== */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        min-height: 420px;
    }
    .hero-content h1 {
        font-size: 1.85rem;
    }
    .hero-content .lead {
        font-size: 1rem;
    }
}

/* ========== Print ========== */
@media print {
    .header-fixed-wrapper,
    .navbar,
    .footer,
    .btn,
    .btn-hero {
        display: none !important;
    }
    body {
        padding-top: 0 !important;
    }
    .section {
        page-break-inside: avoid;
    }
}
