/* 1. Base & Typography
-------------------------------------------------- */
* {
  font-family: 'Montserrat', sans-serif !important;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: #555;
  background-color: #fff;
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: #111;
}

/* Center key titles */
.section-title, .pavillon-title {
    text-align: center;
}

.display-1 {
  font-size: 4.5rem;
  font-weight: 400; /* Increased font-weight for boldness */
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff; /* Ensured white color */
  text-shadow: 0 2px 15px rgba(0,0,0,0.5); /* Enhanced shadow */
}

.project-subtitle {
    color: #fff;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-top: 10px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.section-title {
  font-size: 2.8rem;
  margin-bottom: 25px;
}

.section-subtitle {
  font-style: italic;
  font-size: 1.2rem;
  color: #777;
  margin-bottom: 30px;
}

p {
  margin-bottom: 15px;
}

a {
  color: #007bff;
  transition: color 0.3s ease;
}
a:hover {
  color: #0056b3;
  text-decoration: none;
}

/* 2. Navbar
-------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 40px;
  height: 80px;
  background: transparent;
  transition: background-color 0.3s ease, height 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  height: 70px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar .brand {
  display: inline-block;
  /* Make logo visible by default for desktop */
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease; /* This transition will apply on mobile */
}

.navbar .brand img {
  height: 45px;
  transition: height 0.3s ease;
}
.navbar.scrolled .brand img {
  height: 40px;
}

.navbar .navigation,
.navbar .navbar-toggle {
  margin-left: auto;
}

.navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.navigation ul li {
  display: inline-block;
  margin-left: 35px;
}
.navigation ul li a {
  color: #333 !important; /* Enforce black color */
  font-weight: 400;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
  text-shadow: none; /* Remove shadow */
}
.navbar.scrolled .navigation ul li a {
  color: #333 !important; /* Changed to dark color for better contrast on white background */
}
.navbar:not(.scrolled) .navigation ul li a:hover,
.navbar:not(.scrolled) .navigation ul li.active a {
  color: #007bff;
}

.navbar.scrolled .navigation ul li a:hover,
.navbar.scrolled .navigation ul li.active a {
  color: #0056b3;
}

.navbar-toggle {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 32px;
  height: 32px;
  z-index: 101;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  position: relative; /* Set as positioning context for the icons */
}

.navbar.scrolled .navbar-toggle {
  opacity: 1;
  visibility: visible;
}

.navbar-toggle img {
  width: 100%;
  height: 100%;
}

/* 3. Mobile Menu
-------------------------------------------------- */
.menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 99;
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.menu.active {
  right: 0;
}

.mobile-menu {
  list-style: none;
  padding: 0;
  text-align: center;
}
.mobile-menu li {
  margin-bottom: 25px;
}
.mobile-menu li a {
  font-size: 1.8rem;
  font-weight: 300;
  color: #333;
}

/* Open menu state */
.menu-open .navbar-toggle {
  /* No special styles needed now, JS handles the icon swap */
}

/* 4. Section Layout & Styling
-------------------------------------------------- */
.section {
  position: relative;
  overflow: hidden;
  width: 100%;
}

#page1, #page7 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#page1 .intro {
  max-width: 900px;
  margin: 0 auto;
}

.section-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}

/* Section Colors */
.section-white {
  padding: 80px 0; /* Unified vertical padding */
  background-color: #fff;
}
.section-white .section-title,
.section-white h3 {
  color: #222;
}
.section-white p {
  color: #555;
}

.vertical-centred {
  flex-grow: 1; /* Allows the element to grow and fill available space */
  display: flex;
  flex-direction: column; /* Stack items vertically */
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 2;
}

.professional-container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 40px; /* Removed vertical padding */
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px; /* Increased gap for more space */
  align-items: center;
}

.image-container {
  width: 100%;
  overflow: hidden;
  box-shadow: none; /* Removed shadow for a flatter look */
  aspect-ratio: 1 / 1; /* Creates a 1:1 aspect ratio */
}
.image-container img {
  width: 100%;
  height: 100%; /* Make image fill the container */
  display: block;
  object-fit: cover; /* Ensures the image covers the area without distortion */
}

.content-section {
  margin-bottom: 25px;
}
.content-section h3 {
  font-size: 1.6rem;
  margin-bottom: 15px;
}

/* 5. Contact Section
-------------------------------------------------- */
#contact .section-title {
  margin-bottom: 15px;
}
#contact .section-subtitle {
  font-size: 1.1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 50px;
}

