/* ==========================================================================
   BINH ĐOÀN 19 — RESPONSIVE STYLESHEET
   Tested for: 1440, 1280, 1024, 768, 430, 390, 375
   ========================================================================== */

/* Laptops & Small Desktops (max-width: 1280px) */
@media (max-width: 1280px) {
  .nav-list {
    gap: 12px;
  }
  .nav-link {
    font-size: 0.81rem;
    padding: 6px 1px;
  }
  .header-actions {
    gap: 12px;
  }
  .header-hotline {
    font-size: 0.86rem;
  }
  .btn-cta-nav {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

@media (max-width: 1120px) {
  .header-hotline span {
    display: none;
  }
  .nav-list {
    gap: 8px;
  }
  .nav-link {
    font-size: 0.78rem;
  }
}

/* Large Tablets & Small Laptops (max-width: 1200px) */
@media (max-width: 1200px) {
  .hero-title {
    font-size: 3rem;
  }

  .partner-wall {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .footer-top {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 30px;
  }
}

/* Medium Tablets (max-width: 992px) */
@media (max-width: 992px) {
  .hero-slider-container {
    height: 75vh;
    min-height: 580px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

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

  .split-image-wrap img {
    height: 380px;
  }

  .pillar-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

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

  .solution-grid .solution-card:nth-child(4),
  .solution-grid .solution-card:nth-child(5) {
    grid-column: span 1;
  }

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

  .project-grid.featured-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  /* Project Detail Responsive */
  .project-detail-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .project-strip-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

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

  /* Mobile Navigation Menu */
  .mobile-toggle {
    display: block;
  }

  .header-container {
    height: 72px;
  }

  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    height: calc(100vh - 72px);
    background-color: var(--bd19-navy);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px 40px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid var(--bd19-border-dark);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }

  .main-nav.is-open {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0;
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-link {
    width: 100%;
    padding: 14px 4px;
    font-size: 1.05rem;
    font-weight: 600;
    justify-content: space-between;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background-color: rgba(0, 0, 0, 0.25);
    box-shadow: none;
    border: none;
    border-radius: 6px;
    padding: 8px 12px 14px;
    margin: 4px 0 12px;
    display: none;
  }

  .has-dropdown.open .dropdown-menu {
    display: block;
  }

  .dropdown-item {
    padding: 10px 8px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  }

  .dropdown-item:last-child {
    border-bottom: none;
  }

  .header-actions .btn-cta-nav {
    display: none;
  }

  /* Quick Mobile Header Hotline Call Icon */
  .header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .header-hotline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    padding: 0;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
    transition: transform 0.2s ease;
  }

  .header-hotline:hover {
    transform: scale(1.08);
  }

  .header-hotline span {
    display: none !important;
  }

  .header-hotline i {
    font-size: 1.05rem;
    margin: 0;
  }

  /* Drawer Footer Info */
  .nav-drawer-footer {
    width: 100%;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex !important;
    flex-direction: column;
    gap: 12px;
  }

  .nav-drawer-footer .drawer-hotline {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
  }

  .nav-drawer-footer .drawer-hotline i {
    color: #10b981;
    font-size: 1.15rem;
  }

  .nav-drawer-footer .btn-cta-nav {
    display: block !important;
    width: 100%;
    text-align: center;
    padding: 13px;
    font-size: 0.95rem;
  }
}

/* Small Tablets & Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  body {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); /* Dynamic Offset for Mobile Bottom Bar */
  }

  .header-container {
    height: 64px;
  }

  .main-nav {
    top: 64px;
    height: calc(100vh - 64px);
  }

  .section {
    padding-top: 45px;
    padding-bottom: 45px;
  }

  .section-title {
    font-size: clamp(1.5rem, 5vw, 1.85rem);
    line-height: 1.3;
    margin-bottom: 10px;
  }

  .section-subtitle {
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 30px;
  }

  .hero-slider-container {
    height: auto;
    min-height: 480px;
    padding-bottom: 40px;
  }

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

  .hero-eyebrow {
    font-size: 0.8rem;
    letter-spacing: 1.8px;
    margin-bottom: 12px;
  }

  .hero-title {
    font-size: clamp(1.45rem, 5.5vw, 1.85rem);
    line-height: 1.25;
    margin-bottom: 14px;
    word-break: break-word;
  }

  .hero-subtitle {
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 22px;
  }

  .hero-arrows {
    display: none;
  }

  .hero-dots {
    bottom: 16px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    padding: 13px 18px;
    font-size: 0.9rem;
  }

  .material-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .solution-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .solution-thumb {
    height: 190px;
  }

  .solution-body {
    padding: 20px 18px;
  }

  .solution-title {
    font-size: 1.15rem;
    line-height: 1.35;
  }

  .solution-desc {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .project-thumb {
    height: 210px;
  }

  .project-overlay {
    opacity: 0;
    pointer-events: none;
  }

  .project-body {
    padding: 20px 18px;
  }

  .project-name {
    font-size: 1.15rem;
    line-height: 1.35;
  }

  .project-desc {
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 14px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .news-thumb {
    height: 185px;
  }

  .news-body {
    padding: 20px 18px;
  }

  .news-title {
    font-size: 1.12rem;
    line-height: 1.4;
  }

  /* 4-Column Compact Partner Wall (20 Logos = 5 Rows of 4) */
  .partner-wall {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .partner-card {
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    padding: 6px 10px;
    border-radius: 6px;
  }

  .partner-card img {
    max-height: 36px;
    max-width: 90%;
    width: auto;
    object-fit: contain;
  }

  .why-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .why-card {
    padding: 20px 18px;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 16px;
  }

  .why-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    font-size: 1.3rem;
    margin: 0;
  }

  .why-title {
    font-size: 1rem;
    margin-bottom: 4px;
  }

  .why-desc {
    font-size: 0.86rem;
    line-height: 1.5;
  }

  .benefit-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 40px;
    padding-bottom: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding-top: 18px;
    font-size: 0.8rem;
  }

  .contact-cta-inner {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .contact-cta-text h2 {
    font-size: 1.45rem;
    line-height: 1.3;
  }

  .contact-cta-text p {
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .contact-cta-btns {
    justify-content: center;
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .contact-cta-btns .btn {
    width: 100%;
    padding: 13px 18px;
  }

  /* Fixed Mobile Bottom Bar */
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #071b33;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 9999;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
  }

  .mobile-bottom-bar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.68rem;
    font-weight: 600;
    text-decoration: none;
    gap: 3px;
    transition: all 0.2s ease;
  }

  .mobile-bottom-bar a i {
    font-size: 1.1rem;
  }

  .mobile-bottom-bar a:active {
    background-color: rgba(255, 255, 255, 0.12);
  }

  .mobile-bottom-bar a.bar-call {
    color: #ffffff;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  }

  .mobile-bottom-bar a.bar-zalo {
    color: #ffffff;
    background: linear-gradient(135deg, #0088ff 0%, #0066cc 100%);
  }

  .mobile-bottom-bar a.bar-quote {
    color: #071b33;
    background: linear-gradient(135deg, #e5a93b 0%, #d4af37 100%);
    font-weight: 700;
  }
}

/* Phones (max-width: 480px) */
@media (max-width: 480px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-slider-container {
    height: auto;
    min-height: 460px;
    padding-bottom: 36px;
  }

  .hero-title {
    font-size: clamp(1.35rem, 5.2vw, 1.65rem);
    line-height: 1.25;
  }

  .hero-subtitle {
    font-size: 0.88rem;
    line-height: 1.48;
  }

  /* Equal-Height Balanced 2x2 Stats Grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    align-items: stretch;
  }

  .stat-box,
  .stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    height: 100%;
    min-height: 148px;
    box-sizing: border-box;
    border-radius: 8px;
  }

  .stat-icon-wrap {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    font-size: 1.35rem;
    margin: 0 auto 8px auto;
  }

  .stat-number {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
  }

  .stat-label {
    font-size: 0.74rem;
    line-height: 1.35;
    height: 2.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0;
  }

  .project-strip-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .project-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .project-main-box {
    padding: 20px 14px;
  }

  .project-main-featured-img {
    height: 220px;
    margin-bottom: 16px;
  }

  /* 4-Column Compact Partner Wall (20 Logos = 5 Rows of 4) */
  .partner-wall {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .partner-card {
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    padding: 4px 6px;
    border-radius: 6px;
  }

  .partner-card img {
    max-height: 28px;
    max-width: 90%;
  }

  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .cert-card {
    padding: 10px;
  }

  .cert-thumb {
    height: 180px;
  }

  .cert-card h3 {
    font-size: 0.82rem;
  }

  .logo-brand-wrap {
    width: 32px;
    height: 32px;
    max-width: 32px;
    max-height: 32px;
    padding: 2px;
    border-radius: 5px;
  }

  .brand-logo-img {
    max-width: 26px;
    max-height: 26px;
  }

  .logo-text-title {
    font-size: 0.88rem;
    letter-spacing: 0.4px;
  }

  .logo-text-motto {
    font-size: 0.54rem;
    letter-spacing: 0.5px;
  }

  .footer-logo-row {
    gap: 10px;
    margin-bottom: 16px;
  }

  .footer-logo-wrap {
    width: 44px;
    height: 44px;
    min-width: 44px;
    max-width: 44px;
    max-height: 44px;
    background: #ffffff !important;
    border-radius: 8px;
    padding: 5px;
  }

  .footer-logo-text .logo-text-title {
    font-size: 0.95rem;
  }

  .footer-logo-text .logo-text-motto {
    font-size: 0.65rem;
  }
}

@media (max-width: 360px) {
  .logo-text-motto {
    display: none;
  }
  .logo-text-title {
    font-size: 0.84rem;
  }
  .partner-wall {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .partner-card {
    height: 52px;
    min-height: 52px;
  }
  .partner-card img {
    max-height: 28px;
  }
}


/* CV Personnel Matrix Responsive */
@media (max-width: 992px) {
  .cv-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (max-width: 600px) {
  .cv-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .cv-card {
    padding: 20px 16px;
  }
}
