/*
 * A.N.C. KOREA Co., Ltd - Responsive CSS
 * Version: 1.0
 * This file contains responsive breakpoints and mobile-specific styles
 */

/*
 * Breakpoints:
 * - Large: 1200px and up (desktop)
 * - Medium: 768px to 1199px (tablets and small desktops)
 * - Small: 576px to 767px (large phones and small tablets)
 * - Extra Small: 575px and below (phones)
 */

/* Large Desktop Styles (1200px and up) */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }

  /* Enhanced hover effects only for desktop */
  .product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  }

  .news-card:hover .news-image img {
    transform: scale(1.08);
  }

  /* Two-column layout for contact page */
  .contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
  }

  /* Larger hero section on desktop */
  .hero {
    height: 650px;
  }

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

  /* Three column footer on large screens */
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* Medium Devices (tablets and small desktops, 768px to 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
  .container {
    max-width: 960px;
  }

  /* Adjust grid layouts */
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  /* Adjust about section layout */
  .about-content {
    flex-direction: column;
    gap: 30px;
  }

  /* Tablet-specific header adjustments */
  .nav-menu {
    gap: 20px;
  }

  /* Adjust content layouts for inner pages */
  .content-layout {
    gap: 30px;
  }

  /* Adjust footer layout */
  .footer-content {
    gap: 20px;
  }

  /* Sidebar adjustments */
  .sidebar-widget {
    padding: 15px;
  }

  /* Table styles for tablets */
  .responsive-table {
    font-size: 0.9rem;
  }

  /* Adjust hero spacing */
  .hero {
    height: 500px;
  }

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

  .hero-subtitle {
    font-size: 1.1rem;
  }
}

/* Small Devices (large phones and small tablets, 576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .container {
    max-width: 540px;
  }

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

  .nav-menu {
    position: fixed;
    top: 90px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 90px);
    background-color: var(--white);
    flex-direction: column;
    gap: 0;
    transition: var(--transition);
    overflow-y: auto;
    padding: 20px 0;
    z-index: 1001;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu > li > a {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
  }

  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    width: 100%;
    box-shadow: none;
    display: none;
    padding: 0;
  }

  .submenu li a {
    padding-left: 40px;
    border-bottom: 1px solid #eee;
  }

  /* Adjust grid layouts */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

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

  /* Adjust hero section */
  .hero {
    height: 450px;
    margin-top: 80px;
  }

  .hero-content {
    max-width: 100%;
  }

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

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  /* Content layout adjustments */
  .content-layout {
    flex-direction: column;
  }

  .content-sidebar {
    order: -1;
    margin-bottom: 30px;
  }

  /* Section spacing */
  .section {
    padding: 50px 0;
  }

  .section-title {
    margin-bottom: 30px;
  }

  .section-title h2 {
    font-size: 1.8rem;
  }

  /* Footer adjustments */
  .footer-content {
    flex-direction: column;
    gap: 30px;
  }

  .footer-links {
    width: 100%;
  }

  /* Adjust page headers */
  .page-header {
    padding: 60px 0 30px;
  }

  .page-title {
    font-size: 1.8rem;
  }

  /* Form adjustments */
  .form-grid {
    display: block;
  }

  /* Button adjustments */
  .btn {
    padding: 10px 20px;
  }
}

