/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Inter, sans-serif;
    line-height: 1.6;
    color: black;
    overflow-x: hidden;
}

/* Container for content sections */
.advantages-main-content,
.major-clients-main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 0 20px; 
}

/* ===== OUR PRODUCTS SECTION ===== */
.products-section-title {
    font-size: 2rem;
    color: black;
    text-align: center;
    padding-top: 50px; 
    margin-bottom: 10px;
    position: relative;
}

/* Products section background */
.products-main-content {
    background-color: #f1f4f5;
    padding: 0 0 60px 0; 
    width: 100%;
}

.products-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.products-carousel-container {
    position: relative;
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
}

.products-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 100%;
    display: flex;
    justify-content: flex-start; 
    flex-wrap: wrap; 
    padding: 10px;
    gap: 30px; 
}

.products-item {
    flex: 1;
    max-width: 270px;
    min-width: 200px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    text-decoration: none;  
    color: inherit;  
    cursor: pointer;  
}

.products-item:hover {
    transform: translateY(-5px);
}

.products-item * {
    pointer-events: none; 
}

.products-description {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.products-description p {
    font-size: 1.2rem;
    color: black;
    margin: 0;
}

.products-image-container {
    height: 200px; 
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.products-image-container img {
    width: auto;
    height: auto;
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain; 
    object-position: center;
    border-radius: 3px;
    background-color: white;
}

/* Carousel dots styling */
.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 40px; 
    gap: 10px;
    min-height: 32px; 
    padding: 10px 0;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background-color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
    padding: 0;
}

.carousel-dot.active {
    background-color: #0c8cc4;
    transform: scale(1.1);
}

/* ===== ADVANTAGES SECTION ===== */
/* Full width red background */
.advantages-main-content {
    background-color: #0c8cc4;
    width: 100vw;
    max-width: 100%;
    padding: 60px 0 0 0; 
}

/* Content container with max-width of 1200px */
.advantages-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.advantages-section-title {
    font-size: 2rem;
    color: white;
    text-align: left;
    margin-bottom: 20px;
    position: relative;
}

.advantages-fade-animation {
    display: flex;
    align-items: stretch;
    position: relative;
    min-height: 300px;
    margin-bottom: 0;
}

/* Left content (title, information, button) */
.advantages-left-content {
    flex: 0 0 65%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.advantages {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 0;
}

.advantages-description p {
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.8;
    color: white;
    font-weight: 300;
}

.about-us-button {
    display: inline-block;
    color: white;
    background-color: transparent;
    padding: 6px 25px;
    text-decoration: none;
    border-radius: 30px;
    border: 1px solid white;
    font-weight: 300;
    margin-top: 30px;
    margin-bottom: 80px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    align-self: flex-start;
}

.about-us-button:hover {
    background-color: white;
    color: #0c8cc4;
    border-color: white;
}

.vertical-separator {
    width: 1px;
    background-color: white;
    margin: -90px 40px 50px 40px; 
    align-self: stretch;
}

/* Right content (Petronas logo) */
.petronas-logo {
    flex: 0 0 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin-top: -40px;
}

.petronas-logo img {
    width: auto;
    height: auto;
    margin-bottom: 40px;
}

.petronas-description {
    text-align: center;
    color: white;
}

.petronas-description p {
    font-size: 0.9rem;
    font-weight: 300;
    margin-bottom: 10px;
    color: white;
}

/* ===== MAJOR CLIENTS SECTION ===== */
.major-clients-section-title {
    font-size: 2rem;
    color: black;
    text-align: center;
    position: relative;
    margin-top: 20px; 
    margin-bottom: 20px; 
}

.major-clients-fade-animation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.major-clients-item {
    flex: 0 0 calc(16.666% - 30px);
    min-width: 150px;
    margin-bottom: 20px;
}

.major-clients-image-container {
    background: white;
    padding: 20px;
    height: auto;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.major-clients-image-container:hover {
    transform: translateY(-5px);
}

.major-clients-image-container img {
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: none;
}

/* Hero Banner */
.hero-banner {
    margin-bottom: 0;
}

.hero-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet Devices (768px - 1024px) */
@media (max-width: 1024px) {
    .products-section-title,
    .advantages-section-title,
    .major-clients-section-title {
        font-size: 2rem;
    }
    
    .products-item {
        flex: 0 0 calc(50% - 30px);
        margin: 0 15px 30px;
    }
    
    .carousel-slide {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .advantages-fade-animation {
        flex-direction: column;
    }
    
    .vertical-separator {
        display: none;
    }
    
    .advantages-left-content {
        flex: 0 0 100%;
        margin-bottom: 40px;
        text-align: center;
    }
    
    .petronas-logo {
        flex: 0 0 100%;
    }
    
    .major-clients-item {
        flex: 0 0 calc(25% - 30px);
        min-width: 160px;
    }
    
    .major-clients-image-container {
        height: auto;
        min-height: auto;
        padding: 25px;
    }
    
    .major-clients-image-container img {
        max-width: 100%; 
        max-height: 100%; 
        object-fit: contain; 
    }
    
    .hero-banner img {
        height: 400px;
        object-fit: cover;
    }
}

/* Mobile Devices (up to 767px) */
@media (max-width: 767px) {
    .products-main-content,
    .advantages-content-wrapper,
    .major-clients-main-content {
        padding: 60px 15px;
    }
    
    .products-section-title,
    .advantages-section-title,
    .major-clients-section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
        margin-top: 20px;
    }
    
    .products-item {
        flex: 0 0 calc(100% - 30px); 
        margin: 0 15px 10px; 
        min-height: 250px;
        cursor: pointer;
    }
    
    .carousel-slide {
        gap: 10px; 
    }
    
    .carousel-dots {
        margin-top: 15px;  
        margin-bottom: 20px;  
        gap: 8px;  
        min-height: 28px;  
    }
    
    .advantages-content-wrapper {
        padding: 30px 15px; 
    }

    .advantages-section-title {
        text-align: center; 
        margin-top: -40px;
        margin-bottom: 40px;
    }
    
    .advantages-description p {
        font-size: 0.8rem;
    }
    
    .advantages-fade-animation {
        align-items: center; 
        text-align: center; 
        gap: 30px;
    }
  
    .advantages-left-content {
        width: 100%; 
        text-align: center; 
        margin-bottom: 0;
    }
      
    .about-us-button {
        align-self: center; 
        margin: 0 auto 0;
    }
      
    /* Change the vertical line to a horizontal line */
    .vertical-separator {
      display: block; /* Redisplay */
      width: 100%; /* Change to horizontal line width */
      height: 1px; /* Change to horizontal line height */
      margin: 0 auto 0; /* Modify this line - reset it to 0, let gap control the spacing */
      background-color: white;
    }
      
    .petronas-logo {
      margin-top: 0; 
      width: 100%;
      margin-bottom: 40px; 
    }
      
    .petronas-logo img {
      margin-bottom: 15px; 
    }
    
    .petronas-description p {
        font-size: 0.8rem;
    }
    
    .major-clients-fade-animation {
        display: grid;
        grid-template-columns: repeat(2, 1fr); 
        gap: 12px; 
    }
    
    .major-clients-item {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .major-clients-image-container {
        width: 100%;
        height: 150px; 
        padding: 10px; 
        display: flex;
        align-items: center;
        justify-content: center;
        background: white;
        margin: 0 auto;
    }
    
    .major-clients-image-container img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        width: auto; 
        height: auto;
        display: block;
        margin: 0 auto; 
    }
    
    .hero-banner img {
        height: 300px;
    }
}

/* Small Mobile Devices (up to 480px) */
@media (max-width: 480px) {
    .products-section-title,
    .advantages-section-title,
    .major-clients-section-title {
        font-size: 1.5rem;
    }
    
    .major-clients-item {
        width: 100%;
        margin: 0;
        flex: none;
    }
    
    .major-clients-fade-animation {
        gap: 10px; 
        padding: 0 5px; 
    }
    
    .major-clients-image-container {
        height: 140px; 
        padding: 8px; 
    }
    
    .major-clients-image-container img {
        max-width: 95%; 
        max-height: 95%;
    }
    
    .hero-banner img {
        height: 250px;
    }
    
    .products-description p {
        font-size: 1rem;
    }
    
    .products-item {
        flex: 0 0 calc(100% - 20px);
    }
}

@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    /* Special adjustments for landscape-oriented phones */

    .advantages-content-wrapper {
        padding: 20px 15px;
    }
    
    .advantages-fade-animation {
        min-height: auto;
        gap: 20px;
    }
    
    .advantages-description p {
        font-size: 0.75rem;
        line-height: 1.6;
        margin-bottom: 15px;
    }
    
    .about-us-button {
        padding: 8px 20px;
        font-size: 0.9rem;
        margin-top: 15px;
    }
    
    .vertical-separator {
        margin: 10px auto;
    }
    
    .petronas-logo img {
        max-width: 120px;
        margin-bottom: 10px;
    }
    
    .petronas-description p {
        font-size: 0.75rem;
    }
    
    .products-section-title {
        padding-top: 30px;
        margin-bottom: 20px;
    }
    
    .products-item {
        min-height: 200px;
    }
    
    .products-image-container {
        height: 120px;
        padding: 10px;
        justify-content: center; 
    }
    
    .products-image-container img {
        display: block;
        margin: 0 auto; 
    }
    
    .products-description {
        padding: 15px;
    }
    
    .major-clients-item {
        flex: 0 0 calc(20% - 15px); 
        min-width: 100px;
    }
    
    .major-clients-image-container {
        height: auto;
        min-height: auto;
        padding: 15px;
    }
    
    .major-clients-image-container img {
        max-width: 100%; 
        max-height: none; 
        object-fit: contain; 
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .products-carousel-track {
        transition: none;
    }
}

/* ===== FIX FOR FOOTER AT BOTTOM ===== */

body.index-page {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
}

.main-content-wrapper {
  flex: 1 0 auto !important;
  width: 100%;
}

.hero-banner {
  margin-bottom: 0;
}

.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.products-main-content {
  background-color: #f1f4f5;
  padding: 0 0 60px 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.advantages-main-content {
  background-color: #0c8cc4;
  width: 100%;
  max-width: 100%;
  padding: 60px 0 0 0;
}

.major-clients-main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  width: 100%;
}

.products-carousel-container,
.advantages-fade-animation,
.major-clients-fade-animation {
  min-height: 20vh;
}

@media (max-width: 1024px) {
  .products-main-content,
  .advantages-main-content,
  .major-clients-main-content {
    min-height: 30vh;
  }
}

@media (max-width: 767px) {
  .products-main-content,
  .advantages-main-content,
  .major-clients-main-content {
    min-height: 40vh;
  }
  
  .hero-banner img {
    height: 300px;
  }
}

body.index-page .main-content-wrapper {
  min-height: 70vh;
}

@media (max-width: 360px) {
    .major-clients-fade-animation {
        gap: 6px;
        padding: 0 3px;
    }
    
    .major-clients-image-container {
        height: 120px;
        padding: 6px;
    }
    
    .major-clients-image-container img {
        max-width: 90%;
        max-height: 90%;
    }
}