:root {
    --primary: #1746a2;
    --secondary: #ffc436;
    --bg: #f7fafc;
    --card: #fff;
    --text: #212121;
    --accent: #22a39f;
}
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
}
header {
    background: linear-gradient(120deg, var(--primary) 70%, var(--accent));
    color: white;
    text-align: center;
    padding: 0.5rem 0rem 0.5rem 0rem;
    position: relative;
}
footer .logo {
    width: 120px;
    height: 75px;
    object-fit: contain;
    margin-bottom: 0rem; /* Added margin to push copyright down */
}
header h1 {
    margin: 0;
    font-size: 2.8rem;
    letter-spacing: -1px;
    font-weight: 800;
}
header p {
    margin: 1rem auto 2.5rem auto;
    font-size: 1.25rem;
    max-width: 720px;
}
.cta-btn {
    background: var(--secondary);
    color: var(--primary);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 2rem;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(23,70,162,0.10);
    text-decoration: none;
    transition: box-shadow 0.2s;
    display: inline-block;
    margin-top: 0rem;
}
.cta-btn:hover {
    box-shadow: 0 4px 24px rgba(23,70,162,0.18);
    background: #ffe38f;
}

.hero-content {
  margin: 1rem;
}
nav {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin: 0;
  background: none;
  padding: 0rem 0rem 0rem 1rem;
  flex-wrap: wrap;     /* 줄바꿈 허용 */
}
nav a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  padding: 0.6rem 1.2rem;
  border-radius: 1.2rem;
  transition: background 0.2s, color 0.2s;
}

nav a:hover {
  background: #ffc436;
  color: #1746a2;
}

section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3.5rem 2rem 2.5rem 2rem;
}
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}
.section-desc {
    color: #444;
    opacity: 0.8;
    margin-bottom: 2.3rem;
}
.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Fixed 4 columns */
    gap: 2rem;
    margin-top: 1.7rem;
}
.product-card {
    background: var(--card);
    border-radius: 1.5rem;
    box-shadow: 0 2px 20px rgba(23,70,162,0.07);
    padding: 2rem 1.2rem 1.3rem 1.2rem;
    text-align: center;
    transition: box-shadow 0.22s, transform 0.14s;
}
.product-card:hover {
    box-shadow: 0 8px 28px rgba(34,163,159,0.13);
    transform: translateY(-3px) scale(1.015);
}
.product-image {
    width: 100%;
    height: 180px;
    object-fit: contain; /* Changed to contain */
    border-radius: 1rem;
    margin-bottom: 1rem;
}
.product-card-content {
    padding: 2rem 1.2rem 1.3rem 1.2rem; /* Original padding */
}
.product-card p {
    margin: 0;
    color: #555;
    font-size: 1.02rem;
    opacity: 0.88;
}

.partners {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin-top: 2.5rem;
}
.partner-logo {
    width: 100px;
    height: 45px;
    object-fit: contain;
    filter: grayscale(1) brightness(0.97);
    opacity: 0.76;
    transition: filter 0.19s;
}
.partner-logo:hover {
    filter: grayscale(0.1) brightness(1.04);
    opacity: 1;
}
.contact-section {
    background: linear-gradient(105deg, #f7fafc 70%, #e9eefa 95%);
    border-radius: 1.2rem;
    padding: 2.8rem 1.5rem;
    text-align: center;
    margin-top: 2.7rem;
    box-shadow: 0 2px 22px rgba(23,70,162,0.10);
}
.contact-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
}
.contact-section p {
    color: #555;
    margin-bottom: 1.3rem;
}
footer {
    background: #21294a;
    color: #f1f3f9;
    padding: 2rem 1rem;
    font-size: 1rem;
    margin-top: 2rem;
    letter-spacing: 0.05em;
}
/* General Responsive Improvements */
.product-image {
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    object-fit: contain;
    border-radius: 1rem;
    margin-bottom: 1rem;
}

