/* ==========================================================================
   SU Architect — style.css
   SU 건축사 사무소
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  --color-dark-red: #4E2528;
  --color-darker-red: #5A2E33;
  --color-bright-red: #C4A882;
  --color-accent-red: #D4B896;
  --color-white: #FFFFFF;
  --color-off-white: #F5F5F5;
  --color-text: #333333;
  --color-cream: #E8D5B7;
  --color-cream-light: rgba(232, 213, 183, 0.85);

  --color-sidebar-bg: #3D1A20;
  --color-sidebar-text: rgba(232, 213, 183, 0.7);
  --color-sidebar-text-active: #E8D5B7;

  --sidebar-width: 280px;

  --font-heading: 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Noto Sans KR', 'Helvetica Neue', Arial, sans-serif;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
}

/* ---------- CSS Reset / Base Styles ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-cream);
  background-color: var(--color-darker-red);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

button, input, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

/* ---------- No-JS Fallback Nav ---------- */
.no-js-nav {
  background-color: var(--color-dark-red);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

.no-js-nav a {
  color: var(--color-cream);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  padding: var(--space-xs) var(--space-sm);
}

.no-js-nav a:hover {
  color: var(--color-accent-red);
}

/* Hide no-js nav when JS is active */
body.js-enabled .no-js-nav {
  display: none;
}

/* ---------- Site Layout (Sidebar + Main) ---------- */
.site-layout {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--color-sidebar-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-lg) var(--space-md);
  z-index: 900;
  overflow-y: auto;
}

.sidebar-logo {
  margin-bottom: var(--space-sm);
}

.sidebar-logo-img {
  width: 250px;
  max-width: 100%;
  height: auto;
  filter: invert(1) brightness(2);
}

.sidebar-company {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.sidebar-company-en {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--color-cream);
  text-transform: uppercase;
  font-weight: 300;
  margin-bottom: var(--space-xs);
}

.sidebar-company-ko {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--color-sidebar-text);
  letter-spacing: 0.05em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  flex-grow: 1;
  width: 80%;
}

.sidebar-nav a {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-sidebar-text);
  transition: color 0.3s ease;
  display: block;
  width: 100%;
  text-align: center;
  padding: var(--space-md) 0;
  border-bottom: 1px solid rgba(232, 213, 183, 0.15);
}

.sidebar-nav a:first-child {
  border-top: 1px solid rgba(232, 213, 183, 0.15);
}

.sidebar-nav a:hover {
  color: #FFFFFF;
}

.sidebar-nav a.is-active {
  color: #FFFFFF;
}

.sidebar-social {
  display: flex;
  gap: var(--space-md);
  margin-top: auto;
  padding-top: var(--space-lg);
}

.sidebar-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  transition: opacity 0.3s ease;
}

.sidebar-social a:hover {
  opacity: 0.7;
}

.sidebar-social svg {
  width: 20px;
  height: 20px;
  fill: var(--color-sidebar-text);
}

/* ---------- Main Content ---------- */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-darker-red);
}

/* ---------- Hamburger Button (mobile only) ---------- */
.hamburger-btn {
  position: fixed;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 1000;
  width: 48px;
  height: 48px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: none; /* hidden on desktop */
  align-items: center;
  justify-content: center;
}

.hamburger-icon {
  position: relative;
  width: 28px;
  height: 20px;
}

.hamburger-icon span {
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-cream);
  transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
}

.hamburger-icon span:nth-child(1) { top: 0; }
.hamburger-icon span:nth-child(2) { top: 9px; }
.hamburger-icon span:nth-child(3) { top: 18px; }

/* X animation when open */
.hamburger-btn.is-active .hamburger-icon span:nth-child(1) {
  top: 9px;
  transform: rotate(45deg);
}
.hamburger-btn.is-active .hamburger-icon span:nth-child(2) { opacity: 0; }
.hamburger-btn.is-active .hamburger-icon span:nth-child(3) {
  top: 9px;
  transform: rotate(-45deg);
}

/* ---------- Navigation Overlay (mobile only) ---------- */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-dark-red);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
}

