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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Top Navigation Bar */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #fec900;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding: 15px 0;
    transition: all 0.3s ease;
}

/* Hamburger Menu Button */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: absolute;
    left: 25px;
    top: 150%;
    transform: translateY(-50%);
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: #333333;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(0, 0);
    position: absolute;
    top: 50%;
    left: 0;
    margin-top: -1.5px;
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(0, 0);
    position: absolute;
    top: 50%;
    left: 0;
    margin-top: -1.5px;
}

.hamburger-menu.active .hamburger-line {
    background-color: #fec900;
}

.navbar {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 0 30px;
    flex-wrap: wrap;
}

.nav-link {
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #fec900;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link.active {
    color: #fec900;
}

.nav-link.active::after {
    width: 80%;
}

/* Navigation */
.navigation {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-dots {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
    position: relative;
}

.nav-dot:hover {
    background-color: rgba(254, 201, 0, 0.6);
    transform: scale(1.3);
    border-color: #fec900;
}

.nav-dot.active {
    background-color: #fec900;
    border-color: #fec900;
    width: 14px;
    height: 14px;
    box-shadow: 0 0 10px rgba(254, 201, 0, 0.5);
}

.nav-dot.active::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fec900;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.images-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.images-container img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    /* Optimasi performa */
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform;
    /* Dynamic spacing based on viewport height */
    margin-bottom: min(8vh, 120px);
}

/* Gallery Slider Styles */
.gallery-section {
    width: 100%;
    max-width: 100%;
    margin-bottom: min(8vh, 120px);
    position: relative;
    overflow: hidden;
}

.gallery-swiper {
    width: 100%;
    height: auto;
}

.gallery-swiper .swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    margin-bottom: 0 !important;
    /* Override default img margin */
}

/* Swiper Navigation Customization */
.gallery-swiper .swiper-button-next,
.gallery-swiper .swiper-button-prev {
    color: #fec900;
    background-color: rgba(0, 0, 0, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.gallery-swiper .swiper-button-next::after,
.gallery-swiper .swiper-button-prev::after {
    font-size: 18px;
    font-weight: bold;
}

.gallery-swiper .swiper-button-next:hover,
.gallery-swiper .swiper-button-prev:hover {
    background-color: #fec900;
    color: #000000;
    transform: scale(1.1);
}

/* Swiper Pagination Customization */
.gallery-swiper .swiper-pagination-bullet {
    background: #000000;
    opacity: 0.3;
    width: 8px;
    height: 8px;
    transition: all 0.3s ease;
}

.gallery-swiper .swiper-pagination-bullet-active {
    background: #fec900;
    opacity: 1;
    width: 24px;
    border-radius: 4px;
}

/* Responsive adjustments for sliders */
@media (max-width: 768px) {

    .gallery-swiper .swiper-button-next,
    .gallery-swiper .swiper-button-prev {
        width: 35px;
        height: 35px;
    }

    .gallery-swiper .swiper-button-next::after,
    .gallery-swiper .swiper-button-prev::after {
        font-size: 14px;
    }
}

.images-container img:last-of-type {
    margin-bottom: 0;
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    display: block;
    /* Dynamic spacing based on viewport height */
    margin-bottom: min(8vh, 120px);
}

.image-wrapper img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* First image spacing from navbar */
#image-1 {
    margin-top: 80px;
}

/* Home section spacing from navbar */
#home {
    margin-top: 100px;
}

/* Scroll anchor spacing - creates gap when scrolling to anchor links */
#introduction,
#sejarah-perusahaan,
#visi-misi-1,
#visi-misi-2,
#our-product,
#gallery-1,
#gallery-2,
#contact {
    scroll-margin-top: 100px;
    display: block;
}

/* For the home anchor */
#home {
    scroll-margin-top: 100px;
}

.instagram-button {
    position: absolute;
    bottom: 80px;
    left: 60px;
    background-color: #fec900;
    color: #000000;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    /* Fixed size untuk konsistensi */
    white-space: nowrap;
}

.instagram-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.instagram-button .btn-label {
    font-weight: 600;
}

.instagram-button .btn-value {
    font-weight: 400;
}

/* Contact Overlay */
.contact-overlay {
    position: absolute;
    bottom: 50px;
    left: 50px;
    background-color: #fec900;
    padding: 20px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px 20px;
    width: auto;
    max-width: 400px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.contact-label {
    font-size: 11px;
    font-weight: 600;
    color: #000000;
}

.contact-value {
    font-size: 13px;
    font-weight: 400;
    color: #000000;
    text-decoration: none;
    transition: color 0.2s;
    word-break: break-word;
}

.contact-value:hover {
    color: #000000;
    text-decoration: underline;
}

/* Contact items in overlay */
.footer-wrapper .contact-label {
    font-size: 11px;
    font-weight: 600;
    color: #000000;
}

.footer-wrapper .contact-value {
    font-size: 13px;
    font-weight: 400;
    color: #000000;
}

/* Footer Wrapper */
.footer-wrapper {
    position: relative;
    width: 100%;
    display: block;
    /* Dynamic spacing based on viewport height */
    margin-top: min(8vh, 120px);
}

.footer-wrapper img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Contact Section as Overlay */
.footer-wrapper .contact-section {
    position: absolute;
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 100px);
    max-width: 1300px;
    background-color: transparent;
    padding: 20px 25px;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr 1fr;
    gap: 15px 20px;
    margin-bottom: 0;
}