.contact-col h4 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.contact-info p {
  line-height: 1.6;
  margin-bottom: 10px;
}

.map-container {
    width: 100%;
    height: 300px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 20px;
    border: 1px solid #e9ecef;
}

.contact-form-container {
  max-width: 800px;
  margin: 70px auto 0;
}

.form-title {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 30px;
}

.contact-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-form .form-row.text-center {
    justify-content: center;
}

.contact-form .form-group {
    flex: 1;
}

.contact-form .form-group.full-width {
    flex-basis: 100%;
}

.contact-form .form-control {
  width: 100%;
  padding: 15px;
  border: 1px solid #e5e5e5;
  border-radius: 5px;
  font-size: 1rem;
  font-family: 'Montserrat', sans-serif;
  transition: all 0.3s ease;
  background-color: #fff;
}

.contact-form .form-control:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.1);
  background-color: #fff;
}

.btn-submit {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 15px 50px;
  border-radius: 5px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: auto;
}

.btn-submit:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.2);
}

/* 6. Responsive Styles
-------------------------------------------------- */
@media (max-width: 1024px) {
  .display-1 {
    font-size: 3.5rem;
  }
  .section-title {
    font-size: 2.4rem;
  }
  .professional-container {
    padding: 0 30px; /* Removed vertical padding */
  }
  .split-layout {
    gap: 40px;
  }

  .contact-grid {
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 15px;
    height: 70px;
  }
  .navbar.scrolled {
    height: 60px;
    background: rgba(255, 255, 255, 0.85);
  }

  .navbar .brand img {
    height: 38px;
  }
  .navbar.scrolled .brand img {
      height: 32px;
  }
  .navbar .navigation {
    display: none;
  }
  .navbar-toggle {
    display: block;
    opacity: 1;
    visibility: visible;
  }
  .navbar .navbar-toggle .icon-bar {
      background-color: #333; /* Changed to dark for better contrast on white background */
  }

  .display-1 {
    font-size: 2.5rem;
  }
  .section-title {
    font-size: 2rem;
  }
  
  .professional-container {
    padding: 0 20px; /* Removed vertical padding */
  }

  .split-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .image-container {
      margin-bottom: 0;
      /* The text-content will now dictate the flow */
  }

  .text-content {
      text-align: left;
  }
  
  .contact-grid {
      grid-template-columns: 1fr;
      gap: 50px;
  }

  .contact-form .form-row {
      flex-direction: column;
      gap: 0;
      margin-bottom: 0;
  }
  .contact-form .form-group {
      margin-bottom: 20px;
  }

  .section-white {
    padding: 50px 0; /* Unified vertical padding for mobile */
  }
}

/* 7. Footer
-------------------------------------------------- */
.site-footer {
    width: 100%;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e9ecef;
}

.footer-col {
    margin-bottom: 30px;
}

.footer-col:nth-child(1) {
    text-align: left;
}

.footer-col:nth-child(2),
.footer-col:nth-child(3) {
    text-align: center;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 15px;
}

.footer-col h5 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #222;
}

.footer-nav {
    list-style: none;
    padding: 0;
}
.footer-nav li {
    margin-bottom: 10px;
}
.footer-nav a {
    color: #555;
    text-decoration: none;
}
.footer-nav a:hover {
    color: #007bff;
}

.social-list .social-icon {
    font-size: 24px;
    color: #555;
    margin-right: 15px;
    transition: color 0.3s ease;
}
.social-list .social-icon:hover {
    color: #007bff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #e9ecef;
}
.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    color: #777;
} 
/* ================================================ */
/* 8. Custom Styles for Services Section
/* ================================================ */

/* Grid container chứa các cột văn bản */
.services-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px; /* Khoảng cách giữa 2 cột văn bản */
  width: 100%;
  margin-top: 30px; /* Khoảng cách với tiêu đề chính */
}

/* Kiểu cho mỗi cột văn bản */
.service-column {
  flex: 1;
  min-width: 0;
}

/* Kiểu cho mỗi mục dịch vụ */
.service-item {
  margin-bottom: 30px;
}

.service-item:last-child {
  margin-bottom: 0;
}

.service-item h3 {
  font-size: 1.1em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 15px;
  color: #333;
}

.service-item p, 
.service-item li {
  font-size: 0.95em;
  line-height: 1.7;
  color: #555;
  margin-bottom: 10px;
}

.service-item ul {
  list-style-type: disc;
  padding-left: 20px;
  margin-top: 10px;
}

