/* ============================================
   RESPONSIVE DESIGN - LEBANG TRADING
   ============================================ */

/* Large Devices (Tablets, 768px and up) */
@media (max-width: 1199px) {
  .container {
    max-width: 100%;
    padding: 0 20px;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content .tagline {
    font-size: 1.3rem;
  }

  .about-details {
    gap: 30px;
  }

  .about-image {
    width: 500px;
  }

  .stats-grid {
    gap: 20px;
  }

  #testimonials {
    grid-template-columns: 1fr 2fr;
    gap: 30px;
  }

  #testimonials .side-img {
    height: 400px;
  }
}

/* Medium Devices (Tablets, 768px and up) */
@media (max-width: 991px) {
  .page-header{
    height: 50vh;
  }
  .page-content {
    padding-top: 80px;
  }

  

  /* Navigation */
  .header-container {
    width: 100%;
    padding: 10px 20px;
  }

  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100vw;
    background-color: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow);
  }
  nav ul.show {
    display: flex;
  }
  .mobile-menu-btn {
    display: block;
  }

  nav ul li {
    margin: 10px 0;
  }

  nav ul li a {
    display: block;
    padding: 10px 0;
    font-size: 16px;
  }

  /* Hero Section */
  .hero {
    height: 80vh;
    min-height: 600px;
  }

  .carousel-controls {
    right: 20px;
  }

  .hero-content {
    padding: 0 20px;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content .tagline {
    font-size: 1.1rem;
  }

  .hero-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-buttons {
    flex-wrap: wrap;
    gap: 15px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 1rem;
  }

  /* About Section */
  .about-details {
    flex-direction: column-reverse;
    gap: 30px;
  }

  .about-image {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Services */
  .services-preview {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card {
    height: auto !important;
    min-height: 200px;
  }

  .testimonial-item {
    padding: 30px 20px;
  }

  /* Partners */
  .partners {
    gap: 15px;
  }

  .partner-logo {
    height: 200px;
    width: 250px;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .footer-logo {
    grid-column: 1 / -1;
    text-align: center;
  }

  .call {
    justify-content: center;
  }
}

/* Small Devices (Phones, 576px and up) */
@media (max-width: 767px) {
  /* Hero Section */
  .hero {
    height: 70vh;
    min-height: 500px;
  }

  .hero-content h1 {
    font-size: 1.6rem;
  }

  .hero-content .tagline {
    font-size: 1rem;
  }

  .hero-content p {
    font-size: 0.9rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-outline {
    margin-left: 0;
    margin-top: 10px;
  }

  .carousel-controls {
    right: 15px;
  }

  .carousel-indicator {
    width: 12px;
    height: 12px;
  }

  /* Section Titles */
  .section-title h2 {
    font-size: 28px;
  }

  .about-title h2 {
    font-size: 28px;
  }

  /* Services */
  .services-preview {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .service-card {
    max-width: 400px;
    margin: 0 auto;
  }

  .img-icon {
    width: 70px;
    height: 70px;
    top: 180px;
    right: 20px;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .background-container {
    min-height: auto;
    padding-bottom: 40px;
  }

  #stats-content {
    padding: 30px 20px 60px;
  }

  .stat-card {
    margin-top: 30px;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  /* Testimonials */
  .testimonial-slider {
    max-width: 100%;
  }

  .testimonial-text {
    font-size: 16px;
  }

  /* Partners */
  .partners {
    gap: 10px;
  }

  .partner-logo {
    height: 180px;
    width: 230px;
  }

  /* CTA */
  .cta {
    padding: 60px 20px;
  }

  .cta h2 {
    font-size: 28px;
  }

  .copyright p {
    font-size: 0.9rem;
    text-align: center;
  }
}

/* Extra Small Devices (Phones, less than 576px) */
@media (max-width: 575px) {
  header .header-container {
    padding: 0 20px;
  }
  .header-container .logo img {
    width: 100px;
    height: auto;
  }

  /* Hero Section */
  .hero {
    height: 60vh;
    min-height: 450px;
  }

  .hero-content h1 {
    font-size: 1.4rem;
  }

  .hero-content .tagline {
    font-size: 0.9rem;
  }

  .hero-content p {
    font-size: 0.85rem;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  /* General Spacing */
  .section {
    margin-bottom: 60px;
  }

  /* About Section */
  .about-title h2 {
    font-size: 24px;
  }

  .about-text h3 {
    font-size: 24px;
  }

  /* Service Cards */
  .service-content {
    padding: 20px;
    padding-top: 35px;
  }

  .service-content h3 {
    font-size: 1.2rem;
  }

  .service-card .img-icon {
    position: absolute;
    top: 200px;
    right: 25px;
    transform: translateY(-50%);
  }

  /* Stats */
  .stat-number {
    font-size: 2.2rem;
  }

  .stat-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  /* Testimonials */
  /* Testimonials */
  #testimonials {
    grid-template-columns: 1fr;
  }
  .testimonials .sub-container {
    display: none;
  }

  /* Partners */
  .partners {
    justify-content: center;
  }

  .partner-logo {
    height: 150px;
    width: 200px;
  }

  /* CTA */
  .cta h2 {
    font-size: 24px;
  }

  .cta p {
    font-size: 16px;
  }
}

/* Ultra Small Devices (Very small phones) */
@media (max-width: 375px) {
  .hero-content h1 {
    font-size: 1.2rem;
  }

  .hero-content p {
    font-size: 0.8rem;
  }

  .corecombs-cell {
    flex: 0 1 80px;
    max-width: 80px;
    height: 60px;
  }

  .corecombs-cell_title {
    font-size: 0.7em;
  }

  .service-card {
    border-radius: 0 20px;
  }

  .img-icon {
    width: 60px;
    height: 60px;
    right: 15px;
  }
}

/* Tablet Landscape Optimization */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .hero {
    height: 100vh;
  }

  .about-content {
    grid-template-columns: 1fr 1fr;
  }

  .services-preview {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* High-Resolution Displays */
@media (min-width: 1400px) {
  .container {
    max-width: 1300px;
  }

  .hero-content h1 {
    font-size: 3rem;
  }

  .hero-content .tagline {
    font-size: 1.8rem;
  }
}

/* Print Styles */
@media print {
  .hero,
  .carousel-controls,
  .btn,
  .mobile-menu-btn,
  footer {
    display: none !important;
  }

  .page-content {
    padding-top: 0;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
  }

  .container {
    max-width: 100%;
  }

  .section {
    page-break-inside: avoid;
    margin-bottom: 40pt;
  }
}

/* Core Value Combs */

@media (min-width: 1100px) {
  .servicecomb-cell:nth-child(7n + 5) {
    margin-left: calc(50% - 400px);
  }

  .servicecomb-cell:nth-child(7n + 7),
  .servicecomb-cell:nth-child(7n + 5):nth-last-child(2) {
    margin-right: calc(50% - 400px);
  }

  .servicecomb_placeholder:nth-child(7n + 7),
  .servicecomb_placeholder:nth-child(7n + 9),
  .servicecomb_placeholder:nth-child(7n + 11) {
    display: block;
  }
}

@media (min-width: 825px) and (max-width: 1100px) {
  .servicecomb-cell:nth-child(5n + 4) {
    margin-left: calc(50% - 275px);
  }

  .servicecomb-cell:nth-child(5n + 5) {
    margin-right: calc(50% - 275px);
  }

  .servicecomb_placeholder:nth-child(5n),
  .servicecomb_placeholder:nth-child(5n + 3) {
    display: block;
  }
}
@media (min-width: 550px) and (max-width: 825px) {
  .servicecomb-cell:nth-child(3n) {
    margin-right: calc(50% - 125px);
    margin-left: calc(50% - 125px);
  }

  .servicecomb_placeholder:nth-child(3n + 5) {
    display: block;
  }
}

@media (max-width: 550px) {
  .corecombs-cell {
    flex: 0 1 110px;
    max-width: 110px;
    height: 60px;
    margin: 20px 0px 5px;
  }
  .corecombs-cell_title {
    font-size: 0.8em;
  }

  .corecombs-core {
    font-size: 1.2em;
    font-weight: 900;
    color: white;
  }
}

/* ============================================
   PETROLEUM SERVICES RESPONSIVE DESIGN
   ============================================ */

/* Large Devices (Tablets, 768px and up) */
@media (max-width: 1199px) {
  .container {
    max-width: 95%;
    padding: 0 15px;
  }

  .service-details {
    gap: 30px;
  }

  .service-img {
    height: 450px;
  }

  .products-grid {
    justify-content: center;
  }

  .product-card {
    width: 320px;
  }
}

/* Medium Devices (Tablets, 768px and up) */
@media (max-width: 992px) {
  /* Page Header */
  /* .page-header.hero-petroleum {
    min-height: 35vh;
    padding: 60px 20px;
  }

  .page-header.hero-contact {
    min-height: 30vh;
    padding: 60px 20px;
  } */

  .page-header h2 {
    font-size: 32px;
  }

  .page-header p {
    font-size: 18px;
    max-width: 90%;
  }

  /* Service Details */
  .service-details {
    flex-direction: column;
    gap: 40px;
  }

  .service-description {
    padding: 0;
  }

  .service-description h3 {
    font-size: 28px;
  }

  /* Spilled Image */
  .spilled {
    position: relative;
    right: -25;
    transform: translateY(-50%);
    width: 100%;
    max-width: 500px;
    height: 300px;
    z-index: 1;
    margin-bottom: -120px;
  }

  .spilled img {
    object-fit: contain;
  }

  /* Products Grid */
  .products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .product-card {
    width: 100%;
    animation: none;
    opacity: 1;
    transform: none;
  }

  /* Service Offered Hexagons */
  .servicecomb {
    transform: translateY(0);
    justify-content: center;
    margin: 40px 0;
  }

  .servicecomb-cell {
    flex: 0 1 200px;
    max-width: 200px;
    height: 110px;
    margin: 50px 10px 20px;
  }

  .servicecomb-cell_title {
    font-size: 1.2em;
  }

  .servicecomb-cell_title > small {
    font-size: 0.9em;
  }

  /* Hide placeholder hexagons on tablet */
  .servicecomb_placeholder {
    display: none !important;
  }

  /* CTA Section */
  .cta-petroleum .cta {
    padding: 60px 20px;
  }

  .cta h2 {
    font-size: 28px;
  }

  .cta p {
    font-size: 16px;
  }
}

/* Small Devices (Phones, 576px and up) */
@media (max-width: 767px) {
  /* Page Header */
  /* .page-header{
    height: 40vh;
  } */
  .page-header.hero-petroleum {
    padding: 60px 0;
  }

  .page-header h2 {
    font-size: 28px;
  }

  .page-header p {
    font-size: 16px;
  }

  /* Service Details */
  .service-details {
    display: flex;
    flex-direction: column;
    margin-bottom: 40px;
    padding: 20px;
  }

  .service-img {
    height: 350px;
  }

  .service-description h3 {
    font-size: 24px;
  }

  .service-description p {
    font-size: 15px;
  }

  /* Products Grid */
  .products-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .product-card {
    padding: 25px;
  }

  .product-card h2 {
    font-size: 18px;
  }

  .product-icon {
    font-size: 1.8rem;
  }

  /* Service Offered */
  .service-offered {
    margin-bottom: 80px;
  }

  .servicecomb {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 10px 40px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .servicecomb::-webkit-scrollbar {
    height: 6px;
  }

  .servicecomb::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
  }

  .servicecomb::-webkit-scrollbar-thumb {
    background: var(--light-orange);
    border-radius: 3px;
  }

  .servicecomb-cell {
    flex: 0 0 180px;
    max-width: 180px;
    height: 100px;
    margin: 30px 15px 20px;
    scroll-snap-align: center;
  }

  .servicecomb-cell_title {
    font-size: 1em;
  }

  /* Hide scrollbar for mobile */
  .servicecomb {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .servicecomb::-webkit-scrollbar {
    display: none;
  }

  /* CTA Section */
  .cta-petroleum .cta {
    padding: 50px 15px;
  }

  .cta h2 {
    font-size: 24px;
  }

  .cta p {
    font-size: 15px;
  }
}

/* Extra Small Devices (Phones, less than 576px) */
@media (max-width: 575px) {
  /* Page Header */
  /* .page-header.hero-contact {
    height: 30vh;
    padding: 50px 0;
  }
  .page-header.hero-petroleum {
    padding: 50px 0;
    min-height: 250px;
  } */

  .page-header h2 {
    font-size: 24px;
  }

  /* Service Details */
  .service-img {
    height: 280px;
  }

  .service-description h3 {
    font-size: 22px;
  }

  .service-description p {
    font-size: 14px;
    line-height: 1.6;
  }

  /* Spilled Image */
  .spilled {
    display: none;
  }

  /* Products Grid */
  .products-grid {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 25px;
  }

  .product-card {
    padding: 20px;
  }

  .product-card h2 {
    font-size: 16px;
  }

  .product-card p {
    font-size: 13px;
  }

  .product-icon {
    font-size: 1.5rem;
  }

  /* Service Offered Hexagons */
  .servicecomb {
    padding: 10px 5px 30px;
  }

  .servicecomb-cell {
    flex: 0 0 150px;
    max-width: 150px;
    height: 85px;
    margin: 25px 10px 15px;
  }

  .servicecomb-cell_title {
    font-size: 0.9em;
  }

  .servicecomb-cell_title > small {
    font-size: 0.8em;
  }

  /* CTA Section */
  .cta-petroleum .cta {
    padding: 40px 10px;
  }

  .cta h2 {
    font-size: 22px;
  }

  .cta p {
    font-size: 14px;
    margin-bottom: 25px;
  }

  .cta .btn {
    padding: 12px 25px;
    font-size: 14px;
  }
}

/* Tablet Landscape Optimization */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .page-header.hero-petroleum {
    min-height: 350px;
    padding: 100px 0;
  }

  .service-details {
    flex-direction: row;
  }

  .service-img {
    height: 400px;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Adjust for very small screens */
@media (max-width: 375px) {
  .servicecomb-cell {
    flex: 0 0 130px;
    max-width: 130px;
    height: 75px;
  }

  .servicecomb-cell_title {
    font-size: 0.8em;
  }

  .product-card {
    padding: 15px;
  }

  .product-card h2 {
    font-size: 15px;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .product-card:hover {
    transform: none;
  }

  .product-card:active {
    transform: scale(0.98);
  }

  .servicecomb-cell:hover .servicecomb-cell_title {
    opacity: 1;
  }

  .servicecomb-cell:hover .servicecomb-cell_image {
    filter: grayscale(100%);
  }

  .servicecomb-cell:hover::after {
    opacity: 0.7;
  }

  .servicecomb-cell:active .servicecomb-cell_title {
    opacity: 0;
  }

  .servicecomb-cell:active .servicecomb-cell_image {
    filter: grayscale(0%);
  }

  .servicecomb-cell:active::after {
    opacity: 0;
  }
}

/* High-Resolution Displays */
@media (min-width: 1400px) {
  .servicecomb {
    max-width: 1200px;
    margin: 0 auto;
  }

  .servicecomb-cell {
    flex: 0 1 220px;
    max-width: 220px;
  }
}

/* Print Styles for Petroleum Page */
@media print {
  .hero-petroleum,
  .spilled,
  .btn,
  .servicecomb-cell_image,
  .product-glow,
  .product-line,
  footer {
    display: none !important;
  }

  .page-content {
    padding-top: 0;
  }

  .servicecomb-cell::before {
    background: #f0f0f0 !important;
  }

  .servicecomb-cell_title {
    color: #333 !important;
    opacity: 1 !important;
  }

  .product-card {
    border: 1px solid #ddd;
    box-shadow: none !important;
    break-inside: avoid;
  }

  .products-grid {
    display: block;
  }

  .product-card {
    margin-bottom: 20px;
    page-break-inside: avoid;
  }
}

/* Smooth scrolling for hexagon grid on mobile */
@media (max-width: 767px) {
  .servicecomb {
    scroll-behavior: smooth;
  }

  /* Add navigation dots for hexagon grid */
  .servicecomb-container {
    position: relative;
  }

  .hexagon-scroll-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
  }

  .hexagon-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.3s ease;
  }

  .hexagon-dot.active {
    background: var(--light-orange);
  }
}

/* Animation adjustments for mobile */
@media (max-width: 767px) {
  .product-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Stagger animation for product cards */
  .products-grid .product-card:nth-child(1) {
    animation-delay: 0.1s;
  }
  .products-grid .product-card:nth-child(2) {
    animation-delay: 0.2s;
  }
  .products-grid .product-card:nth-child(3) {
    animation-delay: 0.3s;
  }
  .products-grid .product-card:nth-child(4) {
    animation-delay: 0.4s;
  }
  .products-grid .product-card:nth-child(5) {
    animation-delay: 0.5s;
  }
  .products-grid .product-card:nth-child(6) {
    animation-delay: 0.6s;
  }
  .products-grid .product-card:nth-child(7) {
    animation-delay: 0.7s;
  }
  .products-grid .product-card:nth-child(8) {
    animation-delay: 0.8s;
  }
  .products-grid .product-card:nth-child(9) {
    animation-delay: 0.9s;
  }
}

/* ============================================
   CONSTRUCTION DIVISION
   ============================================ */

@media (max-width: 768px) {
  /* Page Header */
  .page-header.hero-construction {
    padding: 60px 0;
  }

  .page-header.hero-construction h2 {
    font-size: 28px;
  }

  .page-header.hero-construction p {
    font-size: 16px;
  }

  /* Construction grid */
  .construction-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .construction-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 10px;
  }
}

/* ============================================
   CONTACT PAGE
   ============================================ */
@media (max-width: 992px) {
  .info-card {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
  }

  .form-card {
    width: 100%;
    padding: 20px;
  }
}

@media (max-width: 576px) {
  .contact-container {
    flex-direction: column;
  }
  .card-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

  .contact-bg {
    padding: 60px 15px;
  }

  .contact-info {
    padding: 20px;
  }

  .form-card {
    padding: 30px 20px;
  }

  .form-header {
    font-size: 22px;
  }

  .contact-icon {
    margin-bottom: 10px;
  }

  .contact-details h4 {
    font-size: 15px;
  }

  .contact-details p {
    font-size: 13px;
  }
}
