* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: arial, helvetica, sans-serif;
  color: #666666;
  background: url(images/background.jpg);
  font-size: 14px;
  line-height: 1.6;
}

a, a:visited {
  color: #1683cd;
  text-decoration: none;
}

a:hover {
  color: #cc6666;
  text-decoration: none;
}

h1 {
  font-weight: bold;
  font-size: 20px;
  margin: 0 0 15px 0;
  padding: 0;
  color: #333333;
  letter-spacing: 0;
}

h2 {
  font-size: 16px;
  margin: 0;
  color: #00A650;
  padding-bottom: 0;
  padding-top: 5px;
}

p {
  margin: 0 0 10px 0;
  padding: 0;
}

img {
  margin: 0;
  max-width: 100%;
  height: auto;
}

.clear {
  clear: both;
}

/* Main Wrapper */
#wrap {
  background-color: #FFFFFF;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Header */
#header {
  background-color: #6699CC;
}

#topbar {
  padding: 0;
}

@media (max-width: 768px) {
  #header {
    background-color: transparent;
  }
}

.banner-image {
  width: 100%;
  height: 200px;
  display: block;
  object-fit: cover;
  animation: fadeInOut 6s infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.banner-slideshow {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.banner-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;
  background-color: #6699CC;
}

.banner-slide.active {
  opacity: 1;
}

.banner-slide img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  display: block;
}


/* Content Area */

/* Main Content */
#left {
  flex: 1;
  min-width: 0;
  padding: 25px;
}

#left p {
  line-height: 1.6;
  margin-bottom: 10px;
}

#left h2 {
  color: #900 !important;
}

.post h1 {
  color: #333;
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ddd;
}

/* Indochina Travel Grid */
.indochina-wrapper {
  margin: 30px 0;
}

.indochina-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.indochina-grid a {
  display: block;
  transition: transform 0.3s;
}

.indochina-grid a:hover {
  transform: translateY(-5px);
}

.indochina-grid img {
  width: 100%;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Travel Guide Items */
.guide-section {
  margin: 40px 0;
}

.tour1 {
  margin-bottom: 30px;
  overflow: hidden;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 4px;
  transition: box-shadow 0.3s;
}

.tour1:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tour1 img {
  float: left;
  width: 150px;
  height: 100px;
  padding: 2px;
  border: 1px solid #90cae0;
  margin-right: 15px;
  border-radius: 4px;
  object-fit: cover;
}

.tour1 b {
  display: block;
  margin-bottom: 8px;
}

.tour1 a {
  font-weight: bold;
  color: #1683cd;
  font-size: 15px;
}

.tour1 a:hover {
  color: #cc6666;
}

.tour1 p {
  text-align: justify;
  line-height: 1.6;
  color: #666;
}

/* News Section */
.news-section {
  margin: 5px 0;
  padding: 5px;
  background: #f0f8ff;
  border-radius: 4px;
}

.news-section h1 {
  color: #333;
  margin-bottom: 5px;
}

.m_doc2 {
  list-style: none;
  padding: 0;
}

.m_doc2 li {
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
}

.m_doc2 li:last-child {
  border-bottom: none;
}

.m_doc2 a {
  color: #1683cd;
  font-size: 13px;
}

.m_doc2 a:hover {
  color: #cc6666;
  text-decoration: underline;
}


/* Mobile Responsive Styles */
@media (max-width: 980px) {
  #wrap {
    width: 100%;
  }
}

/* Tablet and Mobile Portrait - Apply mobile styles */
@media (max-width: 768px) {
  #content {
    flex-direction: column;
  }
  
  #sidebar {
    width: 100%;
    order: 1;
    padding: 20px 15px;
  }
  
  #left {
    width: 100%;
    order: 2;
    padding: 20px 15px;
  }
  
  .banner-slideshow {
    height: auto;
    background-color: #6699CC;
  }
  
  .banner-slide {
    position: static;
    height: auto;
  }
  
  .banner-slide:not(.active) {
    display: none;
  }
  
  .banner-slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
    position: static;
  }
  
  
  .indochina-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .widget iframe {
    height: 250px;
  }
  
  .footer-nav {
    display: none !important;
  }
  
  #footer {
    padding: 15px 10px;
    min-height: auto;
  }
  
  .footer-info-item {
    font-size: 12px;
    margin: 2px 0;
  }
  
  .tour1 {
    padding: 10px;
  }
}

/* CRITICAL FIX: Mobile Landscape - Force mobile layout */
@media (max-width: 980px) and (max-height: 500px) and (orientation: landscape) {
  #header {
    background-color: transparent;
  }
  
  #content {
    flex-direction: column;
  }
  
  #sidebar {
    width: 100%;
    order: 1;
    padding: 20px 15px;
  }
  
  #left {
    width: 100%;
    order: 2;
    padding: 20px 15px;
  }
  
  .banner-slideshow {
    height: auto;
    background-color: #6699CC;
  }
  
  .banner-slide {
    position: static;
    height: auto;
  }
  
  .banner-slide:not(.active) {
    display: none;
  }
  
  .banner-slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
    position: static;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav-table {
    display: none;
    background: #fff;
  }
  
  .nav-table.show {
    display: block;
  }
  
  .nav-table tr {
    display: block;
  }
  
  .nav-table td {
    display: block;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 12px;
  }
  
  .nav-table td:last-child {
    border-bottom: none;
  }
  
  /* Mobile submenu styles */
  .submenu {
    position: static;
    display: none;
    box-shadow: none;
    background: #f4f4f4;
    min-width: auto;
    border-top: none;
    margin-top: 5px;
  }
  
  .submenu.show {
    display: block;
  }
  
  .has-submenu > a::after {
    content: ' \25BC';
    font-size: 10px;
    margin-left: 4px;
  }
  
  .has-submenu.open > a::after {
    content: ' \25B2';
  }
  
  .submenu a {
    padding: 10px 10px 10px 25px;
    font-size: 13px;
    background: #f4f4f4;
  }
  
  .submenu a:hover {
    background: #e8e8e8;
  }
  
  .indochina-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .widget iframe {
    height: 250px;
  }
  
  .footer-nav {
    display: none !important;
  }
  
  #footer {
    padding: 15px 10px;
    min-height: auto;
  }
  
  .footer-info-item {
    font-size: 12px;
    margin: 2px 0;
  }
  
  .tour1 {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .banner-slideshow {
    height: auto;
  }
  
  .banner-slide {
    position: static;
    height: auto;
  }
  
  .banner-slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  
  .indochina-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tour1 img {
    float: none;
    width: 100%;
    height: auto;
    margin-right: 0;
    margin-bottom: 10px;
  }
  
  #sidebar h1 {
    font-size: 16px;
  }
  
  .post h1 {
    font-size: 18px;
  }
  
  #left {
    padding: 15px 10px;
  }
  
  #sidebar {
    padding: 15px 10px;
  }
  
  .footer-info-item {
    font-size: 13px;
  }
  
  .footer-logo {
    margin-top: 10px;
  }
}