* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.top-bar {
    background-color: #354f76;
    border-bottom: 1px solid #e0e0e0;
    padding: 4px 0;
    font-size: 14px;
}

.top-bar .container {
    display: flex;
    justify-content: flex-start;
}

.contact-info {
    display: flex;
    gap: 20px;
}

.contact-info a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: rgb(144, 144, 144);
}

body {
    font-family: "Kanit", sans-serif;
    line-height: 1.0; /* check this */ 
}

header {
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 0.25rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header img {
    width: 300px;
    height: auto;
    display: block;
    margin-right: 20px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 0;
}

nav ul li {
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 1.0rem;
    white-space: nowrap;
    padding: 0.5rem 1.0rem;
    transition: color 0.3s ease, background-color 0.3s ease;
    display: block;
}

nav ul li a:hover,
nav ul li a:focus {
    color: #354f76;
    background-color: #f5f5f5;
    border-radius: 5px;
}

/* Sub-menu styling */
nav ul li ul {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    flex-direction: column;
    gap: 0;
    z-index: 1000;
    padding: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

nav ul li ul li {
    width: 100%; /* Ensure full width of sub-menu */
    padding-left: 8px;
}

nav ul li ul li a {
    font-weight: 500;
    padding: 0.75rem 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    color: #333;
}

/* Checkbox for sub-menu toggle */
.submenu-toggle {
    display: none;
}

.submenu-toggle:checked ~ ul {
    max-height: 200px; /* Adjust based on submenu content height */
    opacity: 1;
}

/* Label for sub-menu toggle */
.submenu-label {
    cursor: pointer;
    margin-top: 8px;
    display: flex;
    font-size: 1.0rem;
    font-weight: 700;
    color: #333;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    padding-left: 10px;
    padding-bottom: 10px;
}

.submenu-label::after {
    content: '\25BC';
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    margin-left: 0.5rem;
}

.submenu-toggle:checked ~ .submenu-label::after {
    transform: rotate(180deg);
}

h1, h2, h3 {
    display: flex;
    justify-content: center;
    margin: 20px;
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 30px;
    height: 20px;
    justify-content: space-between;
}

.menu-toggle span {
    background: #333;
    height: 3px;
    width: 100%;
    transition: all 0.3s ease;
}

/* Mobile Menu */
@media (max-width: 1024px) {
    .menu-toggle {
        display: flex;
    }

    nav {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: #ffffff;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        padding: 0.25rem;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    nav ul li a {
        display: block;
        padding: 0.75rem;
        font-size: 1.0rem;
    }

    /* Sub-menu in mobile */
    nav ul li ul {
        display: none;
        position: static;
        box-shadow: none;
        background: #f9f9f9;
        padding-left: 1rem;
        margin-top: 0.5rem; /* Space above sub-menu on mobile */
        max-height: none;
        opacity: 1;
        transition: none;
    }

    nav ul li ul li a {
        font-size: 0.8rem;
        padding: 0.1rem 0.75rem; /* Adjusted padding for mobile */
    }

    .submenu-toggle:checked ~ ul {
        display: flex;
    }

    /* Hamburger Animation */
    input[type="checkbox"]:checked ~ .menu-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    input[type="checkbox"]:checked ~ .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    input[type="checkbox"]:checked ~ .menu-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

/* Hide checkboxes */
#menu-checkbox,
.submenu-toggle {
    display: none;
}

/* Show menu when checkbox is checked */
#menu-checkbox:checked ~ nav {
    display: block;
}

.video-container {
    position: relative;
    width: 99vw;
    padding-bottom: 56.25%; /* 16:9 */
    overflow: hidden;
    border-radius: 0px;
    margin: 0px;
    margin-bottom: 5px;
}

#background-video,
#background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: -1;
    filter: brightness(0.6);
}

.video-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    padding: 0 10px;
}

.large-text {
    font-size: 3.5vw;
    font-weight: bold;
    margin-bottom: 2px;
}

