/*
Theme Name: Viettonkin Law Theme
Author: Antigravity
Description: A custom premium WordPress theme with a dark/blue corporate aesthetic for legal services.
Version: 1.0.0
*/

:root {
  --color-primary: #006eb9;
  --color-primary-hover: #005a98;
  --color-secondary: #0a192f;
  --color-secondary-light: #112240;
  --color-dark: #020c1b;
  --color-light: #f8fafc;
  --color-white: #ffffff;
  --color-gray: #8892b0;
  --color-gray-light: #ccd6f6;
  --color-border: #e2e8f0;
  
  --font-main: 'Google Sans', sans-serif;
  
  --container-width: 1200px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-light);
  color: var(--color-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-secondary);
}

.section-subtitle {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 3rem;
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 8px; /* Changed from 4px to more rounded 8px */
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 0.95rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-secondary);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 15px 0;
  background-color: #192543; /* Match reference image background */
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-brand {
  display: flex;
  align-items: center;
  color: var(--color-white);
  font-weight: 700;
  font-size: 1.5rem;
}

.site-brand img {
  min-width: 140px;
  width: auto;
  height: auto;
  max-height: 40px;
  object-fit: contain;
}

.site-brand i {
  color: var(--color-primary);
  font-size: 1.8rem;
  margin-right: 10px;
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-menu-wrapper {
  display: contents; /* Keep original flex structure on desktop */
}

.mobile-menu-close {
  display: none; /* Hidden on desktop */
}

.mobile-lang-toggle {
  display: none !important; /* Hidden on desktop, overriding base .lang-toggle flex */
}

.nav-list {
  display: flex;
  gap: 35px;
}

.nav-list li a {
  color: var(--color-white);
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 1;
}

.nav-list li a:hover, .nav-list li a.active {
  color: #0dc1fb; /* Match bright blue from reference */
}

.header-actions {
  display: flex;
  align-items: center;
  margin-left: 30px;
}

.mobile-menu-toggle {
  display: none; /* Hidden by default on desktop */
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 5px;
  margin-left: 15px; /* Space from right edge if needed */
}

.lang-toggle {
  display: flex;
  align-items: center;
  background: #f8f9fc;
  border-radius: 30px;
  padding: 4px;
  width: 96px;
  justify-content: space-between;
}

.lang-toggle span {
  width: 44px;
  padding: 4px 0;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
  color: var(--color-secondary);
  cursor: pointer;
  font-weight: 700;
  border-radius: 20px;
  transition: var(--transition);
}

.lang-toggle span.active {
  background: #006eb9;
  color: var(--color-white);
}

/* ==========================================================================
   Hero Section & Cases
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 80vh;
  background-image: url('assets/images/hero-background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 220px; /* Added padding to give more breathing space before cases section */
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(10, 25, 47, 0.9) 0%, rgba(10, 25, 47, 0.4) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  color: var(--color-white);
}

.hero-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}

.hero-left {
  max-width: 700px;
}

.hero-right {
  max-width: 420px;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: #0dc1fb;
  margin-bottom: 25px;
  display: block;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0px; 
}

.hero-description {
  font-size: 1.05rem;
  color: #f1f5f9;
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 25px;
  max-width: 100%;
}

.btn-hero {
  background-color: #006eb9;
  width: 100%;
  padding: 14px 24px;
  font-size: 1.05rem;
}

/* Cases Overlay */
.cases-wrapper {
  position: relative;
  margin-top: -150px;
  z-index: 10;
  background: #ffffff;
}

.case-study-row {
  display: flex;
  width: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 1;
}

.case-study-row:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.case-study-col-1 {
  width: 40%;
  background-color: #094777;
  padding: 80px 120px 80px 40px;
  padding-left: max(20px, calc((100vw - 1200px) / 2));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.case-study-col-1 .case-number {
  color: #0dc1fb;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  display: block;
}

.case-study-col-1 .case-title {
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.case-study-col-2 {
  width: 60%;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  padding: 80px 60px;
  padding-right: max(20px, calc((100vw - 1200px) / 2));
}

.case-content-overlay {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.case-study-row.reverse {
  flex-direction: row-reverse;
}

.case-study-row.reverse .case-study-col-1 {
  padding-left: 120px;
  padding-right: max(20px, calc((100vw - 1200px) / 2));
}

.case-study-row.reverse .case-study-col-2 {
  padding-right: 60px;
  padding-left: max(20px, calc((100vw - 1200px) / 2));
}

.case-content-overlay .case-desc {
  color: #ffffff;
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 30px;
  font-weight: 500;
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services-section {
  padding: 100px 0 0 0;
  background-color: var(--color-white);
}

.services-grid {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: stretch;
}

.service-card {
  position: relative;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px 30px;
  color: var(--color-white);
  transition: min-height 0.3s ease, margin-top 0.3s ease, box-shadow 0.3s ease;
  flex: 1; 
  min-height: 550px;
  margin-top: 10px; /* Base margin to allow room for hover growth */
}

.service-card:hover {
  min-height: 560px; /* Grow taller */
  margin-top: 0;     /* Pulls the top edge up, keeps bottom anchored */
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.service-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition: transform 0.5s ease;
}

.service-card:hover .service-bg {
  transform: scale(1.05);
}

.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(1, 28, 42, 1) 0%, rgba(1, 28, 42, 0.5) 50%, rgba(1, 28, 42, 0) 100%);
  z-index: 1;
}

.service-content {
  position: relative;
  z-index: 2;
}

.service-icon {
  font-size: 2rem;
  margin-bottom: auto;
  position: absolute;
  top: 30px;
  left: 30px;
  z-index: 2;
}

.service-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.3;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--color-gray-light);
  margin-bottom: 25px;
  opacity: 0.9;
}

