:root {
    --primary-color: #009999;
    --secondary-color: #009999;
    --dark-color: #333333;
    --light-color: #f8f8f8;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgb(255, 255, 255);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 10px 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
}

.nav-item {
    margin-left: 30px;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--dark-color);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('assets/hero-bg.jpg') no-repeat center center/cover;
    color: white;
}

.hero-content {
    max-width: 600px;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-desc {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Services Section */
.services {
    padding: 100px 0;
    background-color: var(--light-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-img {
    height: 200px;
    background-color: #ddd;
    background-position: center;
    background-size: cover;
}

.service-content {
    padding: 20px;
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
    text-align: center;
}

.service-desc {
    margin-bottom: 15px;
    color: #666;
    text-align: justify;
}

.service-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Portfolio Section */
.portfolio {
    padding: 100px 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    height: 250px;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.9);
    transition: transform 0.5s ease;
    display: block;
}

.portfolio-item.visible {
    opacity: 1;
    transform: scale(1);
}

.portfolio-item:hover {
    transform: scale(1.05);
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.3);
    transition: filter 0.3s ease;
}

.portfolio-item:hover .portfolio-img {
    filter: grayscale(0);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-title {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

/* Portfolio Gallery Page */
.portfolio-gallery {
    padding: 150px 0 100px;
}

.gallery-description {
    text-align: center;
    margin-bottom: 50px;
    font-size: 1.2rem;
    color: #666;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    height: 250px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* About Section */
.about {
    padding: 100px 0;
    background-color: var(--light-color);
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 50px;
}

.accordion {
    max-width: 1100px;
    margin: 0 auto;
}

.accordion-item {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: white;
    opacity: 0;
    transform: translateY(20px);
}

.accordion-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.accordion-header {
    padding: 20px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: background 0.3s ease;
    text-align: center;
}

.accordion-header:hover {
    background: var(--secondary-color);
}

.accordion-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    text-align: justify;
}

.accordion-content.active {
    padding: 20px;
    max-height: 500px;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 35px;
    margin-bottom: 30px;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.social-icon:hover {
    background: var(--primary-color);
}

.footer-heading {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    z-index: 100;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.7);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 15px 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }
    
    .portfolio-gallery {
        padding: 120px 0 80px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-desc {
        font-size: 1rem;
    }

    .service-card, .portfolio-item, .gallery-item {
        max-width: 100%;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ==== Fix layout Services di mobile ==== */
.services-grid {
  /* lebih fleksibel di tablet/HP kecil */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* HP ≤ 480px: paksa 1 kolom + padding sisi */
@media (max-width: 480px) {
  .container {
    width: 100%;
    padding: 0 16px;        /* ruang kiri-kanan */
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 4px;         /* sentuhan kecil biar tidak mepet */
  }

  /* opsional: beri ruang ekstra di bawah agar tidak ketutup tombol WA */
  .services { 
    padding-bottom: 120px;
  }

  /* opsional: geser tombol WA sedikit ke dalam */
  .whatsapp-float {
    right: 16px;
    bottom: 20px;
  }
}