.small-text {
    font-size: 1.5vw;
    line-height: 1.3;
    max-width: 80%;
    margin: 0 auto;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateX(200px);
    transition: opacity 1.0s ease-out, transform 1.0s ease-out;
    justify-content: center;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Spacer to allow scrolling */
.spacer {
    height: 2vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.card-section-wrapper {
    position: relative; /* Required for absolute positioning of pseudo-elements */
    background-image: url('../images/card-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 60px 0;
    margin: 0px 0;
}

/* Top fade: 40px fade from transparent to background color */
.card-section-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none; /* Ensures the overlay doesn't interfere with interactions */
}

/* Bottom fade: 40px fade from background color to transparent */
.card-section-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none; /* Ensures the overlay doesn't interfere with interactions */
}

.card-section {
    padding: 40px 0;
}

.card {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card.reverse {
    flex-direction: row-reverse;
}

.card-image {
    flex: 1;
    max-width: 50%;
}

.card-image img {
    width: 100%;
    height: auto;
    display: block;
}

.card-content {
    flex: 1;
    padding: 20px;
}

.card-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.card-content p {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
}

.products-section {
    background-color: #fff;
    padding: 60px 10px;
    text-align: center;
    margin: 0;
}

.products-section h2 {
    font-size: 32px;
    margin-bottom: 40px;
    color: #333;
}

.products-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.product-card {
    flex: 1;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    font-size: 22px;
    margin: 20px 0 10px;
    color: #333;
}

.product-card p {
    font-size: 16px;
    color: #666;
    padding: 0 20px;
    margin-bottom: 20px;
}

.product-card .learn-more,
.welcome-section .learn-more,
.document-card .learn-more {
    display: inline-block;
    padding: 10px 20px;
    background-color: #354f76;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

.product-card .learn-more:hover,
.welcome-section .learn-more:hover,
.document-card .learn-more:hover {
    background-color: rgb(144, 144, 144);
    color: #354f76;
}

.documents-section {
    background-color: #f9f9f9;
    padding: 60px 0;
    text-align: center;
}

.documents-section h2 {
    font-size: 32px;
    margin-bottom: 40px;
    color: #333;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 820px; /* 2 * 400px + 20px gap */
    margin: 0 auto;
}

.document-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 400px;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.document-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.document-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.document-card .learn-more {
    display: block;
    text-align: center;
}

.contact-section {
    background-color: #f9f9f9;
    padding: 60px 0;
}

.contact-section h2 {
    font-size: 32px;
    margin-bottom: 40px;
    color: #333;
    text-align: center;
}

.contact-details {
    max-width: 600px;
    margin: 0 auto 40px;
}

.contact-details h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.contact-person {
    margin-bottom: 20px;
}

.contact-person h4 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #333;
    text-align: center;
}

.contact-person p {
    font-size: 16px;
    color: #666;
    margin-bottom: 5px;
    text-align: center;
}

.contact-person a {
    color: #354f76;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-person a:hover {
    color: rgb(144, 144, 144);
}

.contact-map {
    width: 100%;
    text-align: center;
}

.contact-map h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.contact-map iframe {
    width: 100%;
    height: 400px;
    border: 0;
    border-radius: 8px;
}

.contact-map p {
    font-size: 16px;
    color: #666;
    margin-top: 10px;
}

footer {
    background-color: #333;
    color: #fff;
    margin-top: 40px;
    padding: 40px 0;
}

footer .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    margin: 10px;
}

.footer-column img {
    margin-bottom: 15px;
}

.footer-column p {
    font-size: 14px;
    line-height: 1.6;
}

.footer-column h3 {
    font-size: 18px;
    margin: 0;
    margin-bottom: 15px;
    justify-content: left;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

.footer-column ul li a:hover {
    color: #354f76;
}

.footer-column a {
    color: #fff;
    text-decoration: none;
}

.footer-column a:hover {
    color: #354f76;
}

.footer-social {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #555;
    margin-top: 20px;
}

.footer-social a {
    color: #fff;
    font-size: 12px;
    margin: 0 10px;
    margin-top: 8px;
    text-decoration: none;
}

.footer-social a:hover {
    color: #354f76;
}

.cookie-disclaimer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.cookie-content {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cookie-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.cookie-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.cookie-content img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.cookie-accept {
    padding: 10px 20px;
    background-color: #354f76;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.cookie-accept:hover {
    background-color: rgb(144, 144, 144);
}

html {
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    .contact-map iframe {
        height: 300px;
    }
    
    .card, .card.reverse {
        flex-direction: column;
        text-align: center;
    }

    .card-image {
        max-width: 100%;
    }

    .card-content {
        padding: 15px;
    }

    .card-content h2 {
        font-size: 20px;
    }

    .card-content p {
        font-size: 14px;
    }

    .large-text {
        font-size: 3.5vw;
    }

    .small-text {
        font-size: 1.5vw;
    }

    .products-grid {
        flex-direction: column;
        gap: 30px;
    }

    .product-card img {
        height: 150px;
    }

    footer .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-column h3 {
        margin: 0;
        margin-bottom: 15px;
        justify-content: center;
    }

    .footer-column {
        margin-bottom: 30px;
    }

    .footer-social {
        margin-top: 0;
    }

    .cookie-content {
        padding: 15px;
        max-width: 80%;
    }

    .cookie-content h3 {
        font-size: 18px;
    }

    .cookie-content p {
        font-size: 13px;
    }
    .cookie-content img {
        width: 90%;
        margin: 0 auto 10px;
    }
}

@media (max-width: 500px) {
    header img {
        max-width: 160px;
    }

    .large-text {
        font-size: 3.5vw;
    }

    .small-text {
        font-size: 2vw;
    }
    .documents-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    .cookie-content img {
        width: 95%;
    }
}

.concrete-bc-section {
    padding: 40px 0;
    background-color: #f8f8f8; /* Matches video-section */
}

.concrete-bc-card {
    margin: 0 auto; /* Centers the card within the container */
    text-align: center; /* Ensures text and image alignment */
}

.concrete-bc-card-image {
    margin-bottom: 15px; /* Spacing between image and text */
}

.concrete-bc-card-content h2 {
    font-size: 1.5em;
    margin-bottom: 10px;
    font-family: 'Kanit', sans-serif; /* Matches site's font */
}

.concrete-bc-card-content p {
    font-size: 1em;
    line-height: 1.5;
    font-family: 'Kanit', sans-serif;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .concrete-bc-card {
        max-width: 90%; /* Slightly narrower on mobile */
    }

    .concrete-bc-card-image img {
        max-width: 250px; /* Smaller image on mobile */
    }
}

.kanit-thin {
    font-family: "Kanit", sans-serif;
    font-weight: 100;
    font-style: normal;
  }
  
  .kanit-extralight {
    font-family: "Kanit", sans-serif;
    font-weight: 200;
    font-style: normal;
  }
  
  .kanit-light {
    font-family: "Kanit", sans-serif;
    font-weight: 300;
    font-style: normal;
  }
  
  .kanit-regular {
    font-family: "Kanit", sans-serif;
    font-weight: 400;
    font-style: normal;
  }
  
  .kanit-medium {
    font-family: "Kanit", sans-serif;
    font-weight: 500;
    font-style: normal;
  }
  
  .kanit-semibold {
    font-family: "Kanit", sans-serif;
    font-weight: 600;
    font-style: normal;
  }
  
  .kanit-bold {
    font-family: "Kanit", sans-serif;
    font-weight: 700;
    font-style: normal;
  }
  
  .kanit-extrabold {
    font-family: "Kanit", sans-serif;
    font-weight: 800;
    font-style: normal;
  }
  
  .kanit-black {
    font-family: "Kanit", sans-serif;
    font-weight: 900;
    font-style: normal;
  }
  
  .kanit-thin-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 100;
    font-style: italic;
  }
  
  .kanit-extralight-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 200;
    font-style: italic;
  }
  
  .kanit-light-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 300;
    font-style: italic;
  }
  
  .kanit-regular-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 400;
    font-style: italic;
  }
  
  .kanit-medium-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 500;
    font-style: italic;
  }
  
  .kanit-semibold-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 600;
    font-style: italic;
  }
  
  .kanit-bold-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 700;
    font-style: italic;
  }
  
  .kanit-extrabold-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 800;
    font-style: italic;
  }
  
  .kanit-black-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 900;
    font-style: italic;
  }

