/* Custom styles for AGC project */

/* Language Switcher Styles */
.language-switcher {
    position: relative;
}

.lang-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lang-item {
    position: relative;
}

.lang-item.current-lang {
    display: flex;
    align-items: center;
}

.lang-toggle {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    padding: 5px 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.lang-toggle:hover {
    color: #2667FF;
}

.lang-toggle span {
    margin-right: 5px;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #1a1a1a;
    border-radius: 4px;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 5px 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    list-style: none;
    margin: 0;
}

.current-lang:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown .lang-item {
    display: block;
    width: 100%;
}

.lang-dropdown .lang-item a {
    display: block;
    padding: 8px 15px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.lang-dropdown .lang-item a:hover {
    background-color: #2a2a2a;
    color: #2667FF;
}

.lang-dropdown .lang-item.active a {
    color: #2667FF;
    font-weight: 600;
}

/* ============================================
   MOBILE ONLY IMPROVEMENTS
   These styles only affect mobile devices (max-width: 991px)
   Desktop views are NOT affected
   ============================================ */

/* Mobile Accordion/Slider Improvements - Fill more screen space */
@media (max-width: 991px) {

    /* Make accordion items taller on mobile */
    .accordion-portfolio-lists li {
        height: 120px !important;
        margin-top: 10px !important;
        width: 100% !important;
        /* Ensure full width on mobile */
        flex: none !important;
        /* Disable flex scaling on mobile */
    }

    /* Active/expanded accordion item - fills more of the screen */
    .accordion-portfolio-lists li.out {
        min-height: 60vh !important;
        padding-top: 220px !important;
    }

    /* Reduce padding on accordion container */
    .accordion-portfolio-lists {
        padding: 15px 10px !important;
        flex-direction: column !important;
        /* Force vertical stack */
        height: auto !important;
    }

    /* Improve accordion overlay text on mobile */
    .accrdion-portfolio-area .out .accordion-overlay h2 {
        font-size: 20px !important;
        margin-bottom: 25px;
        /* Add spacing below title */
    }

    .accrdion-portfolio-area .out .accordion-overlay p {
        font-size: 16px !important;
        /* Increase font size */
        line-height: 1.6 !important;
        margin-bottom: 25px;
        /* Add spacing below text */
    }

    /* Ensure button is visible and clickable */
    .accrdion-portfolio-area .out .accordion-overlay .button {
        display: inline-block !important;
        margin-top: 15px !important;
        position: relative;
        z-index: 10;
        pointer-events: auto !important;
    }
}

/* Extra small devices - phone portrait */
@media (max-width: 576px) {
    .accordion-portfolio-lists li.out {
        min-height: 50vh !important;
        padding-top: 180px !important;
    }
}

/* ============================================
   PRODUCT IMAGE SQUARE FORMAT (All Devices)
   ============================================ */

/* Ensure product images are always square */
.product-image,
.card-img-top,
.product-card img,
.product-thumb img {
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    width: 100% !important;
}

/* Product grid on mobile */
@media (max-width: 767px) {

    .product-card,
    .custom-product-card {
        margin-bottom: 20px;
    }

    /* Product image container */
    .product-image-wrapper,
    .product-thumb {
        width: 100%;
        overflow: hidden;
    }
}

/* ============================================
   CATEGORY CARDS MOBILE SPACING
   ============================================ */

@media (max-width: 991px) {

    /* Reduce gap between category cards on mobile */
    .categories-grid .col-md-3,
    .categories-grid .col-sm-6 {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Category card styling on mobile */
    .category-card,
    .categories-grid .card {
        margin-bottom: 15px;
    }
}

/* ============================================
   HEADER LOGIN BUTTON STYLING
   ============================================ */

.btn-outline-light.btn-sm {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s ease;
    color: #ffffff !important;
    /* Force visible white color */
    border-color: transparent !important;
    /* Hide border but keep space */
}

.btn-outline-light.btn-sm:hover {
    background-color: transparent !important;
    border-color: transparent !important;
    color: var(--color-primary) !important;
}

/* Force hide side-menu on desktop to prevent hamburger text */
@media (min-width: 992px) {
    .side-menu {
        display: none !important;
    }
}


/* ============================================
   DYNAMIC ACCORDION STYLES
   Handle 3-7+ items with flexbox
   ============================================ */

@media (min-width: 992px) {
    .accordion-portfolio-lists {
        display: flex !important;
        width: 100% !important;
        justify-content: stretch;
    }

    .accordion-portfolio-lists li {
        width: auto !important;
        flex: 1;
        /* All items take equal small space */
        transition: flex 0.4s ease, width 0.4s ease;
        /* Smooth transition */
    }

    .accordion-portfolio-lists li.out {
        width: auto !important;
        flex: 3;
        /* Expanded item takes 3x space (approx 50% for 4 items, less for more) */
    }
}

/* Cyclic Background Colors for Dynamic Items */
.accordion-portfolio-lists li:nth-child(4n+1)::after {
    background: var(--bg-gradient) !important;
}

.accordion-portfolio-lists li:nth-child(4n+2)::after {
    background: #fba065 !important;
}

.accordion-portfolio-lists li:nth-child(4n+3)::after {
    background: #bccd7e !important;
}

.accordion-portfolio-lists li:nth-child(4n+4)::after {
    background: #6a850b !important;
}