.home-container .home-header {
    height: 100dvh;
    overflow: hidden;
}

.slider-stage {
    width: 100%;
    height: 100%;
    position: relative;
}
  
.slider-slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: none;
}
  
.slider-slide video.slider-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
}

.slider-slide img.slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-image-static {
    background-color: black;
    /* background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%); */
}

.default-video-static {
    background-color: black;
    /* background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%) !important; */
}
  
.slider-overlay {
    position: absolute;
    bottom: 16vh;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0,0,0,0.7);
}
  
.glass-box {
    background-color: rgba(255, 255, 255, 0.01);
    box-shadow: 0 4px 30px 0 rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.01);
    border-radius: 24px;
    backdrop-filter: blur(8px);
    padding: 28px 39px 22px;
    height: auto;
    min-height: 120px;
    max-height: 200px;
    overflow: hidden;
    width: 50%;
    max-width: 50%;
}

.glass-box-full {
    width: 100% !important;
    max-width: 100% !important;
}

.slider-overlay .glass-box-full .title {
    font-size: 20px;
    max-width: 100%;
}

.slider-overlay .glass-box-full .desc {
    font-size: 16px;
    max-width: 100%;
}
  
.slider-overlay .title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 12px;
    max-width: 50%;
}
  
.slider-overlay .desc {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 5px;
    max-width: 50%;
}

.slider-overlay .see-more-btn {
    font-size: 16px;
    color: #fff;
    transition: all 0.3s ease;
}

/* Slide down animation for text elements */
@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-text-animate {
    opacity: 0;
    animation: slideDown 0.6s ease-out forwards;
}

.slide-text-animate:nth-child(1) {
    animation-delay: 0.2s;
}

.slide-text-animate:nth-child(2) {
    animation-delay: 0.4s;
}

.slide-text-animate:nth-child(3) {
    animation-delay: 0.6s;
}
  
.slider-overlay .sub-desc {
    font-size: 16px;
    color: rgba(255, 255, 255, .9);
}
  
.slider-controls {
    position: absolute;
    top: 120px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 70%;
    overflow-y: auto;
}
  
.slider-plant-item {
    background-color: transparent;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    opacity: 0.5;
    transition: 0.3s;
}
  
.slider-plant-item:hover, .slider-plant-item.active {
    border-radius: 50rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    opacity: 1;
}
  
.slider-controls::-webkit-scrollbar {
    display: none;
}

.home-container .section-1 {
    padding: 0 82px;
}

.home-container .location-dropdown {
    max-width: 475px;
}

.home-container .location-toggle {
    border: 1px solid rgba(65, 80, 101, 0.2);
    border-radius: 50rem;
    height: 48px;
}

.home-container .location-toggle .selected-location {
    font-size: 16px;
}

.home-container .location-toggle-icon {
    color: rgba(65, 80, 101, 0.2);
}

.home-container .location-menu {
    min-width: 100%;
    border-radius: 14px;
    border-top-right-radius: 0 !important;
    border-top-left-radius: 0 !important;
    border: 1px solid rgba(65, 80, 101, 1);
    max-height: 364px;
    overflow-y: auto;
}

.home-container:has(.location-menu.show) .location-toggle {
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border: 1px solid rgba(65, 80, 101, 1);
}

.home-container .section-paragraph {
    color: rgba(65, 80, 101, 1);
    font-size: 14px;
}

.home-container .section-paragraph ul {
    line-height: 200%;
}

.home-container .section-text .products-title {
    font-size: 16px;
}

.factory-about {
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.products-tabs {
    border-bottom: 1px solid rgba(73, 103, 104, 0.1);
}

.products-tabs .product-item {
    padding-bottom: 6px;
    font-size: 12px;
    align-content: center;
}

.products-tabs-nav {
    display: none;
}

.products-tabs .product-item.active {
    border-bottom: 3px solid rgba(0, 122, 255, 1);
    font-size: 14px;
    font-weight: bold;
}

.products-list-container {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 100%;
    width: fit-content;
}

.products-list-wrapper {
    overflow: hidden;
    /* max-width: 400px; */
}

.products-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    transition: transform 0.3s ease;
    width: fit-content;
}

.product-item-box {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid #d3ddf0;
    border-radius: 50rem;
    background: white;
    font-size: 13px;
    font-weight: 700;
    color: black;
    white-space: nowrap;
}

