/* Fonts */
:root {
    --default-font: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --heading-font: "Raleway", sans-serif;
    --nav-font: "Poppins", sans-serif;
}

/* Global Colors - The following color variables are used throughout the website. Updating them here will change the color scheme of the entire website */
:root {
    --background-color: #ffffff;
    /* Background color for the entire website, including individual sections */
    --default-color: #444444;
    /* Default color used for the majority of the text content across the entire website */
    --heading-color: #15213f;
    /* Color for headings, subheadings and title throughout the website */
    --accent-color: #07a6ad;
    /* Accent color that represents your brand on the website. It's used for buttons, links, and other elements that need to stand out */
    --surface-color: #ffffff;
    /* The surface color is used as a background of boxed elements within sections, such as cards, icon boxes, or other elements that require a visual separation from the global background. */
    --contrast-color: #ffffff;
    /* Contrast color for text, ensuring readability against backgrounds of accent, heading, or default colors. */
}

/* Nav Menu Colors - The following color variables are used specifically for the navigation menu. They are separate from the global colors to allow for more customization options */
:root {
    --nav-color: #ffffff;
    /* The default color of the main navmenu links */
    --nav-hover-color: #1acc8d;
    /* Applied to main navmenu links when they are hovered over or active */
    --nav-mobile-background-color: #ffffff;
    /* Used as the background color for mobile navigation menu */
    --nav-dropdown-background-color: #ffffff;
    /* Used as the background color for dropdown items that appear when hovering over primary navigation items */
    --nav-dropdown-color: #444444;
    /* Used for navigation links of the dropdown items in the navigation menu. */
    --nav-dropdown-hover-color: #1acc8d;
    /* Similar to --nav-hover-color, this color is applied to dropdown navigation links when they are hovered over. */
}

/* tambahan css */

.factory-item {
    overflow: hidden;
    border-right: 3px solid var(--background-color);
    border-bottom: 3px solid var(--background-color);
}

/* General card styling for all cards */
.factory-item .card1,
.factory-item .card2,
.factory-item .card3 {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
    transition: all ease-in-out 0.4s;
    text-align: center;
    padding: 20px;
    background-image: linear-gradient(120deg, #7c2be8 0%, #02c2cd 100%);
    width: 100%;
    /* Make the width responsive */
    height: 200px;
    z-index: 1;
}

/* Pseudo-element for images (same for all cards) */
.factory-item .card1::before,
.factory-item .card2::before,
.factory-item .card3::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    z-index: -1;
}

/* Background images */
.factory-item .card1::before {
    background-image: url("../img/factory/factory-1.png");
}

.factory-item .card2::before {
    background-image: url("../img/factory/factory-2.png");
}

.factory-item .card3::before {
    background-image: url("../img/factory/factory-3.png");
}

/* h5 element styling */
.factory-item .card1 h5,
.factory-item .card2 h5,
.factory-item .card3 h5 {
    transition: opacity 0.4s ease-in-out;
    color: white;
}

/* On hover, hide h5 and show image */
.factory-item:hover .card1 h5,
.factory-item:hover .card2 h5,
.factory-item:hover .card3 h5 {
    opacity: 0;
}

.factory-item:hover .card1::before,
.factory-item:hover .card2::before,
.factory-item:hover .card3::before {
    opacity: 1;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {

    .factory-item .card1,
    .factory-item .card2,
    .factory-item .card3 {
        height: 150px;
        /* Reduce height for smaller screens */
    }

    .factory-item .card1 h5,
    .factory-item .card2 h5,
    .factory-item .card3 h5 {
        font-size: 1rem;
        /* Adjust font size for mobile */
    }

    .section-hook img {
        display: none;
    }

    .section-hook p {
        font-size: 1.2rem;
        color: #666;
        text-align: start;
        margin-top: 10px;
    }
}

@media (max-width: 576px) {

    .factory-item .card1,
    .factory-item .card2,
    .factory-item .card3 {
        height: 120px;
        /* Further reduce height for very small screens */
    }

    .factory-item .card1 h5,
    .factory-item .card2 h5,
    .factory-item .card3 h5 {
        font-size: 1.2rem;
        font-weight: bolder;
        /* Adjust font size for very small screens */
    }

    .section-hook img {
        display: none;
    }

    .section-hook p {
        font-size: 1.2rem;
        color: #666;
        text-align: start;
        margin-top: 10px;
    }
}

/* Modal styling */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1050;
    /* Ensure it stays on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: hidden;
    /* Disable scrolling */
    background-color: rgba(0, 0, 0, 0.6);
    /* Black background with opacity */
    justify-content: center;
    /* Center horizontally */
    align-items: center;
    /* Center vertically */
    display: flex;
    /* Flexbox to center */
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 50%;
    /* Adjust width */
    max-width: 600px;
    /* Max width */
    border-radius: 10px;
    /* Rounded corners */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    /* Shadow for depth */
    text-align: center;
    animation: fadeIn 0.3s ease;
    /* Optional fade-in effect */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}


