* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #fcfcfc;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: #1e1e1e;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

html {
  scroll-behavior: smooth;
}

/* ============================================
   TOP CONTACT BAR
============================================ */
.topbar {
  background-color: #31353c;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 5%;
  min-height: 2.5rem;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo-group a { transition: opacity 0.3s ease; }
.logo-group a:hover { opacity: 0.8; }
.logo-group img { height: 1.2rem; width: auto; }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-links a:hover { color: #D5481B; }

/* ============================================
   MAIN NAVIGATION BAR
============================================ */
.subbar {
  background-color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  border-bottom: 8px solid #D5481B;
  height: 6rem;
  position: relative;
}

.subbar-logo img {
  height: 5rem;
  width: auto;
}

.subbar-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.subbar-links a {
  color: #1e1e1e;
  text-decoration: none;
  font-size: clamp(0.8rem, 1.2vw, 1rem);
  transition: color 0.3s ease;
  font-weight: 500;
}

.subbar-links a:hover,
.subbar-links a[aria-current="page"] {
  color: #D5481B;
}

.search-box {
  display: flex;
  align-items: center;
  background: #f1f1f1;
  border-radius: 50px;
  padding: 0.4rem 1rem;
  max-width: 250px;
}

.search-box input {
  border: none; background: transparent; outline: none;
  width: 100%; color: #1e1e1e;
}

.search-box button {
  border: none; background: none; cursor: pointer;
}

.search-box button img { width: 16px; }

/* Hamburger Menu & Mobile Sidebar */
.hamburger-icon-button {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  z-index: 1001; /* Keep above sidebar */
}

.hamburger-icon-button .bar {
  width: 25px; height: 3px;
  background-color: #1e1e1e;
  transition: 0.3s;
}

/* Sidebar structure */
.mobile-sidebar {
  position: fixed;
  top: 0; right: -300px;
  width: 280px; height: 100vh;
  background: #fff;
  z-index: 1000;
  padding: 5rem 2rem 2rem;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  transition: right 0.3s ease-in-out;
  display: block; /* Overrides your previous display:none */
  overflow-y: auto;
}

.mobile-sidebar.open { right: 0; }

.sidebar-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0; visibility: hidden;
  transition: 0.3s ease-in-out;
  display: block;
}

.sidebar-overlay.visible { opacity: 1; visibility: visible; }

.mobile-links { list-style: none; padding: 0; margin-top: 2rem; }
.mobile-links li { margin-bottom: 1.5rem; }
.mobile-links a { text-decoration: none; color: #1e1e1e; font-size: 1.1rem; font-weight: 500; }
.mobile-links a:hover { color: #D5481B; }
.mobile-search-box { margin-bottom: 2rem; max-width: 100%; border: 1px solid #ddd; }

/* ============================================
   HERO SECTION
============================================ */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  background-color: #1e1e1e;
  color: #fff;
  padding: 4rem 5%;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 0; right: 0;
  width: 65%; height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(to right, rgb(0, 0, 0) 20%, rgb(0, 0, 0) 40%, rgba(0, 0, 0, 0.459) 60%, rgba(0, 0, 0, 0.253) 70%, transparent);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 700px;
  padding-left: 6%;
  margin-left: 0;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.2rem); 
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeInLeft 0.8s ease-out forwards;
}


@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px); /* Magsisimula sa 50px mula sa kaliwa */
  }
  to {
    opacity: 1;
    transform: translateX(0);    /* Pupunta sa orihinal na pwesto */
  }
}

.hero-title { 
  font-size: clamp(2rem, 4vw, 3.5rem); 
  margin: 0.5rem 0; 
  font-weight: 700; 
  line-height: 1.1; 
    opacity: 0;
  animation: fadeInLeft .8s ease-out forwards;
}

