/* ======================
   Mobile 전용 CSS (≤768px)
   - 중복/충돌 제거, 한 파일로 정리
====================== */

/* 1) 공통 여백 축소 */
@media (max-width: 768px) {
  section {
    margin-top: 40px;
    margin-bottom: 40px;
  }
}

/* 2) HERO (company) */
@media (max-width: 576px) {
  .company-hero {
    min-height: 240px;
    background-size: cover;
    background-position: center;
  }
  .company-hero .hero-title {
    font-size: 1.6rem;
  }
  .company-hero .hero-subtitle {
    font-size: 0.9rem;
  }
}

/* 3) CEO 인사말 */
@media (max-width: 576px) {
  .ceo-wire {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .ceo-frame {
    width: 100%;
    max-width: 260px;
    aspect-ratio: 3/4; /* 세로 사진 느낌 유지 */
    margin: 0 auto;
    overflow: hidden;
    border-radius: 16px;
  }
  .ceo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .ceo-heading {
    font-size: 1.25rem;
    text-align: center;
  }
  .ceo-copy p {
    font-size: 0.9rem;
    text-align: center;
  }
  .bullets {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .bullets .item {
    padding: 20px;
    text-align: center;
  }
  .bullets .item h4 {
    font-size: 1rem;
  }
  .bullets .item p {
    font-size: 0.85rem;
  }
}

/* 4) 서비스/프로젝트 카드 이미지 */
@media (max-width: 576px) {
  .services .intro-media {
    height: auto;
    aspect-ratio: 16/9; /* 비율 고정 */
    overflow: hidden;
    border-radius: 12px;
  }
  .services .intro-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* =========================================
   5) Blog 카드 – 모바일 전용 레이아웃 (≤768px)
   - 이미지 세로 비율 확보(4:3)
   - 하단 오버레이에 Blog 배지 + 제목만 표기
   - 오른쪽/왼쪽 교차 레이아웃(aid-left) 무시
   - 버튼/설명/태그 숨김
========================================= */
@media (max-width: 768px) {
  /* 카드 래퍼 */
  .blog-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: transparent;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
  }

  /* 썸네일(두 형태 모두 지원: 새 구조 __media / 기존 .blog-thumb) */
  .blog-card__media img,
  .blog-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3; /* 🔥 세로 높이 확보: 필요시 1/1, 3/2로 조정 가능 */
    object-fit: cover;
    border-radius: inherit;
  }

  /* 패널(내용)은 항상 하단 오버레이 */
  .blog-card__panel,
  .blog-card .blog-content {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    padding: 16px 18px !important;
    color: #fff !important;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.65) 100%) !important;
    border: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* aid-left 무력화(안전핀) */
  .blog-card.aid-left .blog-card__panel,
  .blog-card.aid-left .blog-content {
    left: 0 !important;
    right: 0 !important;
  }

  .blog-card__panel-inner {
    display: block;
  }

  /* Blog 배지 */
  .blog-tag,
  .blog-badge,
  .blog-card .badge,
  .blog-card .tag {
    display: inline-flex !important;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: #1b3b34;
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 8px;
  }

  /* 제목 */
  .blog-title,
  .blog-content .title {
    margin: 0;
    font-size: clamp(18px, 5vw, 22px);
    line-height: 1.4;
    font-weight: 800;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  }

  /* 설명/메타/버튼/태그 감추기 */
  .blog-desc,
  .blog-meta,
  .blog-card .btn,
  .blog-content .excerpt,
  .blog-content .tags,
  .blog-content .cta {
    display: none !important;
  }
}
/* ======================
   Blog 카드: 모바일 폰트 축소
====================== */
@media (max-width: 576px) {
  /* 제목 */
  .blog-title,
  .blog-content .title {
    font-size: clamp(14px, 4vw, 18px) !important; /* 🔥 기존보다 작게 */
    line-height: 1.3 !important;
  }

  /* Blog 배지 */
  .blog-tag,
  .blog-badge {
    font-size: 0.75rem !important; /* 조금 더 작게 */
    padding: 0 8px !important;
    height: 22px !important;
  }

  /* 패널 패딩 줄이기 */
  .blog-card__panel,
  .blog-card .blog-content {
    padding: 10px 12px !important;
  }
}
/* ======================
   Blog 카드: 모바일 배지/아이콘 보이게
====================== */
@media (max-width: 768px) {
  .blog-card {
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
  }

  /* 이미지 영역은 위 */
  .blog-card__media,
  .blog-card .blog-thumb {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
  }
  .blog-card__media img,
  .blog-card .blog-thumb img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
  }

  /* 텍스트 패널 → 무조건 아래 오버레이 */
  .blog-card__panel,
  .blog-card .blog-content {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.65) 100%) !important;
    padding: 12px 14px !important;
    color: #fff !important;
    z-index: 2 !important; /* 🔥 항상 위로 */
  }

  /* Blog 배지 항상 표시 */
  .blog-tag,
  .blog-badge {
    position: relative !important;
    display: inline-block !important;
    background: #1b3b34 !important;
    color: #fff !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    padding: 3px 10px !important;
    border-radius: 999px !important;
    margin-bottom: 6px !important;
    z-index: 3 !important; /* 🔥 이미지/텍스트 위 */
  }
}
.blog-card__media {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}
.blog-card__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.blog-card__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.65) 100%);
  color: #fff;
}
.blog-card__overlay .blog-tag {
  display: inline-block;
  background: #1b3b34;
  color: #fff;
  font-weight: bold;
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.blog-card__overlay .blog-title {
  font-size: 1rem;
  margin: 0;
}

.blog-card__summary {
  padding: 12px 16px;
  background: #fff;
  text-align: right;
}
.blog-card__summary .btn {
  font-size: 0.85rem;
}
@media (max-width: 768px) {
  .blog-desc,
  .blog-meta {
    display: none !important;
  }

  /* 버튼은 보이게 */
  .blog-card .btn {
    display: inline-block !important;
    margin-top: 8px;
  }
}
@media (max-width: 768px) {
  /* 요약문, 메타(태그)는 감추기 */
  .blog-desc,
  .blog-meta {
    display: none !important;
  }

  /* 버튼은 반드시 보이게 */
  .blog-card .btn {
    display: inline-block !important;
    margin-top: 10px;
  }

  /* 배지 + 제목은 그대로 */
  .blog-tag {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: #1b3b34;
    color: #fff;
    font-weight: 700;
    margin-bottom: 8px;
  }

  .blog-title {
    font-size: clamp(16px, 5vw, 20px);
    line-height: 1.4;
    margin: 0 0 8px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  }
}
/* ======================
   Blog cards – mobile 전용 단순화
====================== */
@media (max-width: 768px) {
  /* 카드 구조 강제 */
  .blog-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: transparent;
  }

  /* 이미지는 항상 비율 유지 */
  .blog-card__media img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
  }

  /* 텍스트 패널은 하단 오버레이로 통일 */
  .blog-card__panel {
    position: absolute !important;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 16px;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.65) 100%);
    border: none;
    box-shadow: none;
  }

  /* 배지 + 제목만 남기고 나머지는 감춤 */
  .blog-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #1b3b34;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 6px;
  }
  .blog-title {
    font-size: clamp(16px, 5vw, 20px);
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  }

  /* 요약, 태그, 버튼은 모바일에서는 숨김 */
  .blog-desc,
  .blog-meta,
  .blog-card .btn {
    display: none !important;
  }
}

