/* Main Styles - Based on maitrivietnam.com */

/* Base Styles */
:root {
  --primary: #8c6239;       /* Terracotta brown */
  --primary-dark: #6a4a2b;  /* Darker brown */
  --secondary: #f5f5f5;     /* Light gray */
  --text-dark: #333333;     /* Dark text */
  --text-light: #777777;    /* Light text */
  --white: #ffffff;
  --black: #000000;
  --border-color: #e0e0e0;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
}

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

body {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
  font-size: 16px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: 2.5rem;
  font-weight: 300;
}

h2 {
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: 1.5rem;
  font-weight: 300;
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-light);
}

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

/* Header */
.site-header {
  padding: var(--spacing-sm) 0;
  background-color: var(--white);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

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

.logo {
  margin-right: var(--spacing-lg);
}

.logo-text {
  font-family: 'Comfortaa', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.logo-text:hover {
  color: var(--primary-dark);
}

.logo-text span {
  color: var(--primary-dark);
}

.logo img {
  height: 40px;
  width: auto;
}

.main-nav {
  display: flex;
}

.nav-list {
  display: flex;
  gap: var(--spacing-md);
  list-style: none;
}

.nav-list a {
  color: var(--text-dark);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

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

/* Hero Section with Background Image */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  margin-top: 60px; /* Account for fixed header */
  overflow: hidden; /* Ensure the blurred image doesn't extend outside */
}

/* Background image with blur effect */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../images/gallery/4.jpeg') no-repeat center center/cover;
  filter: blur(3px) brightness(0.7); /* Add blur and darken slightly */
  z-index: 1;
}

/* Overlay for better text readability */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* Slightly darker overlay */
  z-index: 2;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  padding: var(--spacing-lg) 0;
  position: relative;
  z-index: 3; /* Ensure content is above both the image and overlay */
}

.hero h1 {
  margin-bottom: var(--spacing-md);
  line-height: 1.4;
  color: var(--white);
  font-size: 3.5rem; /* Increased font size */
  font-weight: 500; /* Slightly bolder */
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); /* Enhanced text shadow */
  letter-spacing: 1px; /* Improved letter spacing */
}

.hero p {
  margin-bottom: var(--spacing-lg);
  font-size: 1.3rem; /* Increased font size */
  color: var(--white);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); /* Enhanced text shadow */
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400; /* Slightly bolder */
}

.cta-group {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  border: 1px solid var(--primary);
}

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

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

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

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

/* Make CTA buttons more prominent */
.hero .btn {
  padding: 1rem 2.5rem; /* Larger buttons */
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); /* Add shadow to buttons */
}

/* About TRE Section */
.about-tre {
  padding: var(--spacing-xl) 0;
  background-color: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 400;
}

.subtitle {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.9rem;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
}

.text-content {
  max-width: 900px;
  margin: 0 auto var(--spacing-lg);
  text-align: center;
}

.lead {
  font-size: 1.4rem;
  margin-bottom: var(--spacing-md);
  color: var(--primary);
  font-weight: 500;
  line-height: 1.6;
}

.text-content p {
  margin-bottom: var(--spacing-md);
  line-height: 1.8;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-dark);
}

/* Video and Benefits Container */
.video-benefits-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
}

/* Benefits List */
.benefits-list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.benefit-item {
  text-align: left;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  background-color: var(--secondary);
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--spacing-sm);
}

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

.benefit-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.benefit-icon {
  margin-right: var(--spacing-sm);
  font-size: 1.5rem; /* Smaller icon */
  color: var(--primary);
  min-width: 40px;
  text-align: center;
}

.benefit-content h3 {
  font-size: 1.1rem; /* Smaller heading */
  margin-bottom: 0.3rem; /* Reduced margin */
  font-weight: 500;
  color: var(--primary-dark);
}

.benefit-content p {
  margin-bottom: 0;
  font-size: 0.9rem; /* Smaller text */
  line-height: 1.5;
}

/* Video Content */
.video-content {
  display: flex;
  align-items: center;
  height: 100%;
}

.video-wrapper {
  position: relative;
  padding-bottom: 65%;
  height: 0;
  width: 100%;
  overflow: hidden;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Global Network */
.global-network {
  padding: var(--spacing-xl) 0;
  background-color: var(--secondary);
}

.network-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--spacing-md);
}

.country-card {
  background-color: var(--white);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  padding: var(--spacing-md);
}

.country-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.country-info h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
}

.flag {
  margin-right: 8px;
  font-size: 1.2rem;
}

