:root {
    --primary-color: #2e6eb8;
    --secondary-color: #16223a;
    --gradient-light: linear-gradient(135deg, #eef2f7, #d9e2ec);
    --gradient-dark: linear-gradient(135deg, #16223a, #2a4066);
    --gradient-divider: linear-gradient(to right, #c0c8d4, #2e6eb8);
    --gradient-section: linear-gradient(to right, #16223a, #2e6eb8);
    --border-color: #c0c8d4;
    --shadow-light: 0 4px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.25);
    --shadow-dark: 0 6px 15px rgba(0, 0, 0, 0.2);
    --whatsapp-color: #25D366;
    --whatsapp-hover: #128C7E;
    --error-color: #d9534f;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    margin: 0;
    padding: 0;
    background: radial-gradient(circle, #f5f7fa, #e0e8f0);
    color: #333;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=') repeat;
    opacity: 0.05;
    z-index: -1;
}

header {
    background: var(--gradient-dark);
    color: white;
    text-align: center;
    padding: 2.5rem 0;
    box-shadow: var(--shadow-dark);
    position: relative;
    z-index: 10;
}

.header-logo {
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto;
    padding: 1rem 0;
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

header p {
    margin: 0.5rem 0;
}

header .header-description {
    max-width: 600px;
    margin: 0.5rem auto;
    font-size: 14px;
    line-height: 1.4;
}

nav {
    background-color: #2a4066;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.nav-menu {
    max-height: none;
    transition: max-height 0.3s ease;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--primary-color);
}

a[href^="mailto:"] {
    color: var(--whatsapp-color);
}

a[href^="mailto:"]:hover {
    color: var(--whatsapp-hover);
}

.services {
    padding: 2.5rem 2.5rem 1rem 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about {
    padding: 1rem 2.5rem 2.5rem 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.main-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
    justify-content: center;
}

.secondary-services {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    background: linear-gradient(135deg, #f9fafc, #e8edf5);
    padding: 2rem;
    border-radius: 10px;
}

.about-content,
.service-card,
.modal-content,
.modal-content-pdf,
.peringatan-card {
    background: var(--gradient-light);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-content:hover,
.service-card:hover,
.peringatan-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.about-content p {
    font-size: 1rem;
    margin: 0.8rem 0;
    text-align: left;
}

.section-divider {
    text-align: center;
    margin: 2rem 0;
}

.section-divider h2 {
    color: var(--secondary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 1rem 0;
}

.section-divider hr {
    border: none;
    height: 4px;
    background: var(--gradient-section);
    margin: 1rem auto;
    width: 50%;
    border-radius: 2px;
}

.service-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.service-card.main-service {
    min-height: 360px;
    border: 3px solid var(--primary-color);
    box-shadow: var(--shadow-dark);
    z-index: 1;
}

.service-card.main-service .btn.btn-rincian {
    margin-bottom: 0.5rem;
    background-color: var(--error-color);
}

.service-card.main-service .btn.btn-rincian:hover {
    background-color: var(--primary-color);
}

.service-card.secondary-service .btn.btn-rincian {
    margin-bottom: 0.5rem;
    background-color: var(--error-color);
}

.service-card.secondary-service .btn.btn-rincian:hover {
    background-color: var(--primary-color);
}

.service-card.secondary-service {
    min-height: 600px;
    border: 2px solid var(--border-color);
}

.service-card h3 {
    color: var(--secondary-color);
    margin-bottom: 0.8rem;
    font-weight: 700;
    font-size: 1.4rem;
}

.scrollable {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 200px;
    padding: 0.5rem 0;
}

.service-card ul {
    list-style-type: disc;
    padding-left: 25px;
    text-align: left;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.service-card li {
    padding: 0.3rem 0;
    break-inside: avoid-column;
}

.desain-web-scrollable {
    scrollbar-width: none;
}

.desain-web-scrollable::-webkit-scrollbar {
    display: none;
}

.service-card:hover .desain-web-scrollable {
    scrollbar-width: auto;
}

.service-card:hover .desain-web-scrollable::-webkit-scrollbar {
    display: block;
    width: 8px;
}

.service-card:hover .desain-web-scrollable::-webkit-scrollbar-track {
    background: #d9e2ec;
    border-radius: 4px;
}

.service-card:hover .desain-web-scrollable::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.service-card:hover .desain-web-scrollable::-webkit-scrollbar-thumb:hover {
    background: var(--error-color);
}

.secondary-service-list {
    list-style-type: disc;
    padding-left: 25px;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
}

.secondary-service-list li {
    margin-bottom: 0.5rem;
}

.secondary-service-list li strong {
    font-weight: 700;
    color: var(--secondary-color);
}

.secondary-service-list li br {
    line-height: 0.5;
}

.service-description {
    text-align: left;
    margin: 0.5rem 0 0.8rem;
    font-size: 0.95rem;
}

.service-divider {
    border: none;
    height: 2px;
    background: var(--gradient-divider);
    margin: 1.5rem 0;
}

.btn,
.contact-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    margin: 0.5rem;
    transition: background-color 0.3s ease;
}

.btn:hover,
.contact-btn:hover {
    background-color: var(--error-color);
}

.contact-btn.whatsapp {
    background-color: var(--whatsapp-color);
}

.contact-btn.whatsapp:hover {
    background-color: var(--whatsapp-hover);
}

.contact-buttons {
    text-align: center;
    margin-top: 1rem;
}

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
}

.whatsapp-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 75px;
    height: 75px;
    background-color: var(--whatsapp-color);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: var(--shadow-light);
    transition: background-color 0.3s ease;
}

.whatsapp-float a:hover {
    background-color: var(--whatsapp-hover);
}

.whatsapp-float i {
    font-size: 36px;
}

footer {
    background: var(--gradient-dark);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    width: 100%;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-height: 80vh;
    overflow-y: auto;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.modal-content-pdf {
    min-height: 90vh;
    max-height: 95vh;
    width: 90%;
    max-width: 1200px;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.modal-content-pdf h2 {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0.5rem 0;
    text-align: center;
}

.modal-content-pdf iframe {
    width: 100%;
    height: 100%;
    border: none;
    flex-grow: 1;
    min-height: 0;
}

.modal-content-pdf a.fallback-link {
    display: block;
    text-align: center;
    margin: 0.5rem 0;
    color: var(--primary-color);
    text-decoration: underline;
    font-size: 0.9rem;
}

.modal-content-pdf a.fallback-link:hover {
    color: var(--error-color);
}

.modal-content-pdf .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.modal-content-pdf .close-btn:hover {
    background-color: var(--error-color);
}

.modal-content label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="tel"],
.modal-content textarea,
.modal-content select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Lato', sans-serif;
}

.modal-content input[type="text"][disabled] {
    background-color: #e9ecef;
    color: #495057;
}

.modal-content textarea {
    height: 6rem;
    resize: vertical;
}

.modal-content .radio-group {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-content .radio-item {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
}

.modal-content .radio-item input[type="radio"] {
    margin-right: 0.5rem;
}

.modal-content .radio-item label {
    margin: 0;
}

.modal-content p {
    font-size: 0.9rem;
    color: #666;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

.modal-content .char-count {
    font-size: 0.8rem;
    color: #666;
    text-align: right;
}

.modal-content .char-count.red {
    color: red;
}

.modal-content textarea.red-border {
    border-color: red;
}

.modal-content button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content button:hover {
    background-color: var(--error-color);
}

.modal-content button[type="submit"].loading {
    color: transparent;
}

.modal-content button[type="submit"].loading .spinner {
    display: inline-block;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.error-message {
    color: var(--error-color);
    font-size: 0.8rem;
    display: none;
    margin-bottom: 1rem;
}

.peringatan-card {
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.5;
    background: linear-gradient(135deg, #fff4f4, #ffe6e6);
    border: 2px solid var(--error-color);
}

.peringatan-card p {
    margin: 0.5rem 0;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-menu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-menu.active {
        max-height: 300px;
        /* Adjust based on menu height */
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    nav ul li {
        padding: 0.5rem 0;
    }

    nav a {
        font-size: 1rem;
        display: block;
        padding: 0.5rem;
    }
}