/* ===================================
   Responsive Styles for Mobile
   =================================== */

/* Mobile First - Base styles for mobile */
@media (max-width: 767px) {
  
  /* Typography */
  h1 {
    font-size: 1.75rem !important;
  }
  
  h2 {
    font-size: 1.5rem !important;
  }
  
  h3 {
    font-size: 1.25rem !important;
  }
  
  p {
    font-size: 0.9rem;
  }
  
  /* Container padding */
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Header/Navigation */
  .site-navbar {
    padding: 10px 0;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }
  
  .site-logo a {
    font-size: 1.2rem !important;
  }
  
  /* Mobile menu toggle - ปุ่ม hamburger */
  .site-menu-toggle {
    color: #333 !important;
    font-size: 28px !important;
    padding: 10px !important;
  }
  
  .site-menu-toggle .icon-menu {
    color: #333 !important;
    font-size: 28px !important;
  }
  
  /* Mobile menu */
  .site-mobile-menu {
    width: 100%;
    max-width: 300px;
  }
  
  .site-mobile-menu-body {
    padding: 20px;
  }
  
  .site-mobile-menu .site-nav-wrap li {
    display: block;
    margin-bottom: 10px;
  }
  
  /* Hero Section */
  .ftco-blocks-cover-1 {
    position: relative;
    overflow: hidden;
  }
  
  .ftco-blocks-cover-1 .site-section-cover {
    min-height: 450px !important;
    padding: 80px 0 60px 0 !important;
    background-size: cover !important;
    background-position: center center !important;
    position: relative;
  }
  
  .ftco-blocks-cover-1 .site-section-cover.overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 1;
  }
  
  .ftco-blocks-cover-1 .container {
    position: relative;
    z-index: 2;
  }
  
  .ftco-blocks-cover-1 h1 {
    font-size: 1.75rem !important;
    margin-bottom: 15px !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.3 !important;
  }
  
  .ftco-blocks-cover-1 p {
    font-size: 0.95rem !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
  }
  
  .play-btn-39282 {
    width: 60px;
    height: 60px;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
  }
  
  /* Sections */
  .site-section {
    padding: 40px 0;
  }
  
  section.site-section.py-5 {
    padding: 30px 0 !important;
  }
  
  /* Heading styles */
  .heading-39101 {
    margin-bottom: 30px !important;
  }
  
  .heading-39101 h3 {
    font-size: 1.5rem !important;
  }
  
  .heading-39101 .subtitle-39191 {
    font-size: 0.85rem;
  }
  
  .heading-39101 .backdrop {
    font-size: 3rem;
    opacity: 0.1;
  }
  
  /* Listing Items / Cards */
  .listing-item {
    margin-bottom: 20px;
  }
  
  .listing-item .listing-image {
    height: 200px !important;
    overflow: hidden;
  }
  
  .listing-item .listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  
  .listing-item-content {
    padding: 15px;
  }
  
  .listing-item-content h2 {
    font-size: 1.1rem !important;
    margin-bottom: 10px;
  }
  
  .listing-item-content .category {
    font-size: 0.8rem;
    padding: 5px 10px;
  }
  
  /* Accommodation Cards */
  .person-29191 {
    margin-bottom: 30px;
  }
  
  .person-29191 img {
    height: 200px !important;
    object-fit: cover;
    width: 100%;
  }
  
  .person-29191 h2 {
    font-size: 1.1rem !important;
  }
  
  .person-29191 .caption {
    font-size: 0.8rem;
  }
  
  /* Product Cards */
  .product-item {
    margin-bottom: 20px;
  }
  
  .product-item img {
    height: 200px;
    object-fit: cover;
    width: 100%;
  }
  
  /* Testimonials */
  .testimonial-39191 {
    padding: 25px !important;
    font-size: 0.95rem !important;
    margin-bottom: 20px;
  }
  
  .testimonial-39191 .mr-4 img {
    width: 60px !important;
    height: 60px !important;
    margin-right: 15px !important;
  }
  
  .testimonial-39191:after {
    bottom: -10px;
    right: -10px;
  }
  
  /* Footer */
  .site-footer {
    padding: 40px 0 20px 0 !important;
  }
  
  .site-footer .col-lg-3,
  .site-footer .col-lg-8,
  .site-footer .col-lg-6 {
    margin-bottom: 30px;
  }
  
  .footer-heading,
  .site-footer h2 {
    font-size: 1.3rem !important;
    margin-bottom: 20px !important;
    font-weight: 600;
  }
  
  .site-footer ul {
    padding-left: 0;
  }
  
  .site-footer ul li {
    margin-bottom: 10px;
  }
  
  .site-footer ul li a {
    font-size: 0.95rem;
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
  }
  
  .site-footer ul li a:hover {
    color: #007bff;
  }
  
  .site-footer p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
  }
  
  /* Gallery grid ใน footer */
  .gal_col {
    padding: 3px !important;
  }
  
  .gal_col a {
    display: block;
    overflow: hidden;
    border-radius: 4px;
  }
  
  .gal_col img {
    height: 70px !important;
    width: 100% !important;
    object-fit: cover !important;
    transition: transform 0.3s ease;
  }
  
  .gal_col a:hover img {
    transform: scale(1.1);
  }
  
  /* Social buttons */
  .site-footer .btn-outline-primary {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 8px !important;
    font-size: 1rem;
  }
  
  /* Copyright section */
  .site-footer .border-top {
    padding-top: 20px !important;
    margin-top: 20px !important;
    border-top: 1px solid #ddd !important;
  }
  
  .site-footer .border-top p {
    font-size: 0.85rem;
    color: #999;
    margin: 0;
  }
  
  /* Forms */
  .form-control {
    font-size: 0.9rem;
    padding: 10px 15px;
  }
  
  .btn {
    font-size: 0.9rem;
    padding: 10px 20px;
  }
  
  /* Tables */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  table {
    font-size: 0.85rem;
  }
  
  /* Images */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Detail Pages */
  .place-detail-image,
  .accommodation-detail-image,
  .product-detail-image {
    height: 250px !important;
    object-fit: cover;
  }
  
  .detail-info {
    padding: 20px 15px;
  }
  
  .detail-info h1 {
    font-size: 1.5rem !important;
  }
  
  .badge {
    font-size: 0.75rem;
    padding: 5px 10px;
  }
  
  /* Map iframes */
  iframe {
    max-width: 100%;
    height: 300px !important;
  }
  
  /* Spacing utilities */
  .mb-4,
  .my-4 {
    margin-bottom: 20px !important;
  }
  
  .mt-4,
  .my-4 {
    margin-top: 20px !important;
  }
  
  .mb-5,
  .my-5 {
    margin-bottom: 30px !important;
  }
  
  .mt-5,
  .my-5 {
    margin-top: 30px !important;
  }
  
  .py-5 {
    padding-top: 30px !important;
    padding-bottom: 30px !important;
  }
  
  /* Hide elements on mobile */
  .d-none-mobile {
    display: none !important;
  }
}

