:root {
  --green: #0fa58f;
  --green-d: #0b8673;
  --blue: #1f6fe0;
  --text: #111;
  --gray: #555;
  --soft: #fafafa;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family:
    "Pretendard",
    "Noto Sans KR",
    -apple-system,
    "Segoe UI",
    Arial,
    sans-serif;
  color: var(--text);
  background: #fff;
  font-size: 15px;
  letter-spacing: -0.2px;
  margin: 0;
  padding: 0;
}

/* Google Translate Top Banner Fix */
html {
  margin-top: 0 !important;
  top: 0 !important;
}

body {
  top: 0 !important;
  margin-top: 0 !important;
  position: static !important;
}

.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
iframe.goog-te-banner-frame,
iframe.skiptranslate {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  border: 0 !important;
}

body > .skiptranslate {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--green);
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ===== MOBILE HEADER ===== */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #eee;
}

.mobile-header .logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 20px;
  color: #0fa58f;
}

.mobile-header .logo svg {
  width: 32px;
  height: 16px;
  margin-right: 6px;
}

.mobile-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #111;
  cursor: pointer;
  padding: 0;
}

/* ===== LAYOUT ===== */
.im-container {
  max-width: 1450px;
  margin: 0 auto;
  padding: 10px;
}

.layout {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.sidebar {
  flex: 0 0 320px;
  position: sticky;
  top: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100vh - 60px);
}

.content {
  flex: 1;
  min-width: 0;
}

/* ===== SIDEBAR ===== */
.logo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  margin-bottom: 35px;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 22px;
  color: #6d6e71;
  letter-spacing: -0.8px;
}

.logo svg {
  width: 36px;
  height: 18px;
  margin-right: 6px;
}

.lang-btn {
  width: 50px;
  height: 28px;
  border: 1px solid #dcdcdc;
  background: #fff;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  cursor: pointer;
}

.close-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: #111;
  cursor: pointer;
}

.gnb-scroll {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  scrollbar-width: thin;
  flex-grow: 1;
}

.gnb > li {
  margin-bottom: 22px;
}

.gnb .d1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  padding-bottom: 4px;
}

.gnb .d1 i {
  font-size: 16px;
  color: #111;
}

.gnb .sub {
  display: none;
  padding-top: 8px;
}

.gnb > li.open .sub {
  display: block;
}

.gnb .sub > li {
  font-size: 15px;
  line-height: 32px;
  color: #333;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.gnb .sub > li > a {
  flex: 1;
}

.gnb .sub > li > i {
  font-size: 12px;
  cursor: pointer;
  width: 14px;
  text-align: right;
}

.gnb .d2 {
  display: none;
  width: 100%;
  padding-left: 12px;
}

.gnb .d2 a {
  display: block;
  line-height: 30px;
  color: #666;
  font-size: 14px;
}

.gnb .sub > li.open > .d2 {
  display: block;
}

/* Sidebar Footer Info */
.sidebar-footer {
  font-size: 14px;
  color: #777;
  line-height: 20px;
}

/* ===== COMMON ===== */
.arw {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  position: relative;
  top: -1px;
}

.arw svg {
  width: 20px;
  height: 8px;
}

.see-more {
  font-weight: 600;
  font-size: 16px;
  color: var(--green);
  display: inline-flex;
  align-items: center;
}

/* Slider Controls */
.ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 6;
  height: 12px;
}

.ctrl .bar {
  height: 3px;
  width: 16px;
  background: #8a8a8a;
  display: block;
  cursor: pointer;
  transition: width 0.3s;
}

.ctrl .bar.active {
  width: 45px;
  background: #fff;
  box-shadow: 0 0 0 1px #777 inset;
  position: relative;
}

.ctrl .bar.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 5px;
  height: 5px;
  background: #c3dc2e;
}