/* Card hover effect to show modal */
.feature-card:hover {
    cursor: pointer;
}

/* Hide descriptions initially */
.feature-description {
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* Show description with max-height animation */
.feature-description.show {
    display: block;
    max-height: 100px;
    /* Adjust height based on content */
}

.section-hook {
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    /* Use auto to allow for flexibility */
    background-color: #f8f9fa;
    padding: 20px 0;
    /* Add padding for better spacing */
}

.section-hook h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    text-align: center;
}

.section-hook p {
    font-size: 1.2rem;
    color: #666;
    text-align: start;
    margin-top: 10px;
    margin-left: 70px;
}

.section-hook img {
    width: 80%;
    height: auto;
    margin-top: 20px;
}

.btn-factory {
    display: inline-block;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    background-image: linear-gradient(120deg, #02c2cd 0%, #7c2be8 100%);
    padding: 10px 20px;
    text-align: center;
    /* Center text in the button */
}

.btn-scada {
    display: inline-block;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    background-image: linear-gradient(120deg, #ff6b35 0%, #f7931e 100%);
    padding: 10px 20px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    position: relative;
    overflow: hidden;
    /* Center text in the button */
}

.btn-scada:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    background-image: linear-gradient(120deg, #ff7a4a 0%, #ffa347 100%);
    color: white;
    text-decoration: none;
}

.btn-scada:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
}

.btn-scada::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-scada:hover::before {
    left: 100%;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.6;
    font-size: 1.1rem;
    color: var(--default-color);
}

.portfolio-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.portfolio-swiper img {
    height: 500px;
    /* fix tinggi agar seragam */
    width: 100%;
    /* penuh dalam slide */
    object-fit: cover;
    /* potong tengah agar tidak melebar */
    border-radius: 10px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .section-hook {
        flex-direction: column;
        /* Stack the items vertically */
        text-align: center;
    }

    .section-hook p {
        margin-left: 0;
        /* Remove left margin on mobile */
        font-size: 1rem;
        /* Adjust text size for smaller screens */
        margin: 20px auto;
        /* Center the paragraph on mobile */
    }

    .section-hook img {
        width: 60%;
        /* Reduce image size on mobile */
        margin: 20px auto;
    }

    .btn-factory {
        width: 100%;
        /* Full-width button on mobile */
    }

    .btn-scada {
        width: 100%;
        /* Full-width button on mobile */
    }
}

/* Additional SCADA button highlighting for better visibility */
.navmenu .btn-scada {
    background-image: linear-gradient(120deg, #ff6b35 0%, #f7931e 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3) !important;
    border: 2px solid rgba(255, 107, 53, 0.2) !important;
}

.navmenu .btn-scada:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4) !important;
    background-image: linear-gradient(120deg, #ff7a4a 0%, #ffa347 100%) !important;
    border-color: rgba(255, 107, 53, 0.4) !important;
}

/* Ensure SCADA button is always visible and highlighted */
.btn-scada:focus,
.btn-scada:focus-visible {
    outline: 2px solid #ff6b35 !important;
    outline-offset: 2px !important;
}

/* Add a subtle pulsing animation to make SCADA button more noticeable */
@keyframes scada-pulse {
    0% {
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(255, 107, 53, 0.5);
    }
    100% {
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    }
}

.btn-scada {
    animation: scada-pulse 2s ease-in-out infinite;
}

.btn-scada:hover {
    animation: none;
}

/* Fallback styles to ensure SCADA button is always visible */
.btn-scada {
    /* Ensure the button has a minimum contrast and visibility */
    min-width: 120px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Additional mobile-specific highlighting */
@media (max-width: 768px) {
    .btn-scada {
        font-size: 14px;
        padding: 12px 16px;
        margin: 5px 0;
        border: 2px solid #ff6b35;
    }
}

    .portfolio-swiper img {
        height: auto;
        width: 100%;
        object-fit: contain;
        /* gambar utuh, bisa ada ruang kosong */
        background: #f0f0f0;
        /* warna background bila gambar tidak penuh */
        border-radius: 10px;
        padding: 10px;
    }
}