/* Tablet - 768px to 991px */
@media (min-width: 768px) and (max-width: 991px) {
  
  h1 {
    font-size: 2rem !important;
  }
  
  h2 {
    font-size: 1.75rem !important;
  }
  
  .ftco-blocks-cover-1 .site-section-cover {
    min-height: 500px;
  }
  
  .listing-item .listing-image {
    height: 220px !important;
  }
  
  .person-29191 img {
    height: 220px !important;
  }
  
  .testimonial-39191 {
    padding: 35px !important;
    font-size: 1.1rem !important;
  }
  
  iframe {
    height: 400px !important;
  }
}

/* Landscape mobile phones */
@media (max-width: 767px) and (orientation: landscape) {
  
  .ftco-blocks-cover-1 .site-section-cover {
    min-height: 350px !important;
    padding: 40px 0 !important;
  }
  
  .site-section {
    padding: 30px 0;
  }
}

/* Extra styles for better mobile experience */
@media (max-width: 767px) {
  
  /* แก้ปัญหา text-white ที่ไม่เห็นบน background ขาว */
  .text-dark-mobile {
    color: #333 !important;
  }
  
  /* ปรับ listing item ให้สวยบนมือถือ */
  .listing-item {
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
  }
  
  .listing-item-content {
    padding: 20px;
  }
  
  .listing-item-content h2 {
    font-size: 1.15rem !important;
    font-weight: 600;
  }
  
  /* ปรับ person card */
  .person-29191 {
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
  }
  
  .person-29191 .px-4 {
    padding: 20px !important;
  }
  
  /* ปรับ section with background image */
  .site-section.bg-image {
    background-attachment: scroll !important;
    background-size: cover !important;
    background-position: center !important;
    padding: 60px 0 !important;
  }
  
  .site-section.bg-image.overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
  }
  
  /* ปรับ button */
  .btn-primary {
    padding: 12px 30px !important;
    font-size: 1rem !important;
  }
  
  /* ปรับ owl carousel บน mobile */
  .owl-carousel .owl-item img {
    max-height: 250px;
    object-fit: cover;
  }
}

/* Small devices (phones in portrait, less than 576px) */
@media (max-width: 575px) {
  
  .col-6 {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .row {
    margin-left: -10px;
    margin-right: -10px;
  }
  
  .row > [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  /* Stack columns on very small screens */
  .col-lg-4,
  .col-lg-6,
  .col-md-4,
  .col-md-6 {
    margin-bottom: 20px;
  }
  
  /* Center align text on small screens */
  .text-center-mobile {
    text-align: center !important;
  }
  
  /* Button full width on mobile */
  .btn-block-mobile {
    display: block;
    width: 100%;
  }
  
  /* Footer adjustments for small screens */
  .site-footer .col-lg-3,
  .site-footer .col-lg-8 {
    margin-bottom: 30px;
  }
  
  .site-footer .row > div {
    text-align: center;
  }
  
  .site-footer .gal_col {
    flex: 0 0 33.333%;
    max-width: 33.333%;
  }
  
  .site-footer .btn-outline-primary {
    margin: 5px !important;
  }
}

/* Fix for touch devices */
@media (hover: none) and (pointer: coarse) {
  
  .listing-item:hover {
    transform: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }
  
  a:hover {
    text-decoration: none;
  }
}

/* Print styles */
@media print {
  
  .site-navbar,
  .footer,
  .site-mobile-menu,
  .btn,
  .social-icons {
    display: none !important;
  }
  
  .container {
    width: 100%;
    max-width: 100%;
  }
  
  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  
  img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
  /* Add dark mode styles here if needed */
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
  
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
