/* ============================================
   RESPONSIVE WEB DESIGN - IAAI JABODETABEK
   Mobile-First Approach
   ============================================ */

/* ============================================
   BASE STYLES (Mobile First < 600px)
   Device Range: 360x640px - 414x896px
   ============================================ */

/* Container Adjustments for Mobile */
.container {
    padding-left: 15px;
    padding-right: 15px;
}

/* Typography - Mobile */
body {
    font-size: 14px;
    line-height: 1.5;
}

h1,
.display-4 {
    font-size: 1.75rem !important;
    line-height: 1.2;
}

h2,
.section-title {
    font-size: 1.5rem !important;
}

h3 {
    font-size: 1.25rem !important;
}

h4,
h5 {
    font-size: 1.1rem !important;
}

h6 {
    font-size: 1rem !important;
}

.lead {
    font-size: 1rem !important;
}

/* Spacing Adjustments - Mobile */
.py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.mb-4 {
    margin-bottom: 1rem !important;
}

.mb-5 {
    margin-bottom: 1.5rem !important;
}

/* Images - Mobile */
img {
    max-width: 100%;
    height: auto;
}

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

/* Buttons - Mobile */
.btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

/* Cards - Mobile */
.card {
    margin-bottom: 1rem;
}

.card-body {
    padding: 1rem;
}

.card-title {
    font-size: 1.1rem;
}

/* Grid System - Mobile (Stack Vertically) */
.row.g-4 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

/* Hero Carousel - Mobile */
.hero-carousel-section {
    min-height: 400px;
    padding: 2rem 0;
}

.carousel-item img {
    max-height: 200px;
    object-fit: cover;
}

.carousel-control-prev,
.carousel-control-next {
    width: 10% !important;
}

/* Navbar - Mobile */
.navbar-custom {
    margin-top: 0 !important;
}

.header-container {
    padding: 10px 15px !important;
    border-radius: 0 !important;
}

.navbar-brand .brand-text .title {
    font-size: 1.2rem !important;
}

.navbar-brand .brand-text .subtitle {
    font-size: 0.7rem !important;
}

.navbar-brand i {
    width: 40px !important;
    height: 40px !important;
    font-size: 1.5rem !important;
}

/* Mobile Menu */
.navbar-collapse {
    background-color: #8e44ad;
    margin-top: 10px;
    padding: 10px;
    border-radius: 10px;
}

.navbar-nav {
    width: 100%;
}

.nav-item {
    text-align: center;
    padding: 5px 0;
}

.nav-link {
    padding: 0.5rem 1rem !important;
    margin-left: 0 !important;
}

/* Footer - Mobile */
.footer-content {
    border-radius: 0 0 20px 20px !important;
    padding: 1.5rem !important;
}

.footer-content .row>div {
    margin-bottom: 1.5rem;
    text-align: center !important;
}