.hero-description { 
  font-size: clamp(1rem, 1.9vw, 1.2rem); 
  margin-bottom: 2rem; 
  color: #e0e0e0; 
      opacity: 0;
  animation: fadeInLeft .9s ease-out forwards;
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 25px;
  background-color: #D5481B;
  color: #fff;
  text-decoration: none;
  padding: 0.8rem 2rem;
  font-weight: bold;
  transition: 0.8s ease;
}

.btn:hover { background-color: #1e1e1e; border: 1px solid #D5481B; }

/* ============================================
   PRODUCTS & SERVICES
============================================ */
.products-services { 
  padding: 4rem 5%; 
  background: #fcfcfc; 
  text-align: center; 
}

.products-services h2 { 
  color: #D5481B; 
  font-size: clamp(1.8rem, 3vw, 2.5rem); 
  margin-bottom: 3rem; 
}

.boxes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.box {
  background: white;
  border-radius: 8px;
  flex: 1 1 250px;
  max-width: 380px;
  text-align: left;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;


}


.box a { text-decoration: none; color: inherit; flex-grow: 1; display: flex; flex-direction: column;}
.box:hover { transform: translateY(-10px); box-shadow: 0 8px 20px rgba(213, 72, 27, 0.15); }
.box img { width: 100%; height: 200px; object-fit: cover; border-bottom: 4px solid #D5481B; }
.box h3 { padding: 1.5rem 1rem 0.5rem; margin: 0; font-size: 1.1rem; color: #1e1e1e; }
.box p { padding: 0 1rem 1.5rem; margin: 0; font-size: 0.95rem; color: #555; flex-grow: 1; }

.btn-view-more {
  /* 1. Eto ang pinaka-importante: Gawing block para gumana ang auto margin */
  display: block; 
  width: fit-content; /* Para hindi niya sakupin ang buong width ng screen */
  margin: 3rem auto;  /* Ang "auto" sa left at right ang magpapagitna sa kanya */
  padding: 0.8rem 2.5rem;
  color: #fff; 
  background-color: #D5481B;
  border-radius: 25px; 
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s ease;
  text-align: center; /* Siguradong gitna ang text sa loob */
}

.btn-view-more:hover { 
  background: #1e1e1e; 
}

/* ============================================
    ANIMATED LINE DIVIDER
============================================ */
.section-divider {
  width: 0%; /* Magsisimula sa walang lapad */
  height: 2px;
  background: linear-gradient(to right, transparent, #D5481B, transparent);
  margin: 2rem auto; /* Spacing sa taas at baba */
  opacity: 0;
  transition: width 1.5s ease-out, opacity 1s ease-out;
  /* Animation trigger pagka-scroll (Modern Browsers) */
  animation: growLine 1.5s ease-out forwards;
  animation-timeline: view();
  animation-range: entry 10% cover 30%;
}

@keyframes growLine {
  from {
    width: 0%;
    opacity: 0;
  }
  to {
    width: 80%; /* Hahaba hanggang 80% ng screen */
    opacity: 1;
  }
}

/* Fallback para sa mga lumang browser na walang animation-timeline */
.section-divider {
  width: 80%;
  max-width: 1200px;
}

/* ============================================
   COMPANY OVERLAY SECTION (IMPROVISED)
============================================ */
.image-overlay-section {
  max-width: 1500px; /* Mas malapad para sa modern screens */
  margin: 6rem auto;
  padding: 0 5%;
  display: flex;
  gap: 5rem; /* Mas malaking gap para sa "breathable" design */
  align-items: stretch; /* Pantay ang height ng image at text area */
  flex-wrap: wrap; /* Para kusa silang bumaba sa mobile */
}

.image-card {
  position: relative;
  flex: 1.5; /* MAXIMIZED: Mas malaki ang image kaysa sa text (approx 60/40) */
  min-width: 320px; /* Hindi magiging sobrang liit sa tablets */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.12);
  transition: transform 0.3s ease;
}

.image-card:hover {
  transform: translateY(-5px); /* Konting angat sa hover */
}

.image-card img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; /* Siguradong hindi stretch ang image */
  display: block; 
}

.overlay-content {
  position: absolute; 
  bottom: 0; 
  left: 0; 
  width: 100%;
  background: linear-gradient(transparent, rgba(30, 30, 30, 0.95)); /* Gradient para mas premium */
  color: #fff; 
  padding: 2.5rem 1.5rem 1.5rem; 
  text-align: center;
}

.overlay-content h3 {
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.btn-learn-more { 
  display: inline-block; 
  color: #D5481B; 
  text-decoration: none; 
  font-weight: 700; 
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-learn-more:hover { text-decoration: underline; }

/* Right Text Column */
.text-column { 
  flex: 1; /* Mas maliit nang konti sa image card */
  min-width: 320px;
  display: flex; 
  flex-direction: column; 
  justify-content: center; /* Naka-center ang text vertically */
}

.text-column h2 { 
  color: #D5481B; 
  font-size: clamp(2rem, 3vw, 2.5rem); 
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.text-column p { 
  color: #444; 
  line-height: 1.8; 
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.btn-about {
  display: inline-block; 
  padding: 0.9rem 2.5rem;
  background-color: #D5481B; 
  color: #fff;
  border-radius: 50px; /* Pill shape para sa modern look */
  text-decoration: none;
  align-self: flex-start; 
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid #D5481B;
}

.btn-about:hover { 
  background-color: transparent; 
  color: #D5481B; 
}

/* ============================================
    VIDEO SECTION (Title on Top)
============================================ */


.bg-video { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  display: block; 
}

.video-container { 
  width: 100%; 
  border-radius: 12px; 
  overflow: hidden; 
}

.video-container video { 
  width: 100%; 
  height: auto; 
  display: block; 
}

/* Re-using your fadeInUp animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ============================================
   FOOTER
============================================ */
.footer { background-color: #31353c; color: #fff; padding: 4rem 5% 0; }
.footer-container { max-width: 1200px; margin: 0 auto; display: flex; gap: 3rem; flex-wrap: wrap; padding-bottom: 3rem; }
.footer-column { flex: 1; min-width: 250px; }
.footer-column h3 { color: #D5481B; margin-bottom: 1.5rem; font-size: 1.3rem; }
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column ul li { margin-bottom: 0.8rem; }
.footer-column a { color: #ddd; text-decoration: none; transition: 0.3s ease; }
.footer-column a:hover { color: #D5481B; }
.map-container { border-radius: 8px; overflow: hidden; margin-bottom: 1rem; }
.footer-bottom { background-color: #D5481B; text-align: center; padding: 1.5rem; margin: 0 -5.5%; }



/* ============================================
   RESPONSIVE DESIGN (TABLETS & MOBILE)
============================================ */

/* TABLET (Max-width 1024px) */
@media (max-width: 1024px) {
  .subbar-links { gap: 1rem; }
  .image-overlay-section { flex-direction: column; gap: 2rem; }
  .image-card, .text-column { width: 100%; }
}

/* MOBILE (Max-width 768px) */
@media (max-width: 768px) {
  /* Hide Desktop Nav, Show Hamburger */
  .subbar-links, .search-box { display: none; }
  .hamburger-icon-button { display: flex; }
  
  /* Topbar stacking */
  .topbar { flex-direction: column; gap: 0.5rem; padding: 1rem 5%; text-align: center; }

  /* Hero Section */
  .hero { padding: 6rem 5%; text-align: center; }
  .hero-video { width: 100%; }
  .hero-overlay { background: rgba(0,0,0,0.7); /* Darker overlay for mobile */ }
  .hero-content { margin: 0 auto; }

  /* Change Hamburger to "X" when open */
  .hamburger-icon-button.open .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger-icon-button.open .bar:nth-child(2) { opacity: 0; }
  .hamburger-icon-button.open .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .video-section {
    padding: 3rem 5%;
  }
  .video-content-wrapper {
    gap: 1.2rem;
  }
}