.nav-links a {
  color: var(--color-cream);
  font-family: var(--font-heading);
  font-size: 2rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.nav-overlay.is-open .nav-links a {
  opacity: 1;
  transform: translateY(0);
}

.nav-overlay.is-open .nav-links a:nth-child(1) { transition-delay: 0.1s; }
.nav-overlay.is-open .nav-links a:nth-child(2) { transition-delay: 0.15s; }
.nav-overlay.is-open .nav-links a:nth-child(3) { transition-delay: 0.2s; }
.nav-overlay.is-open .nav-links a:nth-child(4) { transition-delay: 0.25s; }
.nav-overlay.is-open .nav-links a:nth-child(5) { transition-delay: 0.3s; }

.nav-links a:hover {
  color: var(--color-accent-red);
  transform: scale(1.05);
}

/* ---------- Hero Section ---------- */
.hero-section {
  width: 100%;
  height: 100vh;
  background-color: var(--color-darker-red);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-lg);
  position: relative;
}

.hero-with-bg {
  background: url('../images/main.jpg') center center / cover no-repeat;
}

.hero-with-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(90, 46, 51, 0.35);
}

.hero-with-bg .hero-title,
.hero-with-bg .hero-subtitle {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-title {
  color: var(--color-cream);
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 5vw, 3.5rem);
  letter-spacing: 0.4em;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  white-space: nowrap;
}

.hero-subtitle {
  color: var(--color-cream-light);
  font-family: var(--font-heading);
  font-size: clamp(0.7rem, 2.5vw, 1.2rem);
  letter-spacing: 0.2em;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.site-footer {
  background-color: var(--color-dark-red);
  color: var(--color-cream-light);
  padding: var(--space-xl) var(--space-lg);
  font-size: 0.85rem;
  line-height: 1.8;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-info p { margin-bottom: var(--space-xs); }
.footer-representative { font-weight: 600; }
.footer-registration { opacity: 0.7; font-size: 0.8rem; }

.footer-social {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  margin-top: var(--space-sm);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  transition: opacity 0.3s ease;
}
.social-link:hover { opacity: 0.7; }
.social-link svg { width: 24px; height: 24px; fill: var(--color-cream); }

/* Kakao link tone-down — tone matched to cream icons so it sits well next to Instagram */
.sidebar-social a.kakao-link svg,
.footer-social a.social-link--kakao svg {
  fill: #C9A94A;
}
.sidebar-social a.kakao-link:hover svg,
.footer-social a.social-link--kakao:hover svg {
  fill: #DEBE5D;
}

.footer-copyright {
  border-top: 1px solid rgba(232, 213, 183, 0.2);
  padding-top: var(--space-md);
  font-size: 0.75rem;
  opacity: 0.6;
  text-align: center;
}

/* ---------- Page Sections ---------- */
.page-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

.section-header {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 5vw, 2rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-cream);
  margin-bottom: var(--space-xl);
  font-weight: 300;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

/* ---------- Project Page — Full-bleed Layout ---------- */
.project-header {
  text-align: center;
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  background-color: var(--color-darker-red);
}

.project-title {
  color: var(--color-cream);
  font-family: var(--font-heading);
  font-size: clamp(1rem, 4.5vw, 3rem);
  letter-spacing: 0.4em;
  font-weight: 300;
  margin-bottom: var(--space-sm);
  white-space: nowrap;
}

.project-subtitle {
  color: var(--color-cream-light);
  font-family: var(--font-heading);
  font-size: clamp(0.65rem, 2vw, 0.85rem);
  letter-spacing: 0.2em;
  font-weight: 300;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
  white-space: nowrap;
}

.project-gallery-fullbleed {
  padding: 0;
}

.project-gallery-fullbleed .gallery-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 6px;
}

/* ---------- Filter Tabs (Project Page) ---------- */
.filter-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 0;
  font-family: var(--font-heading);
  font-size: clamp(0.7rem, 2.5vw, 0.95rem);
  letter-spacing: 0.1em;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.filter-tab {
  color: var(--color-sidebar-text);
  cursor: pointer;
  padding: var(--space-sm) var(--space-sm);
  transition: color 0.3s ease;
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
}

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

.filter-tab.is-active {
  color: var(--color-bright-red);
  font-weight: 600;
}

.filter-separator {
  color: rgba(232, 213, 183, 0.3);
  user-select: none;
}

/* ---------- About Page ---------- */
.about-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.about-description {
  font-size: 1rem;
  line-height: 2;
  color: var(--color-cream);
}

.about-description-en {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--color-sidebar-text);
  margin-top: var(--space-md);
  font-style: italic;
}

.about-timeline {
  border-left: 2px solid var(--color-bright-red);
  padding-left: var(--space-lg);
}

.timeline-item {
  margin-bottom: var(--space-lg);
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-lg) - 5px);
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-bright-red);
}

