/* Gaya Bootstrap Dipertingkatkan untuk MawiRenovation */

/* Pembolehubah Tersuai */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    
    --font-family: 'Poppins', sans-serif;
    --border-radius: 12px;
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease-in-out;
}

/* Gaya Asas */
body {
    font-family: var(--font-family);
    overflow-x: hidden;
}

/* Navigasi */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--box-shadow);
}

.nav-link {
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* Bahagian Hero */
.hero-section {
    position: relative;
    overflow: hidden;
    /* Base gradient with construction theme colors */
    background: linear-gradient(135deg, 
        #0a192f 0%, 
        #1a3a5f 20%, 
        #2c5282 40%, 
        #1e3a5f 60%, 
        #0a192f 80%, 
        #000000 100%);
    background-size: 300% 300%;
    animation: gradientShift 20s ease infinite;
    /* Add subtle texture overlay */
    &::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: 
            /* Concrete texture pattern */
            repeating-linear-gradient(
                45deg,
                rgba(255,255,255,0.03) 0px,
                rgba(255,255,255,0.03) 1px,
                transparent 1px,
                transparent 11px
            ),
            /* Metal grid pattern */
            repeating-linear-gradient(
                90deg,
                rgba(100,150,200,0.05) 0px,
                rgba(100,150,200,0.05) 2px,
                transparent 2px,
                transparent 20px
            ),
            repeating-linear-gradient(
                0deg,
                rgba(100,150,200,0.05) 0px,
                rgba(100,150,200,0.05) 2px,
                transparent 2px,
                transparent 20px
            );
        z-index: 1;
        opacity: 0.7;
    }
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%) !important;
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #212529 0%, #1a1e21 100%);
}

.min-vh-100 {
    min-height: 100vh;
}

/* Hero Background Overlay - Enhanced with construction theme */
.hero-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    /* Construction-themed overlay effects */
    background: 
        /* Steel beam patterns */
        linear-gradient(90deg, 
            transparent 0%, 
            rgba(100, 150, 200, 0.1) 1%, 
            rgba(100, 150, 200, 0.2) 2%, 
            rgba(100, 150, 200, 0.1) 3%, 
            transparent 4%,
            transparent 96%,
            rgba(100, 150, 200, 0.1) 97%,
            rgba(100, 150, 200, 0.2) 98%,
            rgba(100, 150, 200, 0.1) 99%,
            transparent 100%
        ),
        /* Diagonal construction lines */
        repeating-linear-gradient(
            30deg,
            transparent,
            transparent 15px,
            rgba(70, 130, 180, 0.1) 15px,
            rgba(70, 130, 180, 0.1) 17px,
            transparent 17px,
            transparent 35px
        ),
        /* Subtle radial highlights */
        radial-gradient(circle at 15% 25%, rgba(100, 200, 255, 0.15) 0%, transparent 30%),
        radial-gradient(circle at 85% 75%, rgba(70, 150, 220, 0.12) 0%, transparent 35%),
        radial-gradient(circle at 50% 50%, rgba(50, 120, 200, 0.08) 0%, transparent 40%),
        /* Depth enhancing gradients */
        linear-gradient(45deg, transparent 30%, rgba(30, 80, 150, 0.06) 50%, transparent 70%),
        linear-gradient(135deg, transparent 20%, rgba(20, 60, 120, 0.04) 50%, transparent 80%);
    animation: backgroundFlow 25s ease-in-out infinite;
    opacity: 0.85;
    mix-blend-mode: overlay;
}

/* Animasi */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 0%;
    }
    25% {
        background-position: 100% 100%;
    }
    50% {
        background-position: 100% 0%;
    }
    75% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

@keyframes backgroundFlow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(-10px, -10px) scale(1.02);
    }
    50% {
        transform: translate(10px, 10px) scale(0.98);
    }
    75% {
        transform: translate(5px, -5px) scale(1.01);
    }
}

@keyframes backgroundFlow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(-10px, -10px) scale(1.02);
    }
    50% {
        transform: translate(10px, 10px) scale(0.98);
    }
    75% {
        transform: translate(5px, -5px) scale(1.01);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-slide-in {
    animation: slideIn 1s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Kad Perkhidmatan */
.service-card {
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow);
}

.service-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Kad Projek */
.project-card {
    transition: var(--transition);
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 100%;
}

.project-card .card-img-top {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow);
}

.project-image {
    transition: var(--transition);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-overlay {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    transition: var(--transition);
    opacity: 0;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

/* Kad Testimoni */
.testimonial-card {
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

/* Kesan Hover */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* Butang */
.btn {
    font-weight: 500;
    transition: var(--transition);
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* WhatsApp Button Style */
.btn-whatsapp {
    background-color: #25D366 !important;
    color: white !important;
    border: none;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-whatsapp:hover {
    background-color: #128C7E !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
    color: white !important;
}

.btn-whatsapp:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.5);
}

.btn-whatsapp::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #094db1 100%);
}

/* Form Styles */
.form-control {
    border-radius: var(--border-radius);
    padding: 12px 15px;
    transition: var(--transition);
    color: white;
    background-color: #212529;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    color: white;
}

/* Cards */
.card {
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
}

.card-img-top {
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

/* WhatsApp Floating Button */
.whatsapp-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: pulse 2s infinite;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-float-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

/* Section Spacing */
.py-7 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .display-6 {
        font-size: 1.5rem;
    }
    
    .hero-section {
        text-align: center;
    }
    
    .whatsapp-float-btn {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .py-7 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .navbar-nav {
        text-align: center;
        padding: 20px 0;
    }
    
    .nav-link::after {
        display: none;
    }
    
    /* Services section - 2 columns on mobile */
    #services .col-md-6.col-lg-4 {
        flex: 0 0 auto;
        width: 50%;
    }
    
    /* Projects section - 2 columns on mobile */
    #projects .col-sm-4.col-md-6.col-lg-4 {
        flex: 0 0 auto;
        width: 50%;
    }
}

@media (max-width: 576px) {
    .whatsapp-float-btn {
        width: 45px;
        height: 45px;
    }
    
    .btn {
        padding: 10px 20px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    /* Ensure 2 columns maintained on very small screens */
    #services .col-md-6.col-lg-4,
    #projects .col-sm-4.col-md-6.col-lg-4 {
        flex: 0 0 auto;
        width: 50%;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

/* Accessibility */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .whatsapp-float-btn,
    .hero-section {
        display: none;
    }
    
    body {
        font-size: 12pt;
        color: #000;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Footer Styles */
footer.bg-dark {
    color: white !important;
}

footer.bg-dark .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

footer.bg-dark a.text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

footer.bg-dark a.text-muted:hover {
    color: white !important;
}

footer.bg-dark h5, 
footer.bg-dark h6 {
    color: white !important;
}

footer.bg-dark p {
    color: rgba(255, 255, 255, 0.85) !important;
}

footer.bg-dark .list-unstyled li {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Form Placeholder White Text */
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
    opacity: 1;
}

.form-control::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

.form-control::-moz-placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
    opacity: 1;
}

.form-control:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

.form-control::-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}