/* Responsive cho 2 cột văn bản bên trong */
@media (max-width: 992px) { /* Thay đổi điểm ngắt để phù hợp hơn */
  .services-grid {
      flex-direction: column;
      gap: 0;
  }
}

/* ================================================ */
/* 9. Custom Override for Wider Services Section
/* ================================================ */

/* Tăng chiều rộng tổng thể của khu vực nội dung */
.professional-container {
  max-width: 1440px;
}

/* Thay đổi tỉ lệ cột chính (Ảnh : Chữ) thành 40% : 60% */
#page4 .split-layout {
  grid-template-columns: 1fr 1.5fr; /* Cột chữ rộng gấp rưỡi cột ảnh */
  gap: 60px; /* Điều chỉnh khoảng cách cho cân đối */
  align-items: flex-start;
}

/* Giảm nhẹ khoảng cách giữa 2 cột văn bản để chữ có thêm không gian */
#page4 .services-grid {
  gap: 25px;
}
/* ================================================ */
/* 14. Custom Pavillon Layout for Section #page6
/* ================================================ */

.pavillon-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr; /* Cột ảnh trái rộng hơn cột phải */
    gap: 60px; /* Khoảng cách giữa 2 cột */
    align-items: start; /* Căn các cột theo lề trên */
}

.pavillon-main-image img,
.pavillon-secondary-image img {
    width: 100%;
    display: block;
}

/* Định dạng cho cột nội dung bên phải */
.pavillon-right-col {
    display: flex;
    flex-direction: column;
    height: 100%; /* Giúp logo đẩy xuống dưới cùng */
}

.pavillon-text-content {
    padding-bottom: 30px;
}

.pavillon-title {
    font-size: 2.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 30px;
}

.pavillon-text-content p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #333;
}

.pavillon-text-content p strong {
    color: #000;
    font-weight: 600;
}

/* Định dạng cho logo */
.pavillon-logo {
    margin-top: auto; /* Đẩy logo xuống cuối cột */
    align-self: flex-end; /* Đẩy logo sang phải */
    padding-top: 30px;
}

.pavillon-logo img {
    max-width: 120px; /* Giới hạn kích thước logo */
}

/* Responsive cho thiết bị di động */
@media (max-width: 768px) {
    .pavillon-layout {
        grid-template-columns: 1fr; /* Chuyển thành 1 cột */
        gap: 40px;
    }

    .pavillon-right-col {
        height: auto;
    }

    .pavillon-logo {
        margin-top: 40px;
    }
}
/* ================================================ */
/* 15. Update Font Size for Pavillon Section
/* ================================================ */

/* Tăng kích thước tiêu đề chính cho đồng bộ */
.pavillon-title {
  font-size: 2.8rem; /* Tăng từ 2.5rem lên 2.8rem */
}

/* Tăng nhẹ kích thước các dòng chữ mô tả */
.pavillon-text-content p {
  font-size: 1em; /* Tăng từ 0.95rem lên 1em (tương đương 16px) */
}

/* ================================================ */
/* 16. Custom Timeline Layout
/* ================================================ */

.timeline-container {
  margin-top: 80px; /* Khoảng cách với nội dung bên trên */
  padding-bottom: 20px;
}

.timeline-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  justify-content: space-between;
}

/* Đường kẻ ngang của timeline */
.timeline-list::before {
  content: '';
  position: absolute;
  top: 13px; /* Vị trí của đường kẻ */
  left: 30px;
  right: 30px;
  height: 1px;
  background-color: #ddd;
  z-index: 1;
}

.timeline-item {
  flex: 1;
  text-align: left;
  position: relative;
  padding: 0 10px;
}

/* Số thứ tự và vòng tròn */
.timeline-item::before {
  counter-increment: timeline-counter;
  content: '0' counter(timeline-counter);
  position: absolute;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  z-index: 2;
}

.timeline-title {
  margin-top: 40px; /* Khoảng cách từ vòng tròn xuống tiêu đề */
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9em;
  color: #111;
}

.timeline-subtext {
  margin-top: 10px;
  font-size: 0.85em;
  color: #777;
  line-height: 1.6;
}

/* CSS cho ngày tháng trên timeline */
.timeline-item:nth-child(1)::after { content: '4/2025 - 9/2025'; }
.timeline-item:nth-child(2)::after { content: '9/2025'; }
.timeline-item:nth-child(3)::after { content: '12/2025 - 3/2026'; }
.timeline-item:nth-child(4)::after { content: '3/2026 - 4/2026'; }
.timeline-item:nth-child(5)::after { content: '2026 - 2029'; }