/* ======================
   Blog cards – mobile (≤768px)
   이미지 + 배지 + 제목 + 버튼
====================== */
@media (max-width: 768px) {
  /* 카드/이미지 */
  .blog-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: transparent;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  }
  .blog-card__media img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
  }

  /* 하단 오버레이 */
  .blog-card__panel {
    position: absolute !important;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 16px 16px;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.65) 100%);
    border: 0;
    box-shadow: none;
  }
  .blog-card__panel-inner {
    display: block;
  }

  /* 배지/제목 */
  .blog-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #1b3b34;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 6px;
  }
  .blog-title {
    margin: 0;
    font-size: clamp(16px, 5vw, 20px);
    line-height: 1.4;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  }

  /* 요약/태그는 숨김 */
  .blog-desc,
  .blog-meta {
    display: none !important;
  }

  /* 버튼은 보이게(모바일 전용 스타일) */
  .blog-card .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1;
    border-radius: 12px;
    border: 0;
    background: #ffffff;
    color: #1b3b34;
    text-decoration: none;
  }
}
@media (max-width: 768px) {
  .blog-card .btn {
    display: block !important; /* 가로 전체 차지 */
    width: 100%; /* 버튼 폭 100% */
    text-align: center; /* 텍스트 가운데 */
    margin-top: 12px; /* 제목과 간격 */
    padding: 12px 0; /* 높이 여유 */
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    background: #ffffff;
    color: #1b3b34;
    border: none;
  }
}
/* ===== 모바일 블로그 카드: 패널/버튼 강제 리셋 (≤768px) ===== */
@media (max-width: 768px) {
  /* 카드는 단일 블록으로 */
  .blog-card {
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 16px !important;
  }

  /* 썸네일 비율 고정 */
  .blog-card__media img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9 !important;
    object-fit: cover !important;
  }

  /* 오버레이 패널(오른쪽/왼쪽 교차 무효화) */
  .blog-card__panel {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    padding: 16px 18px !important;
    color: #fff !important;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.62) 100%) !important;
    border: 0 !important;
    box-shadow: none !important;

    /* flex/grid 부모에서 열 폭이 눌리지 않도록 */
    min-width: 0 !important;
  }
  .blog-card.aid-left .blog-card__panel {
    left: 0 !important;
  }

  /* 패널 내부 레이아웃을 단일 컬럼으로 고정 */
  .blog-card__panel-inner {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .blog-card__panel-inner > div {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  /* 배지 + 제목만 보이게, 나머지는 숨김 */
  .blog-tag {
    display: inline-flex !important;
    align-items: center !important;
    height: 28px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    background: #1b3b34 !important;
    color: #fff !important;
    font-weight: 800 !important;
    margin-bottom: 8px !important;
  }
  .blog-title {
    margin: 0 !important;
    font-size: clamp(18px, 5vw, 24px) !important;
    line-height: 1.35 !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
  }
  .blog-desc,
  .blog-meta {
    display: none !important;
  }

  /* ▶ 버튼: 항상 제목 아래, 가로 가운데(풀폭) */
  .blog-card__panel .btn {
    position: static !important;
    float: none !important;
    display: block !important; /* 줄 바꿈 허용 */
    width: 100% !important; /* 가로 꽉 차게 */
    text-align: center !important;
    margin: 12px 0 0 !important; /* 제목과 간격 */
    padding: 12px 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: #1b3b34 !important;
    border: none !important;

    /* 부모 flex/grid의 최소폭 강제 */
    min-width: 0 !important;
  }
}
@media (max-width: 768px) {
  .blog-card__panel-inner {
    display: flex;
    flex-direction: column; /* 세로 정렬 */
    align-items: center; /* 가운데 정렬 */
    text-align: center; /* 텍스트도 가운데 */
    gap: 10px; /* 간격 */
  }

  .blog-card .btn {
    display: inline-block !important;
    margin-top: 8px;
    align-self: center; /* 버튼만 중앙 */
  }
}
@media (max-width: 768px) {
  .blog-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: transparent;
  }

  /* 이미지 비율 고정 */
  .blog-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9; /* 16:9 비율 강제 */
  }
  .blog-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* 텍스트 패널을 이미지 안쪽으로 겹치기 */
  .blog-card__panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.65) 100%);
    color: #fff;
    text-align: center;
  }

  .blog-tag {
    display: inline-block;
    margin-bottom: 8px;
    background: #1b3b34;
    color: #fff;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
  }

  .blog-title {
    font-size: 1rem;
    margin: 0 0 10px;
    line-height: 1.4;
  }

  /* 버튼도 이미지 안에 위치 */
  .blog-card__panel .btn {
    display: inline-block;
    margin-top: 8px;
    background: #fff;
    color: #1b3b34;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
  }

  /* 요약, 태그 숨김 */
  .blog-desc,
  .blog-meta {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .blog-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
  }

  /* 이미지 컨테이너 */
  .blog-card__media {
    width: 100%;
    aspect-ratio: 16/9; /* 높이 비율 고정 */
    overflow: hidden;
  }

  .blog-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* 텍스트 패널 - 이미지 안쪽 오버레이 */
  .blog-card__panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.65) 100%);
    color: #fff;
    text-align: center;
  }

  .blog-tag {
    display: inline-block;
    margin-bottom: 6px;
    background: #1b3b34;
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
  }

  .blog-title {
    font-size: 1rem;
    margin: 0 0 8px;
    line-height: 1.4;
  }

  /* 버튼을 이미지 안에 고정 */
  .blog-card__panel .btn {
    display: inline-block;
    background: #fff;
    color: #1b3b34;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
  }

  /* 설명, 태그는 모바일에서 숨김 */
  .blog-desc,
  .blog-meta {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .blog-card__media {
    width: 100%;
    aspect-ratio: 4/3; /* 기존 16/9 → 세로 넉넉하게 */
    overflow: hidden;
  }

  .blog-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
@media (max-width: 768px) {
  .blog-card__panel {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.28) 100%);
  }
}