.products-nav-btn {
    flex: 0 0 auto;
    width: 28px;
    height: 40px;
    border: 1px solid rgba(65, 80, 101, 0.3);
    border-radius: 8px;
    background: white;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.products-nav-btn:hover {
    border-color: rgba(65, 80, 101, 0.6);
    background: rgba(65, 80, 101, 0.05);
}

.products-nav-btn i {
    font-size: 16px;
    color: rgba(65, 80, 101, 0.7);
}

.analysis-section {
    max-width: 80%;
}

.more-analysis, .read-more {
    color: rgba(0, 122, 255, 1);
    font-size: 12px;
}

.read-more {
    max-width: fit-content;
}

.analysis-section .analysis-grid {
    /* display: flex; */
    display: grid;
    align-items: center;
    grid-template-columns: repeat(4, minmax(0, 280px));
    row-gap: 24px;
    column-gap: 16px;
    flex-wrap: wrap;
}

.analysis-section .report-box {
    background-color: rgba(227, 234, 244, 0.2);
    box-shadow: 0 4px 30px 0 rgba(0, 0, 0, 0.12);
    border-radius: 14px;
    height: 438px;
    /* max-width: 348px; */
    /* max-width: 304px; */
    /* min-width: 280px; */
    flex: 1;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    justify-content: space-between;
}

.analysis-section .report-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 40px 0 rgba(0, 0, 0, 0.2);
}

.analysis-section .report-box img {
    border-radius: 16px;
    object-fit: cover;
}

.analysis-section .report-box .report-image {
    height: 200px;
    min-height: 200px;
    max-height: 200px;
}

.analysis-section .report-box .report-title {
    font-size: 20px;
    color: rgba(1, 60, 93, 1);
}

.analysis-section .report-box .report-date {
    font-size: 14px;
}

.analysis-section .report-box .report-date, .analysis-section .report-box .report-text {
    color: #64748b;
}

.analysis-section .report-box .report-text {
    line-height: 1.6;
    font-size: 14.4px;
    display: -webkit-box;
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 5em;
}

.home-content .section-image {
    min-width: 50%;
    min-height: 300px;
    overflow: hidden;
}

.home-bandar {
    min-width: 100%;
}

.home-bandar, .bandar-location {
    transition: opacity 0.4s ease;
    object-fit: contain;
    /* GPU acceleration */
    transform: translateZ(0);
    will-change: opacity, transform;
}

/* Iran map box and marker label */
.map-image {
    width: 135px;
    height: 125px;
}
.location-box {
    max-width: fit-content;
}
.bandar-location-box {
    position: absolute;
}
.bandar-location {
    display: block;
}
.bandar-location-label {
    position: absolute;
    right: 100%;
    bottom: -6px;
    margin-right: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 10px;
    line-height: 1.4;
    white-space: nowrap;
    z-index: 2;
}

.crossfade-temp {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    object-fit: contain;
    /* GPU acceleration */
    transform: translateZ(0);
    will-change: opacity, transform;
}