/* ==========================================================================
   Team Section
   ========================================================================== */
.team-section {
  padding: 100px 0 120px;
  background-color: #0b1120; /* Dark background matching reference */
  color: var(--color-white);
}

.team-section .section-title {
  color: var(--color-white);
  margin-bottom: 10px;
}

.team-subtitle {
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #0DC1FB; /* Cyan as requested */
  font-size: 0.85rem;
  font-weight: 700;
  display: block;
  margin-bottom: 50px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px; /* Tighter gap matching reference */
}

.team-member {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
}

.team-image {
  width: 100%;
  height: 600px; /* Increased height so faces aren't covered by text boxes */
  object-fit: cover;
  object-position: top center; /* Ensure face is fully visible */
  background-color: transparent;
}

.team-info {
  background: #0076c0; /* Strict reference blue */
  padding: 30px 25px;
  position: absolute;
  bottom: 0;
  right: 0;
  left: auto;
  width: 85%;
  border-top-left-radius: 24px;
  /* Normalize heights so all cards look consistent */
  min-height: 220px; 
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Alternate colors for team info cards */
.team-member:nth-child(even) .team-info {
  background: #1a2540; /* Strict reference navy */
  border: none;
}



.team-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--color-white);
}

.team-role {
  font-size: 0.9rem; /* Increased font size */
  color: #e2e8f0;
  margin-bottom: 15px;
  line-height: 1.4;
}

.team-desc {
  font-size: 0.95rem; /* Increased font size */
  color: #e2e8f0;
  opacity: 1;
  line-height: 1.5;
}

/* ==========================================================================
   Insights Section
   ========================================================================== */
.insights-section {
  padding: 100px 0;
  background-color: var(--color-light);
}

.insight-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.insight-card {
  display: flex;
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  transition: var(--transition);
}

.insight-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.insight-image {
  width: 300px;
  height: auto; /* Let it stretch to the container height */
  min-height: 100%; /* Ensure it fills the vertical space */
  object-fit: cover;
  flex-shrink: 0;
}

.insight-content {
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.insight-category {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(0, 102, 204, 0.1);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 15px;
  align-self: flex-start;
}

.insight-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--color-secondary);
}

.insight-readmore {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  margin-top: auto;
}

.insight-readmore i {
  margin-left: 8px;
  transition: var(--transition);
}

.insight-card:hover .insight-readmore i {
  transform: translateX(5px);
}

.insights-action {
  margin-top: 40px;
  text-align: center;
}

