/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.logo-img.loading {
    opacity: 0.5;
}

.logo-img.error {
    opacity: 0.3;
}

.nav-logo h2 {
    color: #18255b;
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #40a9d7;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #40a9d7;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #18255b 0%, #2972b6 50%, #40a9d7 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 120px 20px 80px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #2972b6;
    color: white;
}

.btn-primary:hover {
    background: #18255b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(41, 114, 182, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #18255b;
    transform: translateY(-2px);
}

.btn-whatsapp {
    background: #25d366;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background: #128c7e;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 4rem;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-item {
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1rem;
    opacity: 0.8;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #18255b;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    padding: 100px 0;
    background: #fcfffd;
    position: relative;
    z-index: 1;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 1.5rem;
    color: #18255b;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.about-text h3:first-child {
    margin-top: 0;
}

.about-text p {
    margin-bottom: 1rem;
    color: #666;
    line-height: 1.8;
}

.about-text ul {
    list-style: none;
    margin-top: 1rem;
}

.about-text li {
    padding: 0.5rem 0;
    color: #666;
    display: flex;
    align-items: center;
}

.about-text li i {
    color: #40a9d7;
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Services Section */
.services {
    padding: 100px 0;
    background: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2972b6, #40a9d7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.3rem;
    color: #18255b;
    margin-bottom: 1rem;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}

/* Clients Section */
.clients {
    padding: 80px 0;
    background: white;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    align-items: center;
}

.client-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    background: #deeff9;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.client-logo:hover {
    background: white;
    border-color: #36aad6;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(54, 170, 214, 0.1);
}

.client-logo img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    /* filter: grayscale(100%); */
    transition: all 0.3s ease;
    opacity: 1;
}

.client-logo img.loading {
    opacity: 0.5;
    /* filter: grayscale(100%) blur(1px); */
}

.client-logo img.error {
    opacity: 0.3;
    filter: grayscale(100%);
}

.client-logo:hover img {
    filter: grayscale(0%);
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background: #fcfffd;
}

.projects-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #ddd;
    background: white;
    color: #666;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: #2972b6;
    color: white;
    border-color: #2972b6;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    position: relative;
}

.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    opacity: 1;
}

.project-image img.loading {
    opacity: 0.7;
    filter: blur(2px);
}

.project-image img.error {
    opacity: 0.5;
    background: #f0f0f0;
}

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

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

.project-overlay h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.project-overlay p {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.project-details {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-year {
    background: #2972b6;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.project-location {
    background: #40a9d7;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Project Social Media Links */
.project-social {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
}

.project-social a {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.project-social a:hover {
    background: white;
    color: #2972b6;
    transform: scale(1.1);
}

.project-social a i {
    font-size: 16px;
}

/* Video Project Card */
.project-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.project-video-player {
    cursor: pointer;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    color: white;
    opacity: 0.9;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: rgba(41, 114, 182, 0.8);
    border-radius: 50%;
}

.video-play-icon:hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(24, 37, 91, 0.9);
}

.project-video:hover .video-play-icon:not([style*="display: none"]) {
    transform: translate(-50%, -50%) scale(1.15);
}

.project-video video::-webkit-media-controls-panel {
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.project-video video::-webkit-media-controls-play-button {
    background-color: #2972b6;
    border-radius: 50%;
}

/* Projects Container with Pagination */
.projects-container {
    position: relative;
    width: 100%;
    touch-action: pan-y; /* Allow vertical scroll but enable horizontal swipe detection */
    user-select: none; /* Prevent text selection during swipe */
}

/* Pagination Arrow Buttons */
.pagination-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: #2972b6;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(41, 114, 182, 0.3);
}

.pagination-prev {
    left: -70px;
}

.pagination-next {
    right: -70px;
}

.pagination-arrow:hover:not(:disabled) {
    background: #18255b;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(24, 37, 91, 0.4);
}

.pagination-arrow:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-arrow i {
    font-size: 20px;
}

/* Page Indicator */
.pagination-info {
    text-align: center;
    margin-top: 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #18255b;
}

.pagination-info span {
    font-size: 1.2rem;
    color: #2972b6;
    font-weight: 700;
}

@media (max-width: 1024px) {
    .pagination-prev {
        left: -60px;
    }
    
    .pagination-next {
        right: -60px;
    }
    
    .pagination-arrow {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 768px) {
    .pagination-arrow {
        width: 40px;
        height: 40px;
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        transform: none;
    }
    
    .pagination-prev {
        left: 10px;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .pagination-next {
        right: 10px;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .pagination-arrow i {
        font-size: 16px;
    }
    
    .pagination-info {
        font-size: 0.9rem;
        margin-top: 1rem;
    }
    
    /* Swipe indicator hint */
    .projects-container::after {
        content: '← Swipe untuk navigasi →';
        display: block;
        text-align: center;
        color: #666;
        font-size: 0.85rem;
        margin-top: 1rem;
        opacity: 0.7;
        font-style: italic;
    }
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

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

.contact-icon {
    width: 50px;
    height: 50px;
    background: #2972b6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-icon i {
    color: white;
    font-size: 1.2rem;
}

.contact-details h3 {
    color: #18255b;
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: #666;
    line-height: 1.6;
}

.contact-form {
    background: #fcfffd;
    padding: 2rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #40a9d7;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: #18255b;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: opacity 0.3s ease;
}

.footer-logo-img.loading {
    opacity: 0.5;
}

.footer-logo-img.error {
    opacity: 0.3;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #40a9d7;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #34495e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #2972b6;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    color: #bdc3c7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-logo h2 {
        font-size: 1.2rem;
    }

    .logo-img {
        height: 20px;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero {
        padding: 100px 20px 60px;
    }

    .hero h1 {
        font-size: 2.5rem;
        margin-top: 20px;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        gap: 2rem;
        margin-top: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .projects-filter {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 15px 50px;
        justify-content: flex-start;
        padding-top: 140px;
    }

    .hero h1 {
        font-size: 1.8rem;
        margin-top: 10px;
        line-height: 1.3;
    }

    .hero p {
        font-size: 0.95rem;
        padding: 0 5px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: row;
        gap: 1.5rem;
        margin-top: 2rem;
        flex-wrap: wrap;
    }

    .stat-item h3 {
        font-size: 1.8rem;
    }

    .stat-item p {
        font-size: 0.85rem;
    }
}

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

/* Fix for section transitions */
section {
    position: relative;
    z-index: 1;
}

.hero {
    z-index: 2;
}

/* Prevent layout shift */
.hero-content {
    position: relative;
    z-index: 3;
    transition: transform 0.1s ease-out, opacity 0.1s ease-out;
}

/* Smooth section transitions */
section {
    transform: translateZ(0);
    backface-visibility: hidden;
}

.about {
    margin-top: 0;
}

/* Loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #40a9d7;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2972b6;
}

/* Loading indicator */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Image loading states */
img {
    transition: all 0.3s ease;
}

img.loading {
    opacity: 0.7;
    filter: blur(1px);
}

img.error {
    opacity: 0.5;
    filter: grayscale(100%);
}

/* Fallback styles */
.logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2972b6;
    color: white;
    font-weight: bold;
    border-radius: 8px;
    min-width: 50px;
    min-height: 50px;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 1000;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.whatsapp-btn:hover {
    background: #128c7e;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-btn i {
    font-size: 28px;
}

.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #18255b;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-left-color: #18255b;
}

.whatsapp-btn:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 100px;
        right: 24px;
    }
    
    .whatsapp-btn {
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-btn i {
        font-size: 24px;
    }
    
    .whatsapp-tooltip {
        display: none;
    }
}
