/* =============================================
   COMPONENTS.CSS — Komponen reusable (tombol, badge, section header, dekorasi)
   Berisi styling untuk elemen yang dipakai di banyak section.
   ============================================= */

/* --- Section Header (judul + deskripsi section) --- */
.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.badge-cloud {
    display: inline-block;
    padding: 12px 32px;
    background: var(--cloud-white);
    color: var(--sky-600);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 24px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: var(--shadow-cloud);
}

/* Badge versi light background */
.services .badge-cloud,
.contact .badge-cloud {
    background: var(--gradient-button);
    color: var(--cloud-white);
}

.section-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--cloud-white);
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Teks gelap untuk section dengan background terang */
.services .section-title,
.contact .section-title {
    color: var(--deep-blue);
    text-shadow: none;
}

.section-desc {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
}

.services .section-desc,
.contact .section-desc {
    color: var(--sky-700);
}

/* --- Section Clouds Decoration (dekorasi awan di setiap section) --- */
.section-clouds {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.deco-cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(40px);
}

.dc-1 {
    width: 400px;
    height: 200px;
    top: -50px;
    right: -100px;
}

.dc-2 {
    width: 300px;
    height: 150px;
    bottom: -50px;
    left: -100px;
}

.dc-3 {
    width: 350px;
    height: 180px;
    top: 20%;
    left: -150px;
}

.dc-4 {
    width: 280px;
    height: 140px;
    bottom: 10%;
    right: -100px;
}

.dc-5 {
    width: 320px;
    height: 160px;
    top: -80px;
    left: 20%;
}

.dc-6 {
    width: 250px;
    height: 130px;
    bottom: -60px;
    right: 30%;
}

/* --- Buttons (tombol utama) --- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 40px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-full);
    border: none;
    overflow: hidden;
    transition: var(--transition-normal);
}

.btn-cloud {
    background: var(--cloud-white);
    color: var(--sky-600);
    box-shadow: var(--shadow-cloud);
}

.btn-cloud:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-cloud-hover);
    color: var(--sky-700);
}

.btn-bubbles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.btn-bubbles span {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--sky-300);
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition-bounce);
}

.btn:hover .btn-bubbles span:nth-child(1) {
    animation: btnBubble 0.6s ease forwards;
    left: 20%;
}

.btn:hover .btn-bubbles span:nth-child(2) {
    animation: btnBubble 0.6s ease 0.1s forwards;
    left: 50%;
}

.btn:hover .btn-bubbles span:nth-child(3) {
    animation: btnBubble 0.6s ease 0.2s forwards;
    left: 80%;
}

@keyframes btnBubble {
    0% {
        bottom: 0;
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 0.8;
        transform: scale(1);
    }

    100% {
        bottom: 100%;
        opacity: 0;
        transform: scale(0.5);
    }
}

.btn-outline {
    background: transparent;
    color: var(--cloud-white);
    border: 2px solid var(--cloud-border);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: var(--cloud-glass);
    border-color: var(--cloud-white);
    transform: translateY(-5px);
}

.btn-full {
    width: 100%;
}

/* --- Card Glare Effect (efek kilauan saat hover kartu) --- */
.feature-cloud-card,
.service-cloud-card,
.benefit-cloud,
.info-cloud-card {
    position: relative;
    overflow: hidden !important;
}

.card-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(105deg,
            transparent 20%,
            rgba(255, 255, 255, 0.4) 25%,
            transparent 30%);
    transform: translateX(-100%);
    transition: 0.6s;
    pointer-events: none;
}

.feature-cloud-card:hover .card-glare,
.benefit-cloud:hover .card-glare,
.info-cloud-card:hover .card-glare {
    transform: translateX(100%);
}

/* --- Skip Navigation (aksesibilitas) --- */
.skip-nav {
    position: fixed;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-button);
    color: var(--cloud-white);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    z-index: 100000;
    font-weight: 600;
    transition: top 0.3s ease;
}

.skip-nav:focus {
    top: 12px;
}

/* --- Reveal Animation (animasi muncul saat scroll) --- */
[data-reveal] {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s var(--ease-smooth);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Modal (Testimonial & Lainnya) --- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    display: none;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: var(--cloud-white);
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--shadow-cloud);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.modal.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--sky-500);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
    color: var(--deep-blue);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 24px;
    color: var(--deep-blue);
    margin-bottom: 8px;
}

.modal-header p {
    color: var(--sky-700);
    font-size: 15px;
}

/* Rating Stars Input */
.rating-group {
    display: flex;
    justify-content: center;
    flex-direction: row-reverse;
    gap: 4px;
    margin-bottom: 24px;
}

.rating-group input {
    display: none;
}

.rating-group label {
    font-size: 32px;
    color: #e2e8f0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.rating-group label:hover,
.rating-group label:hover~label,
.rating-group input:checked~label {
    color: #fbbf24;
}

.modal textarea {
    width: 100%;
    height: 120px;
    padding: 16px;
    border: 2px solid var(--sky-100);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease;
}

.modal textarea:focus {
    border-color: var(--sky-400);
}