/* Custom CSS untuk landing page */

/* Global Styles */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: rgba(31, 42, 120, 0.2);
}

/* Touch device optimizations */
button, .btn, a, input, textarea, select {
    -webkit-tap-highlight-color: rgba(31, 42, 120, 0.2);
    touch-action: manipulation;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Improve image rendering */
img {
    max-width: 100%;
    height: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Override for navbar logo to prevent it from being too large */
.navbar-brand img {
    height: 40px !important;
    width: auto !important;
    max-width: none !important;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-section .carousel-inner {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-section .btn {
    transition: all 0.3s ease;
    font-weight: 600;
    padding: 12px 32px;
    border-radius: 8px;
}

.hero-section .btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow: 0 4px 12px rgba(31, 42, 120, 0.4);
}

.hero-section .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(31, 42, 120, 0.6);
}

.hero-section .btn-outline-light {
    border-width: 2px;
}

.hero-section .btn-outline-light:hover {
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* Services Section */
#services {
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

.card-service {
    transition: all 0.3s ease;
    border: none;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card-service::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card-service:hover::before {
    transform: scaleX(1);
}

.card-service:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(31, 42, 120, 0.15);
}

.card-service .bg-primary {
    background: linear-gradient(135deg, rgba(31, 42, 120, 0.1) 0%, rgba(20, 28, 82, 0.1) 100%) !important;
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.card-service .card-title {
    color: #2d3748;
    font-weight: 700;
}

.card-service .btn-outline-primary {
    border-width: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card-service .btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
}

/* Testimonials */
.testimonial-card {
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.testimonial-card:hover {
    box-shadow: 0 8px 20px rgba(31, 42, 120, 0.15);
    transform: translateY(-4px);
}

.testimonial-item .card {
    border-radius: 12px;
}

.testimonial-item .text-warning {
    color: #fbbf24 !important;
    font-size: 1.5rem;
}

/* Products */
.product-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(31, 42, 120, 0.15);
}

.product-card img {
    transition: transform 0.5s ease;
    height: 200px;
    object-fit: cover;
}

.product-card:hover img {
    transform: scale(1.1);
}

.product-card .badge {
    background: var(--gradient-primary);
    font-weight: 600;
    padding: 6px 12px;
}

.product-card .text-primary {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Contact Form */
.contact-form .form-control {
    border-radius: 5px;
    padding: 10px 15px;
    border: 1px solid #ddd;
}

.contact-form .form-control:focus {
    box-shadow: none;
    border-color: #0d6efd;
}

/* Footer */
.footer {
    background-color: #1a1a1a;
}

.footer a:hover {
    color: #0d6efd !important;
}

.social-icons a {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: #0d6efd;
    transform: translateY(-3px);
}

/* Custom styling untuk services section */
.card-service {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
}

.card-service:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15) !important;
}

.service-icon {
    width: 70px;
    height: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(13, 110, 253, 0.1);
    border-radius: 50%;
    margin-bottom: 1rem;
}

/* Testimonial Styles */
.testimonial-container {
    position: relative;
    min-height: 300px;
}

.testimonial-item {
    display: none;
    animation: fadeIn 0.5s ease;
}

.testimonial-item.active {
    display: block;
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.testimonial-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-dot.active {
    background: var(--gradient-primary);
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(31, 42, 120, 0.4);
}

.testimonial-dot:hover {
    background: var(--gradient-primary);
    transform: scale(1.2);
}

/* Logo styling */
.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.1);
}

/* Untuk logo yang lebih besar di halaman utama */
.hero-logo {
    height: 50px;
    margin-bottom: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* CTA Section Styles */
.cta-card {
    background: var(--gradient-primary);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(31, 42, 120, 0.3);
}

.cta-card .btn-light {
    font-weight: 600;
    padding: 12px 32px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cta-card .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.cta-card .btn-success {
    font-weight: 600;
    padding: 12px 32px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cta-card .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

/* Why Us Section */
.why-us-feature {
    transition: all 0.3s ease;
    padding: 12px;
    border-radius: 8px;
}

.why-us-feature:hover {
    background: rgba(31, 42, 120, 0.05);
    transform: translateX(8px);
}

.why-us-feature .fa-check-circle {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Contact Section Styles */
#contact .btn-primary {
    background: var(--gradient-primary);
    border: none;
    font-weight: 600;
    padding: 12px 32px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#contact .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(31, 42, 120, 0.4);
}

#contact .form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(31, 42, 120, 0.25);
}

/* Product Preview Button */
.btn-outline-primary {
    border-width: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    transform: translateY(-2px);
}

/* Pagination Styles */
.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: transparent;
}

.pagination .page-link {
    color: var(--color-primary);
    font-weight: 600;
    border-radius: 8px;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: rgba(31, 42, 120, 0.1);
    color: var(--color-primary-light);
    transform: translateY(-2px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0 !important;
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem !important;
    }
    
    .hero-section .lead {
        font-size: 1rem !important;
    }
    
    .hero-section img {
        margin-top: 30px;
    }
    
    .hero-section .carousel-inner {
        border-radius: 12px !important;
    }
    
    .hero-section .carousel-inner img {
        height: 250px !important;
    }

    .service-card {
        margin-bottom: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 1rem !important;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    .card-service .bg-primary {
        width: 60px !important;
        height: 60px !important;
    }
    
    .card-service .bg-primary img {
        width: 40px !important;
        height: 40px !important;
    }
    
    .hero-section .btn {
        padding: 10px 20px !important;
        font-size: 0.9rem !important;
    }
    
    /* Mobile CTA Section */
    .cta-card .card-body {
        padding: 2rem 1rem !important;
    }
    
    .cta-card h3 {
        font-size: 1.5rem !important;
    }
    
    .cta-card .btn-lg {
        padding: 10px 20px !important;
        font-size: 0.9rem !important;
    }
    
    /* Mobile Navbar */
    .navbar-collapse {
        background: rgba(0,0,0,0.1);
        border-radius: 8px;
        margin-top: 10px;
        padding: 10px;
    }
    
    .navbar-nav .nav-link {
        padding: 10px 15px !important;
        margin: 2px 0;
    }
    
    /* Mobile Product Cards */
    .product-card img {
        height: 180px !important;
    }
    
    .product-card .card-title {
        font-size: 0.95rem !important;
    }
    
    /* Mobile Why Us Section */
    .why-us-feature {
        padding: 8px !important;
    }
    
    .why-us-feature .fa-check-circle {
        font-size: 1.5rem !important;
    }
    
    .why-us-feature h4 {
        font-size: 1rem !important;
    }
    
    /* Mobile Testimonials */
    .testimonial-container {
        min-height: auto !important;
    }
    
    .testimonial-item .card-body {
        padding: 1.5rem !important;
    }
    
    /* Mobile Products Page */
    .products-header {
        padding: 40px 0 30px !important;
    }
    
    .products-header h1 {
        font-size: 1.75rem !important;
    }
    
    .search-box .form-control {
        font-size: 0.9rem !important;
    }
    
    .filter-btn {
        padding: 8px 16px !important;
        font-size: 0.85rem !important;
        margin: 2px !important;
    }
    
    /* Mobile Footer */
    footer .col-md-6 {
        margin-bottom: 2rem;
    }
    
    footer h4, footer h5 {
        font-size: 1.25rem !important;
    }
    
    footer .social-icons a {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.9rem;
    }
}

/* Extra Small Devices (Low-end Android, < 576px) */
@media (max-width: 576px) {
    .hero-section {
        padding: 30px 0 !important;
    }
    
    .hero-section .display-4 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    .hero-section .lead {
        font-size: 0.9rem !important;
    }
    
    .hero-section .carousel-inner img {
        height: 200px !important;
    }
    
    .hero-section .btn {
        padding: 8px 16px !important;
        font-size: 0.85rem !important;
    }
    
    .card-service {
        padding: 0 !important;
    }
    
    .card-service .card-body {
        padding: 1.5rem !important;
    }
    
    .card-service .card-title {
        font-size: 1.1rem !important;
    }
    
    .card-service .card-text {
        font-size: 0.9rem !important;
    }
    
    .card-service .bg-primary {
        width: 50px !important;
        height: 50px !important;
    }
    
    .card-service .bg-primary img {
        width: 30px !important;
        height: 30px !important;
    }
    
    .cta-card h3 {
        font-size: 1.25rem !important;
    }
    
    .cta-card p {
        font-size: 0.9rem !important;
    }
    
    .cta-card .btn {
        width: 100%;
        margin: 5px 0;
    }
    
    .product-card img {
        height: 150px !important;
    }
    
    .product-card .card-body {
        padding: 1rem !important;
    }
    
    .product-card .card-title {
        font-size: 0.85rem !important;
    }
    
    .product-card .badge {
        font-size: 0.7rem !important;
        padding: 4px 8px !important;
    }
    
    .pagination .page-link {
        padding: 6px 10px !important;
        font-size: 0.85rem !important;
        margin: 0 2px !important;
    }
    
    .products-header h1 {
        font-size: 1.5rem !important;
    }
    
    .products-header p {
        font-size: 0.85rem !important;
    }
    
    .filter-btn {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
    }
    
    footer {
        padding: 2rem 0 !important;
    }
    
    footer h4, footer h5 {
        font-size: 1.1rem !important;
    }
    
    footer p, footer li {
        font-size: 0.85rem !important;
    }
    
    footer .social-icons a {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.8rem;
    }
    
    /* Mobile Form Inputs */
    .form-control {
        font-size: 14px !important;
    }
    
    .btn {
        font-size: 14px !important;
    }
}

/* Performance optimization for low-end devices */
@media (max-width: 576px) {
    * {
        -webkit-tap-highlight-color: rgba(0,0,0,0);
    }
    
    /* Disable expensive animations on low-end devices */
    .card-service::before,
    .product-card:hover img {
        transform: none !important;
    }
    
    /* Simplify shadows for better performance */
    .card, .card-service, .product-card {
        box-shadow: 0 1px 3px rgba(0,0,0,0.12) !important;
    }
    
    .card:hover, .card-service:hover, .product-card:hover {
        box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
        transform: translateY(-4px) !important;
    }
}

/* Low-end Android floor (< 360px) */
@media (max-width: 360px) {
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .hero-section .display-4 {
        font-size: 1.3rem !important;
        line-height: 1.25 !important;
    }

    .hero-section .lead {
        font-size: 0.85rem !important;
    }

    .card-service .card-body,
    .product-card .card-body {
        padding: 1rem 0.75rem !important;
    }

    .btn, .form-control {
        font-size: 0.85rem !important;
    }

    .cta-card .card-body {
        padding: 1.5rem 0.75rem !important;
    }

    /* Drop decorative blur/shadow for low-end GPUs */
    .card, .card-service, .product-card, .testimonial-card {
        box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
    }
}

/* Large desktop (>= 1200px): keep content from over-stretching */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }

    .hero-section {
        padding: 130px 0;
    }

    .card-service .card-body,
    .product-card .card-body {
        padding: 2rem;
    }
}

/* Extra-large desktop (>= 1600px) */
@media (min-width: 1600px) {
    .container {
        max-width: 1280px;
    }
}