.timeline-item::after {
  position: absolute;
  top: -20px;
  left: 0;
  font-size: 0.8em;
  font-weight: 600;
  color: #999;
}

/* Responsive cho thiết bị di động */
@media (max-width: 992px) {
  .timeline-list {
      flex-direction: column;
      align-items: flex-start;
  }

  /* Chuyển đường kẻ thành dọc */
  .timeline-list::before {
      left: 13px;
      top: 30px;
      bottom: 30px;
      width: 1px;
      right: auto;
  }
  
  .timeline-item {
      padding-left: 50px; /* Tạo khoảng trống cho đường kẻ dọc */
      padding-bottom: 40px;
      text-align: left;
      flex: none;
      width: 100%;
  }

  .timeline-item:last-child {
      padding-bottom: 0;
  }

  .timeline-item::before,
  .timeline-item::after {
      left: 0;
      top: 0;
  }

  .timeline-title {
      margin-top: 0;
      margin-left: 0;
  }
  
  .timeline-item::after {
     top: 30px;
     left: -100px; /* Tạm ẩn đi trên mobile cho gọn */
     display: none;
  }
}
/* ================================================ */
/* 17. Custom Partner Logo Wall Layout
/* ================================================ */

.partner-category {
  margin-bottom: 40px;
}

.partner-category h3 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #999;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  margin-bottom: 25px;
}

.partner-category h4 {
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
  margin-top: 30px;
  margin-bottom: 20px;
}

.logo-grid {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping */
  justify-content: flex-start; /* Align to the left */
  align-items: center;
  gap: 20px;
}

.logo-item {
    width: 160px; /* Define a fixed width box */
    height: 80px; /* Define a fixed height box */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-item a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.logo-item img {
  max-height: 100%; /* Image fits inside the box height */
  max-width: 100%; /* Image fits inside the box width */
  width: auto;
  height: auto;
  object-fit: contain;
  transition: all 0.3s ease;
}

/* Hiệu ứng khi di chuột qua: ảnh có màu và rõ nét */
.logo-item a:hover img {
  filter: grayscale(0%);
  opacity: 1;
}
#contact .contact-col h4 a,
#contact .contact-col .contact-info p,
#contact .contact-col .contact-info span,
#contact .contact-col .contact-info a {
    color: #000 !important;
}

/* ================================================ */
/* 18. Mobile Responsive Overrides
/* ================================================ */

.hero-banner-image {
    width: 100%;
    height: auto;
    display: block;
}

#page1 {
    padding-top: 80px; /* Navbar height */
    min-height: auto !important;
    padding-bottom: 0;
}

@media (max-width: 768px) {
    /* Banner Adjustments */
    #page1 .section-bg {
        background-size: cover; 
        background-position: center;
        background-repeat: no-repeat;
    }
    #page1 {
        min-height: auto !important; /* Compromise height for better visibility */
        background-color: transparent; /* Remove letterboxing */
        padding-top: 70px; /* Mobile navbar height */
    }

    .display-1 {
        font-size: 2.2rem;
        line-height: 1.4;
    }

    /* Vereinheitlichung der Sektionslayouts */
    .split-layout,
    .pavillon-layout,
    .contact-grid,
    .services-grid {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
        gap: 30px !important;
    }

    .professional-container {
        padding: 0 20px !important;
    }

    .section-white, .section-dark {
        padding: 60px 0 !important;
    }
    
    .section-title {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }

    .image-container {
        margin-bottom: 20px;
    }
    
    .text-content {
        text-align: center;
    }
    .services-grid .service-column .service-item {
        text-align: left;
    }

    /* Spezifische Anpassungen für Pavillon */
    .pavillon-layout .pavillon-right-col {
        order: -1; /* Bild zuerst anzeigen */
    }
    
    .pavillon-title {
        font-size: 2rem;
    }

    /* Timeline Anpassungen */
    .timeline-container {
        margin-top: 40px;
    }

    /* Partner Logos */
    .logo-grid {
        justify-content: flex-start;
        gap: 20px; /* Smaller gap for mobile */
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 15px;
    }

    .logo-item {
        width: 120px;
        height: 60px;
    }

    .logo-item img {
        max-height: 100%;
        max-width: 100%;
        height: auto;
    }

    /* Footer Anpassungen */
    .footer-col {
        text-align: center !important;
    }

    .footer-nav {
        padding: 0;
    }
}