.footer-content h6 {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.social-links {
    justify-content: center !important;
}

.footer-input {
    font-size: 0.85rem;
    padding: 10px 15px;
}

/* Layanan Section - Mobile */
.layanan-section .col-md-4 {
    margin-bottom: 1rem;
}

.layanan-card {
    margin-bottom: 1rem;
}

/* Berita Section - Mobile */
.kilasberita-section .card {
    margin-bottom: 1rem;
}

.kilasberita-section .row.g-0 {
    flex-direction: column !important;
}

.kilasberita-section .col-md-5,
.kilasberita-section .col-md-7 {
    width: 100% !important;
}

.kilasberita-section img {
    height: 200px !important;
    width: 100% !important;
}

/* Kegiatan Section - Mobile */
.kegiatan-section .card img {
    height: 150px !important;
}

/* Utility Classes - Mobile */
.text-mobile-center {
    text-align: center !important;
}

.hide-mobile {
    display: none !important;
}

.show-mobile {
    display: block !important;
}

/* ============================================
   TABLET STYLES (601px - 1023px)
   Device Range: 601x962px - 800x1280px
   ============================================ */

@media (min-width: 601px) {

    /* Container - Tablet */
    .container {
        max-width: 90%;
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Typography - Tablet */
    body {
        font-size: 15px;
    }

    h1,
    .display-4 {
        font-size: 2.25rem !important;
    }

    h2,
    .section-title {
        font-size: 1.75rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    .lead {
        font-size: 1.1rem !important;
    }

    /* Spacing - Tablet */
    .py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .mb-4 {
        margin-bottom: 1.25rem !important;
    }

    .mb-5 {
        margin-bottom: 2rem !important;
    }

    /* Buttons - Tablet */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 1rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1.1rem;
    }

    /* Hero Carousel - Tablet */
    .hero-carousel-section {
        min-height: 450px;
        padding: 2.5rem 0;
    }

    .carousel-item img {
        max-height: 300px;
    }

    /* Navbar - Tablet */
    .header-container {
        padding: 10px 30px !important;
        border-radius: 15px 15px 0 0 !important;
    }

    .navbar-brand .brand-text .title {
        font-size: 1.35rem !important;
    }

    .navbar-brand .brand-text .subtitle {
        font-size: 0.75rem !important;
    }

    .navbar-brand i {
        width: 45px !important;
        height: 45px !important;
    }

    /* Grid - Tablet (2 columns for most sections) */
    .layanan-section .col-md-4 {
        width: 50%;
    }

    .kegiatan-section .col-md-4 {
        width: 50%;
    }

    /* Footer - Tablet */
    .footer-content {
        border-radius: 0 0 30px 30px !important;
        padding: 2rem !important;
    }

    .footer-content .col-md-2 {
        width: 50%;
    }

    .footer-content .col-md-4 {
        width: 50%;
    }

    .footer-content .row>div {
        text-align: left !important;
    }

    /* Berita Section - Tablet */
    .kilasberita-section .row.g-0 {
        flex-direction: row !important;
    }

    .kilasberita-section img {
        height: 100% !important;
    }

    /* Utility Classes - Tablet */
    .hide-tablet {
        display: none !important;
    }

    .show-tablet {
        display: block !important;
    }

    .hide-mobile {
        display: block !important;
    }

    .show-mobile {
        display: none !important;
    }
}

/* ============================================
   DESKTOP STYLES (1024px+)
   Device Range: 1024x768px - 1920x1080px+
   ============================================ */

@media (min-width: 1024px) {

    /* Container - Desktop */
    .container {
        max-width: 1140px;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Typography - Desktop */
    body {
        font-size: 16px;
    }

    h1,
    .display-4 {
        font-size: 3rem !important;
    }

    h2,
    .section-title {
        font-size: 2rem !important;
    }

    h3 {
        font-size: 1.75rem !important;
    }

    h4 {
        font-size: 1.5rem !important;
    }

    h5 {
        font-size: 1.25rem !important;
    }

    .lead {
        font-size: 1.25rem !important;
    }

    /* Spacing - Desktop */
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .mb-4 {
        margin-bottom: 1.5rem !important;
    }

    .mb-5 {
        margin-bottom: 3rem !important;
    }

    /* Buttons - Desktop */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .btn-lg {
        padding: 0.875rem 1.75rem;
        font-size: 1.125rem;
    }

    /* Hero Carousel - Desktop */
    .hero-carousel-section {
        min-height: 500px;
        padding: 3rem 0;
    }

    .carousel-item img {
        max-height: 400px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 5% !important;
    }

    /* Navbar - Desktop */
    .navbar-custom {
        margin-top: 20px !important;
    }

    .header-container {
        padding: 10px 40px !important;
        border-radius: 20px 20px 0 0 !important;
    }

    .navbar-brand .brand-text .title {
        font-size: 1.5rem !important;
    }

    .navbar-brand .brand-text .subtitle {
        font-size: 0.8rem !important;
    }

    .navbar-brand i {
        width: 50px !important;
        height: 50px !important;
    }

    .nav-link {
        margin-left: 15px !important;
        font-size: 0.95rem !important;
    }

    /* Grid - Desktop (Full columns) */
    .layanan-section .col-md-4 {
        width: 33.333333%;
    }

    .kegiatan-section .col-md-4 {
        width: 33.333333%;
    }

    /* Footer - Desktop */
    .footer-content {
        border-radius: 0 0 40px 40px !important;
        padding: 3rem !important;
    }

    .footer-content .col-md-2 {
        width: 16.666667%;
    }

    .footer-content .col-md-4 {
        width: 33.333333%;
    }

    .social-links {
        justify-content: flex-start !important;
    }

    /* Utility Classes - Desktop */
    .hide-desktop {
        display: none !important;
    }

    .show-desktop {
        display: block !important;
    }

    .hide-tablet {
        display: block !important;
    }

    .show-tablet {
        display: none !important;
    }
}

/* ============================================
   LARGE DESKTOP STYLES (1920px+)
   ============================================ */

@media (min-width: 1920px) {
    .container {
        max-width: 1320px;
    }

    h1,
    .display-4 {
        font-size: 3.5rem !important;
    }

    .hero-carousel-section {
        min-height: 600px;
    }

    .carousel-item img {
        max-height: 500px;
    }
}

/* ============================================
   ORIENTATION SPECIFIC STYLES
   ============================================ */

/* Landscape Mobile */
@media (max-width: 896px) and (orientation: landscape) {
    .hero-carousel-section {
        min-height: 300px;
    }

    .navbar-collapse {
        max-height: 200px;
        overflow-y: auto;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {

    .navbar-custom,
    .footer-section,
    .btn {
        display: none !important;
    }

    body {
        padding-top: 0;
        background: white;
        color: black;
    }

    .container {
        max-width: 100%;
    }
}

/* ============================================
   ACCESSIBILITY & TOUCH OPTIMIZATIONS
   ============================================ */

/* Touch-friendly tap targets */
@media (max-width: 1023px) {

    .btn,
    .nav-link,
    a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Larger form inputs for mobile */
    input,
    textarea,
    select {
        min-height: 44px;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}