.insights-action .btn {
  width: 100%;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-section {
  padding: 100px 0;
  background-color: var(--color-white);
  border-top: 1px solid var(--color-border);
}

.contact-wrapper {
  max-width: 800px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 8px;
}

.form-control {
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid var(--color-border);
  font-family: inherit;
  font-size: 1rem;
  background: transparent;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-bottom-color: var(--color-primary);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
}

.form-checkbox label {
  display: flex;
  align-items: center;
  font-weight: 400;
  margin-bottom: 0;
  cursor: pointer;
}

.form-checkbox input {
  margin-right: 8px;
}

.form-submit {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: #0b1120;
  background-image: url('assets/images/footer.jpg');
  background-size: cover;
  background-position: center;
  color: var(--color-gray-light);
  padding: 80px 0 40px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 60px;
}

.footer-brand {
  margin-bottom: 20px;
}

.footer-brand .site-brand {
  font-size: 2rem;
  margin-bottom: 15px;
}

.footer-desc {
  font-size: 0.95rem;
  max-width: 300px;
  line-height: 1.6;
  margin-bottom: 25px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  color: white;
  border-radius: 4px;
}

.social-links a:hover {
  background: white;
  color: var(--color-primary);
}

.footer-title {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav a {
  font-size: 0.9rem;
  color: var(--color-gray-light);
}

.footer-nav a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .site-header {
    background-color: #1a2540; /* Darker header matching reference */
  }

  /* Hide default nav-list, show only inside sidebar */
  nav.main-nav > .nav-list { display: none; }
  /* Sidebar styling */
  .nav-menu-wrapper {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: #0b1120;
    display: flex;
    flex-direction: column;
    padding: 30px;
    z-index: 1000;
    transition: right 0.4s ease;
    box-shadow: -5px 0 30px rgba(0,0,0,0.5);
  }

  .nav-menu-wrapper.active {
    right: 0;
  }

  .mobile-menu-close {
    display: block !important; /* Ensure it overrides base hidden state */
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
    z-index: 9999;
  }

  .nav-menu-wrapper .nav-list { 
    display: flex; 
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
  }
  
  .nav-list li a {
    font-size: 1.1rem;
  }
  
  /* Language toggle adjustments */
  .desktop-lang-toggle { display: none; }
  .mobile-lang-toggle { 
    display: flex !important; 
    align-self: flex-start;
    margin-top: 50px;
    background-color: #ffffff;
    border-radius: 30px;
    overflow: hidden;
  }
  
  .mobile-lang-toggle span { color: #0b1120; font-weight: 700; }
  .mobile-lang-toggle span.active { background-color: #0076c0; color: #ffffff; }
  
  /* Show Mobile Menu Toggle */
  .mobile-menu-toggle {
    display: block !important;
  }

  .hero-section { padding-bottom: 80px; }
  .hero-grid { flex-direction: column; align-items: flex-start; gap: 30px; }
  .hero-left, .hero-right { max-width: 100%; }
  .hero-title { font-size: 3rem; }
  .case-study-row, .case-study-row.reverse { flex-direction: column; }
  .case-study-col-1, .case-study-col-2,
  .case-study-row.reverse .case-study-col-1,
  .case-study-row.reverse .case-study-col-2 { width: 100%; padding: 60px 20px; }
  .cases-wrapper { margin-top: 0; }
  
  /* Mobile Stacked Services Cards Accordion */
  .services-grid { 
    flex-direction: column; 
    align-items: stretch; 
    gap: 0; 
  }
  .service-card {
    border-radius: 20px 20px 0 0;
    min-height: 240px; /* Collapsed Height increased to prevent overlap */
    padding: 30px 30px; /* Slightly reduce padding on mobile */
    cursor: pointer;
    transition: all 0.4s ease;
  }
  
  /* Accordion Hide */
  .service-card .service-desc,
  .service-card .btn {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    padding: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    border: none;
  }
  
  /* Accordion Show */
  .service-card.active {
    min-height: 520px; /* Expanded Height */
    padding-bottom: 100px; /* Add extra breathing space for the button */
  }
  .service-card.active .service-desc {
    opacity: 1;
    max-height: 300px;
    margin-bottom: 25px;
  }
  .service-card.active .btn {
    opacity: 1;
    max-height: 50px;
    padding: 10px 20px;
  }

  /* Overlapping Layout */
  .service-card + .service-card {
    margin-top: -30px;
    box-shadow: 0 -15px 30px rgba(13, 193, 251, 0.4);
  }
  .service-card:nth-child(1) { z-index: 1; }
  .service-card:nth-child(2) { z-index: 3; } 
  .service-card:nth-child(3) { z-index: 5; }
  
  /* Hover overrides for mobile to prevent layout jumping */
  .service-card:nth-child(1):hover {
    min-height: 240px;
    margin-top: 10px;
    box-shadow: none;
  }
  .service-card:nth-child(2):hover,
  .service-card:nth-child(3):hover {
    min-height: 240px;
    margin-top: -30px;
    box-shadow: 0 -15px 30px rgba(13, 193, 251, 0.4);
  }
  .service-card:nth-child(1).active:hover,
  .service-card:nth-child(2).active:hover,
  .service-card:nth-child(3).active:hover {
    min-height: 520px;
  }

  /* Solid button style for mobile */
  .service-card .btn {
    background-color: #0076c0 !important;
    color: #ffffff !important;
    border-radius: 6px;
    display: inline-flex;
    width: max-content;
  }
  .service-card .btn:hover {
    background-color: #005a93 !important;
  }

  .team-grid { grid-template-columns: repeat(2, 1fr); }
  
  /* Increase portrait height on tablet so names don't cover faces */
  .team-image { height: 850px; }
  
  /* Shrink info box slightly to prevent extending too far up the face */
  .team-info {
    min-height: auto; 
    padding: 20px 15px; 
  }
  
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  .services-grid, .team-grid { grid-template-columns: 1fr; }
  .insight-card { flex-direction: column; }
  .insight-image { width: 100%; }
  .contact-form { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: center; gap: 15px; }
}
