/* ==========================================
   Component Styles
   SISOBIO Corporate Website
   ========================================== */

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--button-radius);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base) var(--ease-in-out);
  white-space: nowrap;
}

/* Primary Button */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  border: 2px solid transparent;
}

[data-theme="dark"] .btn-primary {
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 102, 204, 0.3);
}

.btn-primary:active {
  background-color: var(--color-primary-active);
  transform: translateY(0);
}

/* Secondary Button (Outline) */
.btn-secondary {
  background-color: transparent;
  color: var(--color-text-inverse);
  border: 2px solid var(--color-text-inverse);
}

[data-theme="dark"] .btn-secondary {
  color: #FFFFFF;
  border-color: #FFFFFF;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* ==========================================
   CARDS
   ========================================== */

/* Business Card */
.business-card {
  background-color: var(--color-surface);
  border-radius: var(--card-radius);
  padding: var(--spacing-2xl);
  text-align: center;
  transition: all var(--transition-base) var(--ease-in-out);
  border: 2px solid transparent;
}

.business-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.business-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-lg);
  border-radius: var(--radius-full);
  background-color: var(--color-bg-secondary);
  color: var(--color-primary);
}

[data-theme="dark"] .business-card__icon {
  background-color: var(--color-bg-tertiary);
}

.business-card__icon .icon {
  width: 48px;
  height: 48px;
}

.business-card__title {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-md);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.business-card__description {
  font-size: var(--font-size-body);
  line-height: var(--line-height-normal);
  color: var(--color-text-secondary);
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Product Card */
.product-card {
  background-color: var(--color-surface);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition-base) var(--ease-in-out);
  border: 2px solid transparent;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
}

.product-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: var(--color-bg-secondary);
  overflow: hidden;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base) var(--ease-in-out);
}

.product-card:hover .product-card__image img {
  transform: scale(1.05);
}

.product-card__badge {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-bold);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
}

.product-card__content {
  padding: var(--spacing-xl);
}

.product-card__title {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
  word-break: keep-all;
}

.product-card__subtitle {
  font-size: var(--font-size-body-sm);
  color: var(--color-text-tertiary);
  margin-bottom: var(--spacing-md);
  word-break: keep-all;
}

.product-card__description {
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-normal);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-lg);
  word-break: keep-all;
}

.product-card__specs {
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.spec-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--color-border-light);
  align-items: start;
}

.spec-item:last-child {
  border-bottom: none;
}

.spec-item__label {
  font-size: var(--font-size-body-sm);
  color: var(--color-text-tertiary);
  word-break: keep-all;
}

.spec-item__value {
  font-size: var(--font-size-body-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  text-align: right;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Certification Card */
.cert-card {
  background-color: var(--color-surface);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition-base) var(--ease-in-out);
}

.cert-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.cert-card__image {
  width: 100%;
  aspect-ratio: 3 / 4;
  background-color: var(--color-bg-secondary);
  overflow: hidden;
}

[data-theme="dark"] .cert-card__image img {
  filter: brightness(0.9) contrast(1.05);
}

.cert-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--spacing-md);
}

.cert-card__content {
  padding: var(--spacing-lg);
}

.cert-card__title {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
}

.cert-card__number {
  font-size: var(--font-size-body-sm);
  color: var(--color-text-tertiary);
  margin-bottom: var(--spacing-xs);
}

.cert-card__date {
  font-size: var(--font-size-body-sm);
  color: var(--color-text-secondary);
}


/* ==========================================
   TIMELINE
   ========================================== */