.timeline-year {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-bright-red);
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.timeline-desc {
  color: var(--color-cream);
  font-size: 0.95rem;
}

.about-representative {
  padding: var(--space-lg);
  border: 1px solid rgba(232, 213, 183, 0.2);
  background-color: var(--color-dark-red);
}

.about-representative h3 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-sidebar-text);
  margin-bottom: var(--space-sm);
}

.about-representative p {
  font-size: 1.2rem;
  color: var(--color-cream);
}

/* Gallery grid - first item featured large */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 8px;
}

.project-gallery-fullbleed .gallery-grid {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 6px;
  padding: 6px;
}

/* Gallery items are simple thumbnails now */

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: pointer;
  border-radius: 8px;
}

.gallery-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: rgba(232, 213, 183, 0.3);
}

.gallery-image-real {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a.gallery-item {
  text-decoration: none;
  color: inherit;
}

/* Gallery item hover overlay */

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(78, 37, 40, 0.70);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-title {
  color: var(--color-cream);
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-align: center;
  padding: var(--space-md);
}

/* Gallery item hidden by filter */
.gallery-item.is-hidden {
  display: none;
}

/* Gallery placeholder backgrounds */
.gallery-item:nth-child(1) .gallery-image { background: linear-gradient(135deg, #2c2c2c, #4a4a4a); }
.gallery-item:nth-child(2) .gallery-image { background: linear-gradient(135deg, #3a1a1a, #5a2a2a); }
.gallery-item:nth-child(3) .gallery-image { background: linear-gradient(135deg, #1a2a3a, #2a3a4a); }
.gallery-item:nth-child(4) .gallery-image { background: linear-gradient(135deg, #2a2a1a, #4a4a2a); }
.gallery-item:nth-child(5) .gallery-image { background: linear-gradient(135deg, #1a3a2a, #2a4a3a); }
.gallery-item:nth-child(6) .gallery-image { background: linear-gradient(135deg, #3a2a3a, #4a3a4a); }
.gallery-item:nth-child(7) .gallery-image { background: linear-gradient(135deg, #2c1a2c, #4a2a4a); }
.gallery-item:nth-child(8) .gallery-image { background: linear-gradient(135deg, #1a2c2c, #2a4a4a); }
.gallery-item:nth-child(9) .gallery-image { background: linear-gradient(135deg, #3a3a1a, #5a5a2a); }
.gallery-item:nth-child(10) .gallery-image { background: linear-gradient(135deg, #2a1a2a, #4a2a3a); }
.gallery-item:nth-child(11) .gallery-image { background: linear-gradient(135deg, #1a2a2a, #2a4a3a); }
.gallery-item:nth-child(12) .gallery-image { background: linear-gradient(135deg, #2c2a1a, #4a3a2a); }

/* ---------- Contact Page ---------- */
.contact-page {
  padding-bottom: var(--space-2xl);
}

.contact-info {
  margin-bottom: var(--space-xl);
  line-height: 2.2;
  font-size: 0.95rem;
}

.contact-label {
  font-weight: 600;
  color: var(--color-bright-red);
}

/* ---------- Contact Form ---------- */
.contact-form {
  max-width: 600px;
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--color-cream);
  margin-bottom: var(--space-sm);
}

.required-mark {
  color: var(--color-bright-red);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--color-cream);
  background-color: var(--color-dark-red);
  border: 1px solid rgba(232, 213, 183, 0.3);
  border-radius: 2px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-bright-red);
  box-shadow: 0 0 0 2px rgba(196, 168, 130, 0.15);
}

.form-group input.is-invalid,
.form-group textarea.is-invalid {
  border-color: #e74c3c;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-sidebar-text);
}

.error-message {
  display: block;
  min-height: 1.2em;
  font-size: 0.8rem;
  color: #e74c3c;
  margin-top: var(--space-xs);
}

.form-submit-btn {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--color-dark-red);
  background-color: var(--color-bright-red);
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-transform: uppercase;
}

.form-submit-btn:hover {
  background-color: var(--color-accent-red);
  transform: translateY(-1px);
}

.form-submit-btn:active {
  transform: translateY(0);
}

/* ---------- Form Confirmation ---------- */
.form-confirmation {
  display: none;
  max-width: 600px;
  padding: var(--space-lg);
  background-color: var(--color-dark-red);
  border-left: 3px solid var(--color-bright-red);
  margin-top: var(--space-lg);
}

.form-confirmation.is-visible {
  display: block;
}

.confirmation-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-cream);
}

/* ---------- Kakao Contact (카카오톡 문의) ---------- */
/* KakaoTalk official brand colors: yellow #FEE500, brown text #3C1E1E */
.kakao-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  background-color: #FEE500;
  color: #3C1E1E;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.kakao-cta:hover {
  background-color: #FADA0A;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.kakao-cta:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.kakao-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
}

.kakao-cta-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.kakao-cta--lg {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

/* Hero CTA placement */
.hero-kakao-cta {
  position: relative;
  z-index: 1;
  margin-top: var(--space-xl);
}

/* Contact page Kakao card */
.kakao-contact {
  display: flex;
  gap: var(--space-xl);
  align-items: center;
  max-width: 720px;
  padding: var(--space-xl);
  background-color: var(--color-dark-red);
  border-left: 3px solid var(--color-bright-red);
  border-radius: 4px;
}

.kakao-contact-media {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  background-color: var(--color-cream);
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kakao-contact-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.kakao-contact-body {
  flex: 1;
  min-width: 0;
}

.kakao-contact-lead {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-bright-red);
  margin-bottom: var(--space-xs);
}

.kakao-contact-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-cream);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.kakao-contact-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--color-cream-light);
  margin-bottom: var(--space-lg);
}

@media (max-width: 767px) {
  .kakao-contact {
    flex-direction: column;
    text-align: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
  }

  .kakao-contact-media {
    width: 160px;
    height: 160px;
  }

  .kakao-cta--lg {
    padding: 0.9rem 2rem;
    font-size: 1rem;
  }
}

/* ---------- Project Detail Page ---------- */
.project-detail {
  padding: var(--space-xl) var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  color: var(--color-sidebar-text);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-lg);
  transition: color 0.3s ease;
}

.back-link:hover {
  color: #FFFFFF;
}

.project-detail-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.project-detail-images {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.project-detail-images img {
  width: 100%;
  height: auto;
  display: block;
}

.project-detail-info {
  padding: var(--space-md) 0;
}

.project-detail-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--color-cream);
  margin-bottom: var(--space-sm);
}

.project-detail-category {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-bright-red);
  border: 1px solid var(--color-bright-red);
  padding: 0.2rem 0.6rem;
  margin-bottom: var(--space-lg);
}

.project-detail-desc {
  margin-bottom: var(--space-lg);
}

.project-detail-desc p {
  color: var(--color-cream-light);
  font-size: 0.95rem;
  line-height: 1.9;
  margin-bottom: var(--space-md);
}

.project-detail-specs {
  border-top: 1px solid rgba(232, 213, 183, 0.15);
  padding-top: var(--space-md);
}

.project-detail-specs p {
  color: var(--color-cream-light);
  font-size: 0.9rem;
  line-height: 1.8;
}

.spec-label {
  color: var(--color-bright-red);
  font-weight: 600;
  margin-right: var(--space-sm);
}

@media (min-width: 768px) {
  .project-detail-layout {
    flex-direction: row;
  }

  .project-detail-images {
    flex: 3;
  }

  .project-detail-info {
    flex: 2;
    padding: 0 0 0 var(--space-xl);
    position: sticky;
    top: var(--space-lg);
    align-self: flex-start;
  }
}

/* ---------- Project Modal ---------- */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.project-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.project-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(90, 46, 51, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.project-modal-content {
  position: relative;
  background-color: rgba(78, 37, 40, 0.92);
  border-radius: 16px;
  max-width: 1400px;
  width: 95%;
  max-height: 95vh;
  overflow-y: auto;
  transform: translateY(30px) scale(0.95);
  transition: transform 0.35s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(232, 213, 183, 0.1);
}

.project-modal.is-open .project-modal-content {
  transform: translateY(0) scale(1);
}

.project-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 2rem;
  color: var(--color-cream);
  cursor: pointer;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.project-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.project-modal-body {
  display: flex;
  flex-direction: column;
}

.project-modal-images {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}

/* Main hero image */
.project-modal-main-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  cursor: pointer;
  max-height: 60vh;
  object-fit: cover;
}

/* Horizontal thumbnail strip */
.project-modal-thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.project-modal-thumbs img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  flex-shrink: 0;
}

.project-modal-thumbs img:hover,
.project-modal-thumbs img.is-active {
  opacity: 1;
}

/* Full-screen lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 10;
}

.project-modal-info {
  padding: var(--space-lg);
  background-color: var(--color-darker-red);
  border-radius: 12px;
  margin: 8px 8px 8px 0;
}

.project-modal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--color-cream);
  margin-bottom: var(--space-sm);
}

.project-modal-category {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-bright-red);
  border: 1px solid var(--color-bright-red);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-bottom: var(--space-lg);
}

.project-modal-desc p {
  color: var(--color-cream-light);
  font-size: 0.9rem;
  line-height: 1.9;
  margin-bottom: var(--space-md);
}

.project-modal-specs {
  border-top: 1px solid rgba(232, 213, 183, 0.15);
  padding-top: var(--space-md);
  margin-top: var(--space-sm);
}

.project-modal-specs p {
  color: var(--color-cream-light);
  font-size: 0.85rem;
  line-height: 1.8;
}

.project-modal-specs .spec-label {
  color: var(--color-bright-red);
  font-weight: 600;
}

@media (min-width: 768px) {
  .project-modal-body {
    flex-direction: row;
  }

  .project-modal-images {
    flex: 4;
  }

  .project-modal-info {
    flex: 1.5;
    padding: var(--space-xl) var(--space-lg);
    margin: 8px 8px 8px 0;
    min-width: 260px;
  }
}

/* ---------- Event Page — Blog Style ---------- */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.blog-card {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-md);
  border-radius: 10px;
  background-color: var(--color-dark-red);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
  border: 1px solid transparent;
}

.blog-card:hover {
  background-color: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
  border-color: var(--color-bright-red);
}

.blog-card-thumb {
  flex-shrink: 0;
  width: 200px;
  height: 140px;
  border-radius: 8px;
  overflow: hidden;
}

.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.blog-card-date {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--color-bright-red);
  margin-bottom: var(--space-xs);
}

.blog-card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--color-cream);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.blog-card-excerpt {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--color-sidebar-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Blog Empty State — shown when there are no posts yet */
.blog-empty {
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: var(--color-sidebar-text);
}

.blog-empty-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
  color: inherit;
}

.blog-empty-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: inherit;
  opacity: 0.75;
}

/* Blog Modal */
.blog-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.blog-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.blog-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(90, 46, 51, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.blog-modal-content {
  position: relative;
  background-color: rgba(78, 37, 40, 0.95);
  border-radius: 16px;
  max-width: 1000px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(30px) scale(0.95);
  transition: transform 0.35s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(232, 213, 183, 0.1);
}

.blog-modal.is-open .blog-modal-content {
  transform: translateY(0) scale(1);
}

.blog-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 2rem;
  color: var(--color-cream);
  cursor: pointer;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: none;
  border: none;
  transition: background-color 0.2s ease;
}

.blog-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.blog-modal-body {
  display: flex;
  flex-direction: column;
}

.blog-modal-image {
  padding: 12px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.blog-modal-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.blog-modal-info {
  padding: var(--space-lg);
}

.blog-modal-date {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--color-bright-red);
  margin-bottom: var(--space-sm);
}

.blog-modal-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--color-cream);
  margin-bottom: var(--space-lg);
  line-height: 1.4;
}

.blog-modal-text p {
  color: var(--color-cream-light);
  font-size: 0.9rem;
  line-height: 1.9;
  margin-bottom: var(--space-md);
}

@media (min-width: 768px) {
  .blog-modal-body {
    flex-direction: row;
  }

  .blog-modal-image {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    max-height: 85vh;
  }

  .blog-modal-image img {
    height: auto;
    min-height: auto;
  }

  .blog-modal-info {
    flex: 1;
    padding: var(--space-xl) var(--space-lg);
    overflow-y: auto;
    max-height: 85vh;
  }
}

@media (max-width: 767px) {
  .blog-card {
    flex-direction: column;
    gap: var(--space-md);
  }

  .blog-card-thumb {
    width: 100%;
    height: 180px;
  }
}

.event-content {
  text-align: center;
  padding: var(--space-2xl) 0;
}

.event-placeholder {
  color: var(--color-sidebar-text);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

/* ---------- Responsive: Mobile (below 768px) ---------- */
@media (max-width: 767px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .hamburger-btn {
    display: flex;
  }

  .hero-section {
    padding-top: 60px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
}

/* ---------- Responsive: Tablet (768px+) ---------- */
@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .section-header {
    font-size: 2.5rem;
  }
}

/* ---------- Responsive: Desktop (1024px+) ---------- */
@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}
