/* ===== CSS VARIABLES ===== */
:root {
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --text-color: #e2e8f0;
    --text-secondary: #94a3b8;
    --primary-color: #38bdf8; /* biru utama */
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --success-color: #28a745;
    --accent-color: #38bdf8; /* biru utama untuk aksen/footer */
}

/* Light mode variables */
body.light-mode {
    --bg-color: #f8fafc;
    --bg-secondary: #ffffff;
    --text-color: #212529;
    --text-secondary: #6c757d;
    --primary-color: #0d6efd;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* ===== PARTICLES BACKGROUND ===== */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

main, header, footer {
    position: relative;
    z-index: 1;
}

/* ===== LAYOUT COMPONENTS ===== */
.section {
    padding: 6rem 0;
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease;
}

body.light-mode .header {
    background: rgba(255, 255, 255, 0.85);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

.logo span {
    color: var(--primary-color);
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-item {
    margin-left: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

/* ===== THEME SWITCH ===== */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 50px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #475569;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.slider .fa-moon {
    position: absolute;
    left: 6px;
    top: 5px;
    color: #f1c40f;
    font-size: 14px;
}

.slider .fa-sun {
    position: absolute;
    right: 6px;
    top: 5px;
    color: #f39c12;
    font-size: 14px;
    opacity: 0;
}

input:checked + .slider .fa-moon {
    opacity: 0;
}

input:checked + .slider .fa-sun {
    opacity: 1;
}

/* ===== HERO SECTION ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: transparent;
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-content h1 .highlight {
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 700;
    border: none;
}

body.dark-mode .btn-primary {
    color: #0f172a;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(13, 110, 253, 0.25);
}

body.dark-mode .btn-primary:hover {
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.25);
}

/* ===== ABOUT SECTION ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.about-image {
    width: 100%;
    max-width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    border: 5px solid var(--border-color);
    box-shadow: 0 0 30px rgba(13, 110, 253, 0.2);
    margin: auto;
}
.about-image:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
    transition: 0.3s;
}

body.dark-mode .about-image {
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ===== CARDS ===== */
.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    padding: 2rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -2px var(--shadow-color);
    border-color: var(--primary-color);
}

#services .card-container .card,
#why-us .card-container .card,
#portfolio .card-container .card {
    flex-basis: 320px;
    flex-grow: 1;
}

#why-us .card-container .card {
    flex-basis: 150px; /* Sedikit lebih lebar untuk teks */
}

.card .icon,
.card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

#why-us .card h3 {
    font-size: 1.1rem; /* Sedikit lebih besar */
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

#services .card,
#why-us .card {
    text-align: center;
}

/* ===== PROJECT CARDS ===== */
.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-content p {
    flex-grow: 1;
}

.project-tags {
    margin-bottom: 1.5rem;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0.2rem;
}

body.dark-mode .tag {
    background-color: var(--primary-color);
    color: #0f172a;
}

body.light-mode .tag {
    background-color: #e7f1ff;
    color: #0d6efd;
}


/* ===== CONTACT SECTION ===== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: flex-start;
}

.contact-info ul {
    list-style: none;
    padding: 0;
}

.contact-info .info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-info .info-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 1.5rem;
    margin-top: 5px;
    width: 25px;
    text-align: center;
}

.contact-info h4 {
    font-size: 1.1rem;
    margin: 0 0 0.25rem 0;
    color: var(--text-color);
}

.contact-info p {
    margin: 0;
    color: var(--text-secondary);
}

.contact-info a {
    text-decoration: none;
    color: inherit;
    transition: text-decoration 0.2s, color 0.2s;
}
.contact-info a:hover {
    text-decoration: underline;
    color: var(--primary-color);
}

.form-wrapper h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}
.form-group {
    margin-bottom: 1rem;
}
.form-control {
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}


body.light-mode .form-control {
    background-color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

textarea.form-control {
    resize: vertical;
    height: 150px;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.footer .heart {
    color: var(--primary-color);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* ===== MODAL ===== */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-container.show {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

body.light-mode .modal-overlay {
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    position: relative;
    z-index: 1;
    background-color: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: scale(0.7);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.modal-container.show .modal-content {
    transform: scale(1);
}

.modal-content .icon {
    font-size: 5rem;
    color: var(--success-color);
    margin-bottom: 1.5rem;
}

.modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ===== HAMBURGER MENU ===== */
.hamburger {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hamburger:hover {
    background-color: var(--border-color);
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease;
    background-color: var(--text-color);
    border-radius: 2px;
}

/* ===== RESPONSIVE DESIGN ===== */
/* Tablet */
@media(max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        margin-bottom: 3rem;
    }
}

/* Mobile */
@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: row;
        background-color: var(--bg-secondary);
        width: 100%;
        text-align: center;
        transition: 0.3s ease-in-out;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--border-color);
        padding: 1rem 0;
        backdrop-filter: blur(10px);
        z-index: 999;
        justify-content: center;
        flex-wrap: wrap;
    }
     
    .nav-item {
        margin: 0 0.5rem;
        padding: 0.5rem 0;
        border-bottom: none;
    }
    
    .nav-item:last-child {
        border-bottom: none;
        margin-top: 0;
        padding-top: 0.5rem;
        border-top: none;
    }
    
    .nav-link {
        font-size: 0.9rem;
        font-weight: 500;
        padding: 0.5rem 0.8rem;
        display: block;
        transition: all 0.3s ease;
        white-space: nowrap;
    }
    
    .nav-link:hover {
        background-color: var(--primary-color);
        color: white;
        border-radius: 8px;
        margin: 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-image {
        margin-bottom: 2rem;
        max-width: 250px;
        height: 250px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .card {
        padding: 1.5rem;
    }
}

/* Footer styling update */
.footer__cta h2,
.footer__links h4,
.footer__contact h4 {
    color: var(--primary-color) !important;
}
.footer__cta p,
.footer__slogan,
.footer__links ul li a,
.footer__contact ul li {
    color: #b6e6ff !important;
}
.footer__brand .nav__logo span {
    color: var(--primary-color) !important;
}
.footer__socials a {
    color: #b6e6ff !important;
    background: rgba(56,189,248,0.08) !important;
}
.footer__socials a:hover {
    background: var(--primary-color) !important;
    color: #181a1b !important;
}
.footer__contact ul li i {
    color: var(--primary-color) !important;
}
.footer__bottom {
    color: #b6e6ff !important;
}
.footer__links ul li a {
    text-decoration: none !important;
}
.footer__links ul li a:hover {
    color: var(--primary-color) !important;
    text-decoration: none !important;
}
/* Hapus Menu Cepat */
.footer__links { display: none !important; }