.timeline {
  position: relative;
  padding-left: var(--spacing-xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background-color: var(--color-border-medium);
}

.timeline__item {
  position: relative;
  margin-bottom: var(--spacing-lg);
  padding-left: var(--spacing-lg);
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background-color: var(--color-primary);
  border: 3px solid var(--color-bg-primary);
}

.timeline__year {
  font-size: var(--font-size-h5);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
}

.timeline__content {
  font-size: var(--font-size-body);
  line-height: var(--line-height-normal);
  color: var(--color-text-secondary);
  word-break: keep-all;
}

/* Timeline Events List */
.timeline__events {
  list-style: none;
  padding-left: 0;
  margin-top: var(--spacing-sm);
}

.timeline__events li {
  position: relative;
  padding-left: var(--spacing-lg); /* 24px */
  margin-bottom: var(--spacing-md); /* 16px */
  font-size: var(--font-size-body);
  line-height: 1.6;
  color: var(--color-text-secondary);
  word-break: keep-all;
}

.timeline__events li:last-child {
  margin-bottom: 0;
}

.timeline__events li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--color-text-tertiary);
  font-weight: var(--font-weight-bold);
}


/* ==========================================
   INFO LIST
   ========================================== */

.info-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.info-list__item {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.info-list__item:last-child {
  border-bottom: none;
}

.info-list__item dt {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-tertiary);
  word-break: keep-all;
}

.info-list__item dd {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  text-align: right;
  word-break: keep-all;
}


/* ==========================================
   TABS
   ========================================== */

.tabs {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-2xl);
  border-bottom: 2px solid var(--color-border-light);
  overflow-x: auto;
}

.tab {
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-tertiary);
  background-color: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base) var(--ease-in-out);
  white-space: nowrap;
}

.tab:hover {
  color: var(--color-primary);
}

.tab--active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-content {
  display: none;
}

.tab-content--active {
  display: block;
  animation: fadeIn var(--transition-base) var(--ease-out);
}


/* ==========================================
   CONTACT ITEMS
   ========================================== */

.contact-item {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.contact-item .icon {
  flex-shrink: 0;
  color: var(--color-primary);
}

.contact-item div {
  flex: 1;
}

.contact-item dt {
  font-size: var(--font-size-body-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-tertiary);
  margin-bottom: var(--spacing-xs);
}

.contact-item dd {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.contact-item a {
  color: var(--color-primary);
  transition: opacity var(--transition-base) var(--ease-in-out);
}

.contact-item a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ==========================================
   CONTACT INFO
   ========================================== */

/* Contact Item Address Variant */
.contact-item--address dd {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

/* Address Location Container */
.address-location {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: var(--spacing-xs) var(--spacing-md);
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--color-border-light);
  align-items: start;
}

.address-location:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

[data-theme="dark"] .address-location {
  border-bottom-color: var(--color-border-medium);
}

/* Address Label (본사/공장) */
.address-label {
  grid-column: 1 / -1;
  grid-row: 1;
  font-size: var(--font-size-body-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin: 0;
  white-space: nowrap;
  line-height: 1.6;
}

/* Address Text */
.address-location .address-text {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  line-height: 1.6;
  word-break: keep-all;
}

/* Map Link in Address Location - Icon Only */
.address-location .map-link {
  grid-column: 2;
  grid-row: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--color-bg-secondary);
  color: var(--color-primary);
  transition: all 0.2s ease;
  text-decoration: none;
  margin: 0;
  flex-shrink: 0;
  align-self: start;
}

.address-location .map-link svg {
  width: 20px;
  height: 20px;
  display: block;
}

.address-location .map-link:hover {
  background-color: var(--color-primary);
  transform: scale(1.1);
}

.address-location .map-link:hover svg {
  color: #FFFFFF;
}

.address-location .map-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

[data-theme="dark"] .address-location .map-link {
  background-color: var(--color-bg-tertiary);
  color: var(--color-accent);
}

[data-theme="dark"] .address-location .map-link:hover {
  background-color: var(--color-accent);
}

[data-theme="dark"] .address-location .map-link:hover svg {
  color: var(--color-bg-primary);
}

/* Screen Reader Only Text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


/* ==========================================
   UTILITY CLASSES
   ========================================== */

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================
   FLOATING SCROLL TO TOP BUTTON
   ========================================== */

.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  border: none;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: var(--z-fixed);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all var(--transition-base) var(--ease-in-out);
  
  /* Hidden by default - shown via JS */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

/* Dark mode adjustments */
[data-theme="dark"] .scroll-to-top {
  background-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Visible state (controlled by JS) */
.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Hover effect */
.scroll-to-top:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 102, 204, 0.3);
}

/* Active/pressed state */
.scroll-to-top:active {
  transform: translateY(-2px) scale(1.0);
}

/* Icon inside button */
.scroll-to-top .icon {
  width: 24px;
  height: 24px;
  color: var(--color-text-inverse);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
  }
  
  .scroll-to-top .icon {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .scroll-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }
  
  .scroll-to-top .icon {
    width: 18px;
    height: 18px;
  }
}