/* Extra Small Devices (phones, 575px and below) */
@media (max-width: 575px) {
  /* Container adjustments */
  .container {
    padding: 0 15px;
  }

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

  .nav-menu {
    position: fixed;
    top: 90px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 90px);
    background-color: var(--white);
    flex-direction: column;
    gap: 0;
    transition: var(--transition);
    overflow-y: auto;
    padding: 20px 0;
    z-index: 1001;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu > li > a {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
  }

  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    width: 100%;
    box-shadow: none;
    display: none;
    padding: 0;
  }

  .submenu li a {
    padding-left: 40px;
    border-bottom: 1px solid #eee;
  }

  /* Header adjustments */
  .header-top {
    justify-content: center;
  }

  .header-main {
    padding: 10px 0;
  }

  .logo img {
    height: 40px;
  }

  /* Grid layout adjustments */
  .products-grid,
  .news-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* Hero section adjustments */
  .hero {
    height: 400px;
    margin-top: 80px;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

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

  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  /* Section adjustments */
  .section {
    padding: 40px 0;
  }

  .section-title {
    margin-bottom: 25px;
  }

  .section-title h2 {
    font-size: 1.5rem;
  }

  .section-subtitle {
    font-size: 0.9rem;
  }

  /* Content layout adjustments */
  .content-layout {
    flex-direction: column;
  }

  .content-sidebar {
    order: -1;
    margin-bottom: 30px;
  }

  /* About section adjustments */
  .about-content {
    flex-direction: column;
    gap: 20px;
  }

  .about-text h3 {
    font-size: 1.3rem;
  }

  /* Table adjustments */
  .data-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 0.85rem;
  }

  .data-table th,
  .data-table td {
    padding: 8px 10px;
  }

  /* Footer adjustments */
  footer {
    padding: 40px 0 15px;
  }

  .footer-content {
    flex-direction: column;
    gap: 25px;
  }

  .footer-links {
    width: 100%;
  }

  .footer-title {
    font-size: 1rem;
    margin-bottom: 15px;
  }

  /* Form adjustments */
  .form-group {
    margin-bottom: 15px;
  }

  .form-control {
    padding: 8px 12px;
  }

  textarea.form-control {
    min-height: 120px;
  }

  /* Button adjustments */
  .btn {
    padding: 8px 18px;
    font-size: 0.9rem;
  }

  /* Page header adjustments */
  .page-header {
    padding: 50px 0 25px;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .breadcrumbs {
    font-size: 0.8rem;
  }

  /* Remove animations on mobile for performance */
  .fade-in,
  .slide-up {
    animation: none;
  }
}

/* Print Styles */
@media print {
  header,
  footer,
  .no-print,
  .hero {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.3;
    background: #fff;
    color: #000;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  a {
    text-decoration: underline;
    color: #000;
  }

  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  table, blockquote, pre, code {
    page-break-inside: avoid;
  }

  ul, ol, dl {
    page-break-before: avoid;
  }

  /* Add URL after links */
  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 90%;
  }
}

/* Device-specific adjustments */
/* iOS Input Padding Fix */
@supports (-webkit-touch-callout: none) {
  input,
  textarea {
    font-size: 16px !important; /* Prevents iOS from zooming on input focus */
  }
}

/* Landscape orientation adjustments */
@media (max-width: 767px) and (orientation: landscape) {
  .hero {
    height: 300px; /* Shorter hero for landscape mobile */
  }

  .nav-menu.active {
    height: calc(100vh - 70px);
    overflow-y: scroll;
  }
}

/* Support for High Contrast Mode */
@media (forced-colors: active) {
  /* Ensure buttons and interactive elements have visible boundaries */
  .btn,
  input,
  select,
  textarea {
    border: 1px solid;
  }

  /* Ensure links are distinguishable */
  a {
    text-decoration: underline;
  }
}

@media (max-width: 768px) {
    .page-header {
        padding: 30px 15px;
        margin-left: 15px;
        margin-right: 15px;
    }

    .page-title {
        font-size: 2rem;
    }

    .breadcrumbs {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 25px 10px;
        margin-left: 10px;
        margin-right: 10px;
    }

    .page-title {
        font-size: 1.8rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  /* Only applying if the site implements dark mode in the future */
  /* This is just a placeholder for potential future implementation */

  /* Example:
  :root {
    --primary-color: #4DB380;
    --secondary-color: #2A7A53;
    --accent-color: #333;
    --text-color: #E5E5E5;
    --light-text: #AAAAAA;
    --white: #222;
  }
  */
}