/* =======================================
   Variables & Resets
======================================== */
:root {
    --primary-color: #004792; /* Blue matching XOT logo */
    --secondary-color: #002b5e; /* Darker blue */
    --accent-color: #d32f2f; /* Industrial red */
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f4f6f9; /* Grayish white */
    --bg-white: #ffffff;
    --transition: all 0.3s ease-in-out;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Offset for sticky header so title isn't hidden */
    scroll-padding-top: 80px; 
}

/* Floating WhatsApp */
.whatsapp-float{
    position: fixed;
    right: 25px;
    bottom: 25px;
    display:flex;
    align-items:center;
    gap:12px;
    text-decoration:none;
    z-index:9999;
    animation: waBounce 2s infinite;
}

.wa-text{
    background:#fff;
    padding:10px 16px;
    border-radius:12px;
    box-shadow:0 8px 20px rgba(0,0,0,.15);
    color:#333;
    line-height:1.2;
}

.wa-text span{
    display:block;
    font-size:15px;
    font-weight:700;
}

.wa-text small{
    font-size:13px;
    color:#666;
}

.wa-icon{
    width:64px;
    height:64px;
    border-radius:50%;
    background:#25D366;
    display:flex;
    justify-content:center;
    align-items:center;
    color:#fff;
    font-size:34px;
    box-shadow:0 10px 25px rgba(37,211,102,.45);
    transition:.3s;
}

.whatsapp-float:hover .wa-icon{
    transform:scale(1.1);
}

.whatsapp-float:hover .wa-text{
    transform:translateX(-3px);
}

@keyframes waBounce{
    0%,100%{
        transform:translateY(0);
    }
    50%{
        transform:translateY(-5px);
    }
}

@media (max-width:768px){
    .wa-text{
        display:none;
    }

    .wa-icon{
        width:58px;
        height:58px;
        font-size:30px;
    }

    .whatsapp-float{
        right:18px;
        bottom:18px;
    }
}

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

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

/* =======================================
   Loading Animation
======================================== */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =======================================
   Header & Navigation
======================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    padding: 5px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    height: 50px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--secondary-color);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-links a:hover, 
.nav-links a.active {
    color: var(--accent-color);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
}

/* =======================================
   Hero Section
======================================== */
.hero {
    height: 100vh;
    background-image: url('https://images.unsplash.com/photo-1565514020179-026b92b2d706?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80'); /* Industrial Background placeholder */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 43, 94, 0.75); /* Dark blue overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--bg-white);
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 300;
}

.hero .motto {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 40px;
    font-style: italic;
    font-weight: 600;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--bg-white);
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent-color);
}

.btn-outline {
    background: transparent;
    color: var(--bg-white);
    border: 2px solid var(--bg-white);
    margin-left: 15px;
}

.btn-outline:hover {
    background: var(--bg-white);
    color: var(--secondary-color);
}

/* =======================================
   Section Global
======================================== */
.section {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.underline {
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* =======================================
   About Us Section
======================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 15px;
    color: var(--text-light);
}

.about-text .lang-id {
    color: #888;
    font-size: 0.95rem;
    border-left: 3px solid var(--accent-color);
    padding-left: 15px;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

/* =======================================
   Products Section
======================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.product-card:hover {
    transform: translateY(-10px);
    border-bottom: 4px solid var(--accent-color);
}

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

.product-card h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.category {
    display: inline-block;
    font-size: 0.85rem;
    background: var(--bg-light);
    padding: 4px 12px;
    border-radius: 20px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.product-card p {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.btn-link {
    color: var(--accent-color);
    font-weight: 600;
}

.btn-link i {
    margin-left: 5px;
    transition: var(--transition);
}

.btn-link:hover i {
    transform: translateX(5px);
}

/* =======================================
   Vision & Mission Section
======================================== */
.vm-container {
    max-width: 900px;
    margin: 0 auto;
}

.vision-box {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: var(--box-shadow);
}

.icon-circle {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
}

.vision-box h3, .mission-box h3 {
    color: var(--secondary-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.vision-box .en-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.vision-box .id-text {
    color: var(--text-light);
}

.mission-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.mission-list li {
    background: var(--bg-white);
    padding: 20px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 0 8px 8px 0;
    transition: var(--transition);
}

.mission-list li:hover {
    border-left: 4px solid var(--accent-color);
}

.mission-list .en {
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.mission-list .id {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

/* =======================================
   Contact Us Section
======================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3, .contact-form-container h3 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.info-item h4 {
    color: var(--text-dark);
    margin-bottom: 5px;
}

.info-item p {
    margin: 0;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-white);
    color: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
}

.map-container {
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
}

.contact-form {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-block {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

/* =======================================
   Footer
======================================== */
footer {
    background: var(--secondary-color);
    color: var(--bg-light);
    padding-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    height: 50px;
    margin-bottom: 20px;
    /* Optional: filter to make logo stand out on dark bg if needed */
    /* filter: brightness(0) invert(1); */
}

.footer-motto {
    color: var(--accent-color);
    font-style: italic;
    font-weight: 600;
    margin-bottom: 15px;
}

.footer-col h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 40px;
    height: 2px;
    background: var(--accent-color);
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    gap: 15px;
}

.footer-contact i {
    color: var(--accent-color);
    margin-top: 5px;
}

.footer-bottom {
    background: #001a3a;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

/* =======================================
   Scroll To Top Button
======================================== */
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent-color);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
}

#scrollTopBtn:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

/* =======================================
   Vanilla Intersection Observer Animations
======================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* =======================================
   Responsive Design
======================================== */
@media (max-width: 992px) {
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    
    .nav-links {
        position: absolute;
        top: 80px;
        left: -100%;
        width: 100%;
        background: var(--bg-white);
        flex-direction: column;
        text-align: center;
        padding: 30px 0;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        transition: var(--transition);
        gap: 20px;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-outline {
        margin-left: 0;
        margin-top: 15px;
        display: block;
    }
}