.contact-person {
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.country-info p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.country-info a {
  color: var(--primary);
  font-weight: 500;
  font-size: 0.9rem;
  display: inline-block;
  margin-top: 0.5rem;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.country-info a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Contact Section */
.contact {
  padding: var(--spacing-xl) 0;
  background-color: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--spacing-lg);
}

.contact-info {
  display: grid;
  gap: var(--spacing-md);
}

.info-item {
  text-align: center;
  padding: var(--spacing-md);
  border: 1px solid var(--border-color);
}

.info-item i {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: var(--spacing-sm);
}

.contact-form {
  display: grid;
  gap: var(--spacing-md);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  font-family: inherit;
  font-size: 0.9rem;
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* Footer */
.site-footer {
  padding: 10px 0;  /* Reduced padding for smaller height */
  background-color: var(--text-dark);
  color: var(--white);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;  /* Remove bottom margin */
}

.footer-content p {
  margin-bottom: 0;  /* Remove paragraph margin */
  color: var(--text-light);
  font-size: 0.9rem;
}

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

.social-links a {
  color: var(--white);
  font-size: 1.2rem;
}

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

/* Responsive Design */
/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
  .container {
    max-width: 960px;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  .hero p {
    font-size: 1.2rem;
  }
  
  .video-benefits-container {
    gap: var(--spacing-md);
  }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
  .container {
    max-width: 720px;
  }
  
  .site-header .container {
    flex-wrap: wrap;
  }
  
  .logo {
    margin-right: 0;
    margin-bottom: var(--spacing-sm);
  }
  
  .video-benefits-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .benefits-list {
    order: 2;
  }
  
  .video-content {
    order: 1;
    height: auto;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .gallery-container {
    max-width: 700px;
  }
  
  .mission-vision-card {
    padding: var(--spacing-sm);
  }
  
  .network-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
  :root {
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
  }
  
  .container {
    max-width: 540px;
  }
  
  .site-header {
    padding: 15px 0;
    position: relative;
  }
  
  .site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* Ensure positioning context */
  }
  
  .logo {
    z-index: 1001;
  }
  
  /* Force display for mobile toggle */
  .nav-toggle {
    display: block !important; /* Force display on mobile */
    position: absolute;
    right: 15px;
    top: 15px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    z-index: 9999; /* Very high z-index to ensure visibility */
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    z-index: 1000;
  }
  
  .main-nav.active {
    display: block;
  }
  
  .nav-list {
    flex-direction: column;
    padding: 1rem 0;
    margin: 0;
  }
  
  .nav-list li {
    width: 100%;
    text-align: center;
    margin: 0;
  }
  
  .nav-list a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--text-dark);
  }
  
  .hero {
    height: auto;
    min-height: 80vh;
    padding: var(--spacing-xl) 0;
  }
  
  .hero h1 {
    font-size: 2.2rem;
    margin-bottom: var(--spacing-sm);
  }
  
  .hero p {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
  }
  
  .hero .btn {
    padding: 0.8rem 2rem;
  }
  
  .section-header h2 {
    font-size: 1.8rem;
  }
  
  .lead {
    font-size: 1.2rem;
  }
  
  .text-content p {
    font-size: 1rem;
  }
  
  .gallery-container {
    max-width: 100%;
  }
  
  .gallery-wrapper {
    padding-bottom: 75%; /* Adjusted for mobile */
  }
  
  .mission-vision-content {
    gap: var(--spacing-sm);
  }
  
  .mission-vision-card h3 {
    font-size: 1.3rem;
  }
  
  .mission-vision-quote {
    font-size: 1rem;
  }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  :root {
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 3.5rem;
  }
  
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .hero {
    min-height: 70vh;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .cta-group {
    flex-direction: column;
    width: 100%;
    gap: var(--spacing-xs);
  }
  
  .btn {
    width: 100%;
    text-align: center;
    padding: 0.7rem 1.5rem;
    font-size: 0.8rem;
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
  
  .subtitle {
    font-size: 0.8rem;
  }
  
  .lead {
    font-size: 1.1rem;
  }
  
  .benefit-item {
    padding: var(--spacing-xs) var(--spacing-sm);
  }
  
  .benefit-content h3 {
    font-size: 1rem;
  }
  
  .benefit-content p {
    font-size: 0.85rem;
  }
  
  .gallery-wrapper {
    padding-bottom: 100%; /* Square aspect ratio for mobile */
  }
  
  .gallery-dots {
    margin-top: 1rem;
  }
  
  .gallery-dot {
    width: 8px;
    height: 8px;
  }
  
  .mission-vision-card {
    padding: var(--spacing-sm);
  }
  
  .mission-vision-card h3 {
    font-size: 1.2rem;
  }
  
  .mission-vision-card p {
    font-size: 0.9rem;
  }
  
  .country-card {
    padding: var(--spacing-sm);
  }
  
  .country-info h3 {
    font-size: 1.1rem;
  }
  
  .footer-content {
    flex-direction: column;
    gap: var(--spacing-xs);
    text-align: center;
  }
  
  .footer-content p {
    margin-bottom: var(--spacing-xs);
  }
  
  .social-links {
    justify-content: center;
  }
}

/* Fix for very small devices */
@media (max-width: 359.98px) {
  .hero h1 {
    font-size: 1.6rem;
  }
  
  .nav-list {
    gap: var(--spacing-xs);
  }
  
  .nav-list a {
    font-size: 0.75rem;
  }
}

/* Gallery Section - Simplified */
.gallery {
  padding: var(--spacing-xl) 0;
  background-color: #f8d5c5; /* Peachy background color */
}

.gallery-container {
  max-width: 900px; /* Increased from 600px to 900px */
  margin: 0 auto;
  position: relative;
}

.gallery-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  width: 100%;
  height: 0;
  padding-bottom: 66.67%; /* Adjusted for a 3:2 aspect ratio */
}

.gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-slide.active {
  opacity: 1;
}

.gallery-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover; /* Changed from contain to cover */
  border-radius: 5px;
  width: 100%; /* Added to ensure image fills the container */
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 1.5rem; /* Increased from 1rem */
}