.fade-in {
    opacity: 1 !important;
    transition: opacity 0.4s ease;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Optimize video performance */
.slider-video {
    /* GPU acceleration */
    transform: translateZ(0);
    will-change: transform;
    /* Optimize video rendering */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* Smooth video playback */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* Smooth transitions */
    transition: opacity 0.5s ease;
}

/* Video loading overlay */
.video-loading-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #ffffff;
    border-right: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth slide transitions */
.slider-slide {
    transition: opacity 0.3s ease;
}

.slider-slide:not([style*="display: block"]) {
    opacity: 0;
}

.slider-slide[style*="display: block"] {
    opacity: 1;
}

.first-section-paragraph {
    display: flex;
}

.second-section-paragraph {
    display: none;
    max-width: 70%;
    margin: 0 auto;
}

.slider-dropdown {
    display: none;
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    width: 100%;
}

.mobile-toggle-btn {
    width: 65%;
    border-radius: 50rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    opacity: 1;
    padding: 12px 24px;
    cursor: pointer;
}

.mobile-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

@media (min-width: 1474px) {
    .analysis-section .analysis-grid {
        grid-template-columns: repeat(4, minmax(280px, 1fr));
    }
}

@media (max-width: 1314.98px) {
    .home-content .section-image {
        min-width: 50%;
        max-width: 50%;
    }
    .first-section-paragraph {
        display: none;
    }
    .second-section-paragraph {
        display: flex;
    }
    .home-container .section-1 {
        padding-bottom: 0 !important;
    }
    .products-list-wrapper {
        max-width: 100%;
    }
    .analysis-section .report-box .report-title {
        font-size: 17px;
    }
}

@media (max-width: 1199.98px) {
    .analysis-section {
        max-width: 85%;
    }
    .analysis-section .analysis-grid {
        column-gap: 10px;
    }
}

@media (min-width: 1080px) and (max-width: 1459.98px) {
    .bandar-location {
        max-height: 100px;
    } 
}

@media (max-width: 1079.98px) {
    .second-section-paragraph {
        max-width: 85%;
    }
    .home-content .section-1 {
        flex-direction: column;
        padding: 0 48px;
    }
    .home-content .section-image {
        max-width: 100%;
    }
    .home-bandar {
        max-height: 420px;
    }
    .glass-box {
        padding: 22px 30px;
    }
    .slider-plant-item {
        font-size: 14px;
    }
    .slider-controls {
        max-height: 50%;
    }
    .analysis-section .report-box .report-title {
        font-size: 15px;
    }
}

@media (max-width: 991.98px) {
    .home-bandar {
        max-height: 320px;
    }
    .bandar-location {
        max-height: 86px;
    }
    .analysis-section .analysis-grid {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
    }
    .slider-overlay {
        bottom: 10vh;
    }
}

@media (max-width: 767.98px) {
    .home-content .section-1 {
        padding: 0 20px;
    }
    .second-section-paragraph {
        max-width: 100%;
    }
    .products-nav-btn {
        display: none !important;
    }
    .products-list {
        flex-wrap: wrap;
    }
    .home-container .home-header {
        max-height: 420px;
    }
    .slider-dropdown {
        display: block;
    }
    .desktop-controls {
        display: none;
    }
    .slider-overlay {
        bottom: 24px;
        max-width: 90%;
        width: 90%;
        left: 50%;
        transform: translateX(-50%);
    }
    .slider-overlay .desc, .slider-overlay .title  {
        max-width: 100%;
    }
    .glass-box {
        padding: 20px;
        height: auto;
        min-height: 100px;
        max-height: 180px;
        overflow: hidden;
    }
    .slider-overlay .title, .slider-overlay .desc, .slider-overlay .sub-desc, .slider-overlay .glass-box-full .desc, .slider-overlay .glass-box-full .title {
        font-size: 14px;
    }
    .slider-overlay .title {
        line-height: 200%;
    }
    .slider-overlay .see-more-btn {
        padding: 8px 18px;
        font-size: 14px;
        margin-top: 8px;
    }
    .home-header {
        overflow: visible !important;
    }
    .slider-menu {
        max-height: 320px;
        max-width: 88%;
        width: 88%;        
        overflow-y: auto;
    }
    .analysis-section {
        max-width: 90%;
    }
    .analysis-section .report-box {
        max-width: 100%;
        min-width: 100%;    
        height: 412px;
    }
    .analysis-section .report-image img {
        width: 100%;
        object-fit: cover;
    }
    .home-container .location-toggle .selected-location {
        font-size: 14px;
    }
}

@media (max-width: 611.98px) {
    .analysis-section .analysis-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (max-width: 575.98px) {
    .home-content .section-image {
        min-height: fit-content;
    }
    .second-section-paragraph {
        position: relative;
    }
    .second-section-paragraph > .products-tabs-box {
        min-height: 50px;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        border-bottom: 1px solid rgba(73, 103, 104, 0.1);
    }
    .products-tabs {
        position: relative;
        min-height: 40px;
        justify-content: center;
        z-index: 1;
    }
    .products-tabs .product-item {
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    .products-tabs .product-item.active {
        display: block;
        opacity: 1;
        font-size: 13px;
        font-weight: bold;
        border-bottom: 3px solid rgba(0, 122, 255, 1);
    }
    .products-tabs-nav {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        transform: translateY(-50%);
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0 4px;
        pointer-events: none;
        z-index: 20;
    }
    .products-tabs-nav-btn {
        width: 32px;
        height: 32px;
        border: 1px solid rgba(65, 80, 101, 0.3);
        border-radius: 50%;
        background: white;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        pointer-events: auto;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
    }
    .products-tabs-nav-btn:hover {
        border-color: rgba(0, 122, 255, 1);
        background: rgba(0, 122, 255, 0.05);
    }
    .products-tabs-nav-btn i {
        font-size: 18px;
        color: rgba(65, 80, 101, 0.7);
    }
    .products-tabs-nav-btn:hover i {
        color: rgba(0, 122, 255, 1);
    }
    .products-tabs-nav-btn:active {
        transform: scale(0.95);
    }
}

@media (max-width: 499.98px) {
    .bandar-location {
        max-height: 55px;
    } 
}

@media (max-width: 399.98px) {
    .home-container .location-toggle .selected-location {
        font-size: 13px;
    }
    .home-container .location-toggle .location-icon {
        display: none;
    }
}

