:root {
    --primary-color: #663a82;
    --secondary-color: #9b63c9;
    --accent-color: #c496e9;
    --text-color: #301a40;
    --bg-light: #f8f9fa;
}

/* Preloader */
#preloader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: #ffffff !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 9999999 !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.loader {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 120px !important;
    height: 120px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
}

.loader img {
    position: relative;
    z-index: 2;
    height: 60px;
    width: auto;
    display: block;
    margin: 0;
    animation: pulse 1.5s infinite ease-in-out;
}

.spinner {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(102, 58, 130, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    animation: spin 1s linear infinite;
}

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

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.floating-anim {
    animation: floating 4s ease-in-out infinite;
}

.hero-image-wrapper {
    position: relative;
    padding: 20px;
    max-width: 100%;
    overflow: hidden;
}

* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden !important;
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

.main-wrapper {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
    display: block;
}

.hero-section {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(102, 58, 130, 0.05) 0%, rgba(155, 99, 201, 0.05) 100%);
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden !important;
}

.hero-flex-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 30px;
}

.hero-text-part {
    flex: 1;
    max-width: 600px;
}

.hero-image-part {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-btn-group {
    display: flex;
    gap: 15px;
}

@media (max-width: 991px) {
    .hero-flex-layout {
        flex-direction: column;
        text-align: center;
        gap: 50px;
    }
    
    .hero-text-part {
        max-width: 100%;
    }
    
    .hero-btn-group {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btn-group .btn {
        width: 100%;
        max-width: 300px;
    }
}

.col-lg-6 {
    max-width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem !important;
    }
}

.text-primary-custom { color: var(--primary-color) !important; }
.text-secondary-custom { color: var(--secondary-color) !important; }
.text-accent { color: var(--accent-color) !important; }

.bg-primary-custom { background-color: var(--primary-color) !important; color: white; }
.bg-secondary-custom { background-color: var(--secondary-color) !important; color: white; }

.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s;
    font-weight: 600;
}

@media (max-width: 576px) {
    .btn-primary-custom, .btn-outline-primary-custom {
        width: 100%;
        margin-bottom: 5px;
    }
}

.btn-primary-custom:hover {
    background-color: #4e2b63;
    border-color: #4e2b63;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 58, 130, 0.3);
}

.btn-outline-primary-custom {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 28px;
    border-radius: 50px;
    background: transparent;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-outline-primary-custom:hover {
    background-color: var(--primary-color);
    color: white;
}

.navbar {
    padding: 15px 0;
    transition: all 0.3s;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-color) !important;
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-color) !important;
    margin: 0 5px;
    font-size: 0.95rem;
    transition: color 0.3s;
}

@media (max-width: 1200px) {
    .nav-link {
        margin: 0 3px;
        font-size: 0.85rem;
    }
    .navbar-brand {
        font-size: 1.2rem;
    }
}

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

section {
    overflow: hidden;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 25px;
    word-break: break-word;
}

.hero-title span.kreasikan { color: var(--secondary-color); }
.hero-title span.kaosmu { color: var(--text-color); }

.service-card {
    padding: 30px;
    border-radius: 15px;
    background: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.portfolio-item {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 30px;
}

.portfolio-item img {
    width: 100%;
    transition: transform 0.5s;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(62, 49, 47, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h4 {
    color: white;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.portfolio-item:hover .portfolio-overlay h4 {
    transform: translateY(0);
}

.footer {
    background-color: var(--text-color);
    color: white;
    padding: 50px 0 20px;
}

.footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--secondary-color);
}

/* Mobile Fixes */
@media (max-width: 1199px) {
    .navbar-collapse {
        background: white;
        padding: 20px;
        border-radius: 10px;
        margin-top: 15px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    
    .hero-title {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem !important;
    }
    
    .hero-section .d-flex {
        flex-direction: column;
    }
}

.floating-wa {
    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: 35px;
    z-index: 1000;
    transition: all 0.3s;
    text-decoration: none;
}

.floating-wa:hover {
    background-color: #128C7E;
    color: white;
    transform: scale(1.1);
}