/* FIXED MOBILE-FRIENDLY CARD ANIMATIONS */

/* Animation keyframes with mobile-safe translate values */
@keyframes slideInFromRight {
  0% {
    transform: translateX(60px) scale(0.95);
    opacity: 0;
    visibility: hidden;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
    visibility: visible;
  }
}

@keyframes slideInFromLeft {
  0% {
    transform: translateX(-60px) scale(0.95);
    opacity: 0;
    visibility: hidden;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
    visibility: visible;
  }
}

/* Initial state for cards before they are revealed */
.card, .card.reverse {
  /* Prevent horizontal scrollbars with overflow hidden on card container */
  overflow: hidden;
  position: relative;
  
  /* Mobile-safe initial positioning */
  transform: translateX(60px) scale(0.95);
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reverse cards initial state */
.card.reverse {
  transform: translateX(-60px) scale(0.95);
}

/* Class to trigger animation when card is revealed */
.card.revealed {
  transform: translateX(0) scale(1);
  opacity: 1;
  visibility: visible;
  animation: slideInFromRight 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.card.reverse.revealed {
  transform: translateX(0) scale(1);
  opacity: 1;
  visibility: visible;
  animation: slideInFromLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Stagger the animations for each card */
.card.revealed:nth-child(1) {
  animation-delay: 0.1s;
}
.card.revealed:nth-child(2) {
  animation-delay: 0.2s;
}
.card.revealed:nth-child(3) {
  animation-delay: 0.3s;
}
.card.revealed:nth-child(4) {
  animation-delay: 0.4s;
}
.card.revealed:nth-child(5) {
  animation-delay: 0.5s;
}
.card.revealed:nth-child(6) {
  animation-delay: 0.6s;
}

/* Mobile optimizations */
@media screen and (max-width: 768px) {
  /* Smaller translate distances for mobile */
  @keyframes slideInFromRight {
    0% {
      transform: translateX(30px) scale(0.98);
      opacity: 0;
      visibility: hidden;
    }
    100% {
      transform: translateX(0) scale(1);
      opacity: 1;
      visibility: visible;
    }
  }

  @keyframes slideInFromLeft {
    0% {
      transform: translateX(-30px) scale(0.98);
      opacity: 0;
      visibility: hidden;
    }
    100% {
      transform: translateX(0) scale(1);
      opacity: 1;
      visibility: visible;
    }
  }

  .card, .card.reverse {
    /* Smaller initial offsets for mobile */
    transform: translateX(30px) scale(0.98);
    transition-duration: 0.6s;
  }
  
  .card.reverse {
    transform: translateX(-30px) scale(0.98);
  }
  
  /* Faster staggered delays on mobile for better UX */
  .card.revealed:nth-child(1) { animation-delay: 0.05s; }
  .card.revealed:nth-child(2) { animation-delay: 0.1s; }
  .card.revealed:nth-child(3) { animation-delay: 0.15s; }
  .card.revealed:nth-child(4) { animation-delay: 0.2s; }
  .card.revealed:nth-child(5) { animation-delay: 0.25s; }
  .card.revealed:nth-child(6) { animation-delay: 0.3s; }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
.card {
    transition: opacity 0.3s ease;
    transform: none;
}

.card.revealed {
    animation: none;
    opacity: 1;
    visibility: visible;
    transform: none;
}
}

/* Demo styling */
/* .section {
margin: 100px 0;
}

.section h2 {
text-align: center;
margin-bottom: 50px;
color: #333;
}

.card:nth-child(odd) {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}

.card:nth-child(even) {
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
color: white;
} */