.ctrl .pause {
  margin-left: 2px;
  display: flex;
  gap: 3px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

.ctrl .pause i {
  display: block;
  width: 3px;
  height: 12px;
  background: #666;
}

.ctrl.on-dark .bar {
  background: #9a9a9a;
}

.ctrl.on-dark .bar.active {
  background: #fff;
  box-shadow: none;
}

.ctrl.on-dark .pause i {
  background: #fff;
}

.slides {
  position: absolute;
  inset: 0;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.6s,
    visibility 0.6s;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

/* ===== TOP GRID ===== */
.top-grid {
  display: grid;
  /* grid-template-columns: 1fr 1fr 1fr; */
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ===== MAIN SLIDER ===== */
.main-slider {
  position: relative;
  height: 840px;
  border-radius: 0 0 24px 0;
  overflow: hidden;
  background: #111;
  color: #fff;
}

.main-slider .slide {
  padding: 60px 35px 0;
}

.main-slider h2 {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 20px;
  letter-spacing: -1px;
  position: relative;
  z-index: 2;
}

.main-slider p {
  font-size: 16px;
  line-height: 24px;
  margin: 0;
  font-weight: 500;
  position: relative;
  z-index: 2;
}

.main-slider .more {
  display: inline-flex;
  align-items: center;
  margin-top: 30px;
  font-weight: 600;
  font-size: 16px;
  position: relative;
  z-index: 2;
}

.main-slider .ctrl {
  position: absolute;
  top: 30px;
  right: 35px;
}

.slide-logo {
  position: absolute;
  top: 85px;
  right: 35px;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  z-index: 2;
}

.slide-logo b {
  color: #2ce0b6;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 120px;
  z-index: 5;
  border: 0;
  cursor: pointer;
  background: rgba(222, 203, 110, 0.88);
  color: #0a8f7a;
  font-size: 22px;
}

.nav-arrow.prev {
  left: 0;
  border-radius: 0 120px 120px 0;
}

.nav-arrow.next {
  right: 0;
  border-radius: 120px 0 0 120px;
}

/* ===== STOCK / RIGHT CARDS ===== */
.stock {
  position: relative;
  height: 408px;
  padding: 35px;
  background: #fff;
  border-radius: 0 0 24px 0;
  overflow: hidden;
  border: 1px solid #eaeaea;
}

.stock .bg {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 300px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  padding-right: 15px;
  opacity: 0.7;
}

.candle {
  width: 6px;
  background: rgba(120, 150, 200, 0.2);
  position: relative;
}

.stock h3 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 15px;
  letter-spacing: -1px;
}

.stock .see-more {
  position: absolute;
  top: 35px;
  right: 35px;
}

.stock-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 5px;
}

.stock-price {
  font-size: 48px;
  font-weight: 400;
  color: #d7166a;
  line-height: 1.2;
}

.stock-diff {
  color: #d7166a;
  font-size: 15px;
  margin-top: 4px;
}

.kospi {
  margin-top: 25px;
  padding-top: 18px;
  border-top: 1px solid #eaeaea;
  font-size: 15px;
  font-weight: 600;
}

.kospi span {
  color: #d7166a;
  font-weight: 400;
  margin-left: 10px;
}

.lang-btn select,
.lang-btn {
  cursor: pointer;
  outline: none;
}

/* ===== ABOUT / CREDIT RATING ===== */
.stock {
  margin-bottom: 15px;
}
.imslider {
  margin-bottom: 15px;
}
.about {
  position: relative;
  height: 408px;
  /* margin-top: 24px; */
  background: #fff;
  border-radius: 0 0 24px 0;
  border: 1px solid #eaeaea;
}

.about .slide {
  padding: 20px;
}

.about h3 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 15px;
  letter-spacing: -1px;
}

.about p {
  font-size: 18px;
  line-height: 28px;
  color: #444;
  margin-bottom: 15px;
}

.rating .aaa {
  font-size: 56px;
  font-weight: 700;
  color: var(--green);
  line-height: 1.1;
  margin: 10px 0;
}

.rating ul li {
  font-size: 15px;
  line-height: 26px;
  color: #555;
}

.about .ctrl {
  position: absolute;
  left: 35px;
  bottom: 30px;
}

/* ===== ESG / ETHICS / SOCIAL ===== */
.ethical {
  position: relative;
  width: 100%;
  height: 410px;
  margin-top: 24px;
  border-radius: 0 0 24px 0;
  overflow: hidden;
}

.ethical .slide {
  padding: 45px 35px;
}

.ethical h3 {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 15px;
  letter-spacing: -1px;
}

.ethical p {
  font-size: 19px;
  line-height: 28px;
  max-width: 480px;
  color: #333;
}

.ethical .link {
  position: absolute;
  left: 35px;
  bottom: 75px;
  font-size: 17px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.ethical .ctrl {
  position: absolute;
  left: 35px;
  bottom: 30px;
}

/* ===== iM NETWORK ===== */
.network {
  width: 100%;
  margin-top: 24px;
  padding: 45px 35px;
  background: var(--soft);
  border-radius: 0 0 24px 0;
  border: 1px solid #eaeaea;
}

.network h3 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 40px;
}

.network-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px 20px;
}

.network-item {
  text-align: center;
  font-size: 15px;
  line-height: 22px;
  color: #222;
}

.network-item svg {
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  color: var(--green);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== FOOTER ===== */
.footer {
  
  border-top: 1px solid #eaeaea;
  margin-top: 50px;
  padding: 35px 0 60px;
  font-size: 13px;
  color: #666;
  line-height: 24px;
  text-align: center;
}

/* ===== RESPONSIVE & MOBILE MENU TOGGLE ===== */

@media screen and (max-width: 1300px) {
  .im-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 10px;
  }
}

@media (max-width: 991px) {
  .mobile-header {
    display: flex;
  }

  .im-container {
    padding: 15px;
  }

  .layout {
    flex-direction: column;
    gap: 0;
  }

  .sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 380px;
    height: 100vh;
    background: #fff;
    z-index: 999;
    padding: 25px;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    transition: right 0.35s ease-in-out;
    min-height: unset;
  }

  .sidebar.active {
    right: 0;
  }

  .close-btn {
    display: block;
  }

  .sidebar .logo-row {
    margin-bottom: 25px;
  }

  .gnb-scroll {
    max-height: calc(100vh - 180px);
  }

  .top-grid {
    grid-template-columns: 1fr;
  }

  .main-slider {
    height: 550px;
  }

  .network-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 575px) {
  .main-slider {
    height: 480px;
  }

  .main-slider h2 {
    font-size: 28px;
  }

  .stock h3,
  .about h3,
  .ethical h3 {
    font-size: 24px;
  }

  .network-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