.gallery-dot {
  width: 10px; /* Increased from 10px */
  height: 10px; /* Increased from 10px */
  border-radius: 50%;
  background-color: #ddd;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.gallery-dot.active {
  background-color: var(--primary);
}

/* Mission & Vision Section - Refined */
.mission-vision {
  padding: var(--spacing-lg) 0;
  background-color: #f5f1e8; /* Warmer, more natural background */
  position: relative;
}

.mission-vision::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%238c6239' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
  z-index: 1;
}

.mission-vision .container {
  position: relative;
  z-index: 2;
  max-width: 800px; /* Smaller container */
}

.mission-vision-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md); /* Reduced gap */
  margin: 0 auto;
}

.mission-vision-card {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: var(--spacing-md); /* Reduced padding */
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mission-vision-card:hover {
  transform: translateY(-3px); /* Smaller hover effect */
}

.mission-vision-card h3 {
  color: var(--primary-dark);
  font-size: 1.4rem; /* Smaller heading */
  margin-bottom: var(--spacing-sm); /* Reduced margin */
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Montserrat', sans-serif; /* Match brand font */
}

.mission-vision-card h3 i {
  color: var(--primary);
  font-size: 1.2rem; /* Smaller icon */
}

.mission-vision-card p {
  color: var(--text-dark);
  line-height: 1.6; /* Reduced line height */
  font-size: 0.95rem; /* Smaller text */
  margin-bottom: var(--spacing-xs); /* Reduced margin */
  font-family: 'Montserrat', sans-serif; /* Match brand font */
}

.mission-vision-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px; /* Thinner line */
  background: linear-gradient(to right, var(--primary), var(--primary-dark));
  opacity: 0.6;
}

.mission-vision-quote {
  text-align: center;
  margin: var(--spacing-md) 0; /* Reduced margin */
  font-style: italic;
  color: var(--primary-dark);
  font-size: 1.1rem; /* Smaller quote */
  line-height: 1.5;
  position: relative;
  padding: 0 var(--spacing-md);
  font-family: 'Montserrat', sans-serif; /* Match brand font */
  font-weight: 400;
}

.mission-vision-quote::before,
.mission-vision-quote::after {
  content: "";
  font-size: 3rem; /* Smaller quotes */
  color: var(--primary);
  opacity: 0.2;
  position: absolute;
  line-height: 1;
}

.mission-vision-quote::before {
  top: -15px;
  left: 0;
}

.mission-vision-quote::after {
  content: "";
  bottom: -30px;
  right: 0;
}

/* Add responsive adjustments */
@media (max-width: 768px) {
  .mission-vision-card h3 {
    font-size: 1.5rem;
  }
  
  .mission-vision-quote {
    font-size: 1.1rem;
    padding: 0 var(--spacing-md);
  }
  
  .mission-vision-quote::before,
  .mission-vision-quote::after {
    font-size: 3rem;
  }
}

/* Mobile Navigation Toggle Button - More specific selectors */
.nav-toggle {
  display: none !important; /* Force hidden by default on desktop */
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}