.contact-title {
    grid-column: 1 / -1;
    font-size: 80px;
    font-weight: 700;
    color: #fec900;
    margin: 0 0 10px 0;
    text-align: left;
}

/* Contact title in overlay */
.footer-wrapper .contact-title {
    color: #ffffff;
    font-size: 80px;
    margin: 0 0 10px 0;
}

/* Contact label in overlay */
.footer-wrapper .contact-label {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Contact value in overlay */
.footer-wrapper .contact-value {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Desktop - Larger Button */
@media (min-width: 769px) {
    .instagram-button {
        padding: 16px 28px;
        font-size: 18px;
        border-radius: 10px;
        gap: 8px;
    }

    .contact-overlay {
        bottom: 80px;
        left: 60px;
        padding: 30px 35px;
        gap: 20px 30px;
        max-width: 450px;
    }

    .footer-wrapper .contact-section {
        bottom: 100px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 120px);
        max-width: 1280px;
        padding: 30px 35px;
        gap: 20px 30px;
    }

    .footer-wrapper .contact-title {
        font-size: 66px;
        margin-bottom: 20px;
    }

    .footer-wrapper .contact-label {
        font-size: 16px;
    }

    .footer-wrapper .contact-value {
        font-size: 18px;
    }
}

@media (min-width: 1440px) {
    .contact-title {
        font-size: 80px;
        margin-bottom: 20px;
    }
}

@media (min-width: 1512px) {

    /* Responsive adjustments for MacBook Pro 14" (1512px), 16" (1728px), and 1760x990 screens */
    .images-container {
        max-width: 1500px;
        transition: max-width 0.3s ease;
    }

    .navbar {
        max-width: 1800px;
    }

    .footer-wrapper {
        margin-top: min(12vh, 200px);
    }

    .footer-wrapper .contact-section {
        /* Use vh for vertical placement to stay consistent across different monitor heights */
        bottom: clamp(200px, 30vh, 330px);
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 120px);
        max-width: 1400px;
        padding: clamp(25px, 4vh, 45px) clamp(30px, 4vw, 50px);
        gap: clamp(15px, 2vh, 25px) clamp(30px, 4vw, 50px);
    }

    .instagram-button {
        bottom: clamp(80px, 12vh, 150px);
        left: clamp(60px, 6vw, 120px);
        padding: clamp(14px, 2vh, 20px) clamp(24px, 2vw, 36px);
        font-size: clamp(16px, 1.1vw, 20px);
        border-radius: 12px;
    }

    .footer-wrapper .contact-title {
        font-size: clamp(60px, 5vw, 85px);
        margin-bottom: clamp(15px, 2vh, 25px);
    }

    .footer-wrapper .contact-label {
        font-size: clamp(14px, 1.2vw, 18px);
    }

    .footer-wrapper .contact-section {
        bottom: clamp(250px, 35vh, 400px);
    }

    .footer-wrapper .contact-value {
        font-size: clamp(16px, 1.5vw, 22px);
    }

    .gallery-section {
        margin-top: min(8vh, 120px);
    }
}

/* Extra optimization for very large screens */
@media (min-width: 1920px) {

    .images-container,
    .navbar {
        max-width: 1600px;
    }

    .footer-wrapper .contact-section {
        bottom: clamp(250px, 35vh, 400px);
    }

    .gallery-section {
        margin-top: min(8vh, 120px);
    }
}

/* Responsive Design */
@media (max-width: 1400px) {
    .images-container {
        max-width: 100%;
    }
}

/* Hamburger menu for tablets and below */
@media (max-width: 1024px) {
    .top-navbar {
        box-shadow: none;
    }

    .hamburger-menu {
        display: flex;
    }

    .navbar {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        box-shadow: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 20px 0;
        max-width: 100%;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 998;
    }

    .navbar.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        display: block;
        padding: 15px 20px;
        font-size: 14px;
        text-align: left;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        color: #333333;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-link:hover {
        background-color: rgba(254, 201, 0, 0.1);
        color: #fec900;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link.active {
        background-color: rgba(254, 201, 0, 0.2);
        color: #fec900;
        font-weight: 600;
        border-left: 3px solid #fec900;
    }
}