/* Tablet and smaller devices */
@media (max-width: 992px) {
    .products {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for tablets */
    }
    header h1 {
        font-size: 2.8rem;
    }
    nav a {
        font-size: 1rem;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    nav {
        gap: 0;
        padding: 0rem 0rem 0rem 1rem; /* Add horizontal padding */
        flex-wrap: nowrap; /* Prevent wrapping */
        overflow-x: auto; /* Enable horizontal scroll */
        justify-content: flex-start; /* Align items to the left */
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }
    nav::-webkit-scrollbar {
        display: none; /* Hide scrollbar for Chrome, Safari and Opera */
    }
    nav a {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    header {
        padding: 0.5rem 0rem 0.5rem 0rem;
    }
    header h1 {
        font-size: 2.2rem;
    }
    header p {
        font-size: 1.1rem;
    }
    section {
        padding: 2.5rem 0.5rem;
    }
    .products {
        grid-template-columns: 1fr; /* 1 column for mobile */
        gap: 1.5rem;
    }
    .product-card {
        padding: 1.5rem;
    }
    .gallery {
        grid-template-columns: 1fr !important; /* Single column gallery for mobile */
    }
    footer {
        flex-direction: column;
        gap: 1rem;
        padding: 2rem 1rem;
    }
}

html {
  scroll-behavior: smooth;
}

.product-tabs {
  display: flex; /* Use flexbox */
  flex-wrap: wrap; /* Allow items to wrap to next line */
  gap: 0rem; /* Space between pills */
  margin: 0.5rem 0.5rem, 0.5rem 0.5rem;
  padding: 0, 0 ,2 ,1;
  justify-content: center; /* Center the pills */
}
.product-tabs a {
  text-decoration: none;
  padding: 0.7rem 0.8rem; /* More horizontal padding for pill shape */
  background: var(--bg);
  color: var(--text);
  border-radius: 1.5rem; /* More rounded corners for pill shape */
  text-align: center;
  font-size: 0.9rem; /* Slightly larger font */
  font-weight: 700; /* Semi-bold text */
  white-space: nowrap; /* Prevent text from wrapping inside the pill */
  line-height: 1; /* Adjust line height */
  flex-shrink: 0; /* Prevent shrinking */
}
.product-tabs a:hover {
  font-weight: 700;
  color: var(--primary);
}

.product-link {
    text-decoration: none;
    color: inherit;
}

/* Styles from exhibition.html */
.exhibition-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 1rem;
  max-width: 1200px;
  margin: 2rem auto;
}
.exhibition-item {
  background: var(--card);
  border-radius: 1.5rem;
  box-shadow: 0 2px 20px rgba(23,70,162,0.07);
  overflow: hidden;
  text-align: center;
}
.exhibition-item img {
  max-height: 50px;
  max-width: 70%;
  width: auto;
  height: auto;
  display: block;
  margin: 1.5rem auto;
}
.exhibition-item h3 {
  margin: 1rem 0.5rem 0.5rem 0.5rem;
  font-size: 1.2rem;
  color: var(--primary);
}
.exhibition-item p {
  margin: 0 0.5rem 1rem 0.5rem;
  font-size: 0.95rem;
  color: #555;
}

/* Styles from products.html */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.gallery figure {
  margin: 0;
  text-align: center;
}
.gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.gallery figcaption {
  padding: 1rem 0.5rem;
  font-size: 1rem;
  color: #333;
  font-weight: 500;
}
.product-section {
  margin-bottom: 3rem;
}
.product-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

#goToTopBtn {
  display: none; /* Hidden by default */
  position: fixed; /* Fixed/sticky position */
  bottom: 20px; /* Place the button at the bottom of the page */
  right: 30px; /* Place the button 30px from the right */
  z-index: 99; /* Make sure it does not overlap */
  border: none; /* Remove borders */
  outline: none; /* Remove outline */
  background-color: rgba(0,0,0,0.7); /* Set a background color */
  color: white; /* Text color */
  cursor: pointer; /* Add a mouse pointer on hover */
  padding: 15px; /* Some padding */
  border-radius: 50%; /* Rounded corners */
  font-size: 14px; /* Increase font size */
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

#goToTopBtn:hover {
  background-color: rgba(0,0,0); /* Add a darker background on hover */
  color: rgba(255, 255, 255);
}

#goToTopBtn:focus {
  outline: none; /* Remove outline on focus */
  box-shadow: 2px rgba(0,0,0,0.2); /* Add a subtle focus indicator */
}

@media (max-width: 480px) {
  .partners-grid {
    grid-template-columns: 1fr !important; /* Force single column on very small screens */
  }
}

.contact-info-footer {
  margin-top: 1rem;
  line-height: 1.5;
}
.contact-info-footer p {
  margin: 0.2rem 0;
}
.flag-border {
  border: 1px solid black !important;
}
