@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 40px;
    width: 46px;
    height: 46px;
    background: #1e40ff;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #0f2edc;
}

/* Media Section */
.media {
    position: relative;
    padding: 100px 20px;
    background: #fff;
    font-family: 'Poppins', sans-serif;
    background: 
        linear-gradient(to bottom, rgba(255,255,255,0.8) 100%, rgba(255,255,255,0) 50%, rgba(0, 86, 179, 0.6) 100%),
        url('../images/layanan-image.jpg') no-repeat center center/cover;
}

.media::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 180px;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.6) 40%,
        #ffffff 100%
    );
    pointer-events: none;
}

/* Container */
.media .media-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
.media .media-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
    color: #1a1a1a;
    text-align: center;
}

.media .media-header p {
    font-size: 18px;
    color: #4b5563;
    margin-bottom: 50px;
    line-height: 1.6;
    text-align: center;
}

/* Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    margin-top: 30px;
}

.media-card {
    padding: 5px 5px;
    border: 1px solid transparent; /* penting */
    border-right: 1px solid #1a1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #1a1a1a;
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

.media-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.media-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.icon-wrap {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer {
  background: #ffffff;
  padding: 60px 40px 20px 40px;
  font-family: Arial, sans-serif;
}

.footer-container {
  max-width: 1400px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 80px;
}

.logo-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-col .logo {
    max-width: 120px;
    margin-bottom: 20px;
}

.footer-col h4 {
  color: #0057ff;
  font-size: 14px;
  margin-bottom: 15px;
  font-weight: bold;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
  color: #555;
  font-size: 14px;
}

.footer-col p {
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}

/* LOGO */
.logo {
  width: 180px;
}

.socials {
    display: flex;
    gap: 14px;
}

.socials a {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #1e40ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.socials a:hover {
    background: #0f2edc;
    transform: translateY(-3px);
}

.bottom {
    margin-top: 40px;
    padding-top: 20px;          /* jarak dari garis */
    text-align: center;
    font-size: 14px;
    color: #888;
    border-top: 1px solid #e5e5e5;
}

/* SCROLL REVEAL ANIMATION */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

/* Delay helper */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* Footer animation */
.footer {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease, transform 1s ease;
}

.footer.show {
    opacity: 1;
    transform: translateY(0);
}

/* LIGHTBOX */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 10px;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* CLOSE */
.lightbox .close {
    position: absolute;
    top: 25px;
    right: 35px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
}

/* NAV BUTTON */
.lightbox .nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 10px;
}

.lightbox .prev {
    left: 30px;
}

.lightbox .next {
    right: 30px;
}

.lightbox .nav:hover,
.lightbox .close:hover {
    opacity: 0.7;
}

/* ================================================================
   RESPONSIVE STYLES (Add to bottom of media.css)
   ================================================================ */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .media .media-container {
        padding: 0 30px;
    }

    /* Grid: 3 columns for tablet */
    .media-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .icon-wrap {
        height: 180px; /* Slightly shorter */
    }
}

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {
    .logo img {
        height: 35px;
    }

    /* 2. Media Header */
    .media {
        padding: 60px 0;
    }

    .media .media-header h1 {
        font-size: 28px;
    }

    .media .media-header p {
        font-size: 16px;
        padding: 0 20px;
    }

    /* 3. Media Grid: 2 columns for better visibility */
    .media-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 15px;
    }

    .icon-wrap {
        height: 140px; /* Square-ish look on mobile */
    }

    .media-card {
        border: 1px solid #ddd; /* Lighter border for mobile */
    }

    /* 4. Lightbox Mobile Adjustments */
    .lightbox img {
        max-width: 95%;
        max-height: 70%; /* Leave room for buttons below/above if needed */
    }

    .lightbox .nav {
        font-size: 30px;
        padding: 5px;
    }

    .lightbox .prev {
        left: 10px;
    }

    .lightbox .next {
        right: 10px;
    }

    .lightbox .close {
        top: 20px;
        right: 20px;
        font-size: 35px;
    }

    /* 5. Footer Fix */
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .logo-col {
        grid-column: span 1;
    }

    .socials {
        justify-content: center;
    }
}

/* Extra Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .media-grid {
        grid-template-columns: 1fr; /* Single column for very small phones */
    }

    .icon-wrap {
        height: 220px;
    }
}