@media (max-width: 768px) {
    .top-navbar {
        padding: 12px 0;
    }

    .navbar {
        gap: 20px;
        padding: 0 20px;
    }

    .nav-link {
        font-size: 12px;
        padding: 6px 12px;
    }

    .navigation {
        right: 15px;
    }

    .nav-dots {
        gap: 10px;
    }

    .nav-dot {
        width: 10px;
        height: 10px;
    }

    .nav-dot.active {
        width: 12px;
        height: 12px;
    }

    .images-container img {
        width: 100%;
    }

    /* Tetap konsisten posisi button dengan scale yang proporsional */
    .instagram-button {
        bottom: 40px;
        left: 35px;
        padding: 8px 14px;
        font-size: 11px;
    }

    .contact-overlay {
        bottom: 30px;
        left: 30px;
        padding: 15px 20px;
        gap: 12px 15px;
        max-width: 320px;
    }

    .footer-wrapper .contact-section {
        bottom: 100px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 60px);
        max-width: none;
        padding: 15px 20px;
        gap: 12px 15px;
    }

    .footer-wrapper .contact-title {
        font-size: 35px;
        margin-bottom: 15px;
    }

    .footer-wrapper .contact-label {
        font-size: 14px;
    }

    .footer-wrapper .contact-value {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    #image-1 {
        margin-top: 60px;
    }

    #home {
        margin-top: 80px;
    }

    /* Adjust scroll margin for smaller screens */
    #introduction,
    #sejarah-perusahaan,
    #visi-misi-1,
    #visi-misi-2,
    #our-product,
    #gallery-1,
    #gallery-2,
    #contact {
        scroll-margin-top: 70px;
    }

    .top-navbar {
        padding: 10px 0;
    }

    .navbar {
        gap: 12px;
        padding: 0 15px;
    }

    .nav-link {
        font-size: 11px;
        padding: 5px 10px;
    }

    .instagram-button {
        bottom: 35px;
        left: 25px;
        padding: 7px 12px;
        font-size: 10px;
    }

    .contact-overlay {
        bottom: 50px;
        left: 15px;
        padding: 12px 16px;
        gap: 10px 12px;
        max-width: 260px;
    }

    .footer-wrapper .contact-section {
        bottom: 120px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 30px);
        max-width: none;
        padding: 12px 16px;
        gap: 10px 12px;
    }

    .footer-wrapper .contact-title {
        font-size: 26px;
        margin-bottom: 12px;
    }

    .footer-wrapper .contact-label {
        font-size: 10px;
    }

    .footer-wrapper .contact-value {
        font-size: 14px;
    }
}

/* Specific breakpoints for common mobile sizes */
@media (max-width: 430px) {
    #image-1 {
        margin-top: 55px;
    }

    #home {
        margin-top: 70px;
    }

    /* Adjust scroll margin for mobile with hamburger menu */
    #introduction,
    #sejarah-perusahaan,
    #visi-misi-1,
    #visi-misi-2,
    #our-product,
    #gallery-1,
    #gallery-2,
    #contact {
        scroll-margin-top: 60px;
    }

    .top-navbar {
        box-shadow: none;
    }

    .navbar {
        top: 40px;
        box-shadow: none;
    }

    .instagram-button {
        bottom: 35px;
        left: 20px;
        padding: 6px 12px;
        font-size: 10px;
        gap: 3px;
    }

    .contact-overlay {
        bottom: 30px;
        left: 20px;
        padding: 10px 14px;
        gap: 8px 10px;
        max-width: 240px;
    }

    .footer-wrapper .contact-section {
        bottom: 25px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 40px);
        max-width: none;
        padding: 10px 14px;
        gap: 8px 10px;
    }

    .footer-wrapper .contact-title {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .footer-wrapper .contact-label {
        font-size: 9px;
    }

    .footer-wrapper .contact-value {
        font-size: 8px;
    }
}

@media (max-width: 375px) {
    #image-1 {
        margin-top: 50px;
    }

    #home {
        margin-top: 60px;
    }

    .instagram-button {
        bottom: 25px;
        left: 15px;
        padding: 6px 10px;
        font-size: 9px;
        gap: 3px;
    }

    .instagram-button .btn-label {
        font-size: 10px;
    }

    .instagram-button .btn-value {
        font-size: 10px;
    }

    .contact-overlay {
        bottom: 30px;
        left: 20px;
        padding: 20px 30px;
        gap: 6px 8px;
        max-width: 220px;
    }

    .footer-wrapper .contact-section {
        bottom: 100px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 40px);
        max-width: none;
        padding: 15px 20px;
        gap: 6px 8px;
    }

    .footer-wrapper .contact-title {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .footer-wrapper .contact-label {
        font-size: 7px;
    }

    .footer-wrapper .contact-value {
        font-size: 7px;
    }
}