/* ==========================================
   PRODUCTS INTRO BOX - HERO STYLE
   ========================================== */

/* Fade In Up Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.products__intro {
  position: relative;
  max-width: 100%;
  margin: 0 auto var(--spacing-4xl, 80px);
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
}

/* Hero Style with Background Image */
.products__intro--hero {  
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* Parallax effect */
}

/* Responsive Background Images */
@media (max-width: 767px) {
  .products__intro--hero {
    background-image: url('../images/products/product_wide_mobile.webp');
    background-attachment: scroll; /* Disable parallax on mobile for performance */
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .products__intro--hero {
    background-image: url('../images/products/product_wide_tablet.webp');
  }
}

@media (min-width: 1025px) {
  .products__intro--hero {
    background-image: url('../images/products/product_wide_desktop.webp');
  }
}

/* Dark Overlay for Better Text Readability */
.products__intro-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 20, 40, 0.85) 0%,
    rgba(0, 51, 102, 0.75) 50%,
    rgba(0, 20, 40, 0.85) 100%
  );
  z-index: 1;
}

[data-theme="dark"] .products__intro-overlay {
  background: linear-gradient(
    135deg,
    rgba(10, 25, 41, 0.9) 0%,
    rgba(19, 47, 76, 0.85) 50%,
    rgba(10, 25, 41, 0.9) 100%
  );
}

/* Content Container */
.products__intro-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  padding: var(--spacing-4xl, 64px) var(--spacing-2xl, 32px);
  text-align: center;
  color: #FFFFFF;
  animation: fadeIn 1s ease-out;
}

.products__intro-symbol {
  width: 200px;
  height: auto;
  margin: 0 auto var(--spacing-xl, 32px);
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

.products__intro-title {
  font-size: 2.5rem;      /* 48px → 40px */
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: var(--spacing-lg, 24px);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease-out 0.3s both;
  word-break: keep-all;
}

.products__intro-description {
  font-size: 1.125rem;    /* 20px → 18px */
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--spacing-3xl, 48px);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 0.8s ease-out 0.4s both;
  word-break: keep-all;
}

/* Description 줄바꿈 스타일 */
.products__intro-description-line {
  display: block;
  margin-bottom: var(--spacing-md, 16px);
}

.products__intro-description-line:last-child {
  margin-bottom: 0;
}

.products__intro-highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg, 24px);
  text-align: left;
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.products__intro-highlight {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm, 8px);
  padding: var(--spacing-md, 16px);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
  transition: all var(--transition-base) var(--ease-in-out);
  animation: fadeInUp 0.6s ease-out both;
  word-break: keep-all;
}

/* Staggered animation for each highlight */
.products__intro-highlight:nth-child(1) { animation-delay: 0.6s; }
.products__intro-highlight:nth-child(2) { animation-delay: 0.7s; }
.products__intro-highlight:nth-child(3) { animation-delay: 0.8s; }
.products__intro-highlight:nth-child(4) { animation-delay: 0.9s; }
.products__intro-highlight:nth-child(5) { animation-delay: 1.0s; }
.products__intro-highlight:nth-child(6) { animation-delay: 1.1s; }

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .products__intro-content,
  .products__intro-title,
  .products__intro-description,
  .products__intro-highlight {
    animation: none;
  }
  
  .products__intro--hero {
    background-attachment: scroll;
  }
}

.products__intro-highlight:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.products__intro-highlight::before {
  content: "✓";
  color: #4A9EFF;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
  line-height: 1.6;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
