* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 40px 0; }
.hidden { display: none !important; }

/* Header */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  display: flex; align-items: center;
  transition: background var(--transition);
}
.header__inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-weight: 700; font-size: 1.25rem; color: var(--accent); }
.nav { display: flex; gap: 20px; }
.nav__link { color: var(--text-primary); text-decoration: none; font-weight: 500; transition: color var(--transition); }
.nav__link:hover { color: var(--accent); }

/* Hero */
.hero {
  position: relative; height: 70vh; min-height: 400px;
  display: flex; align-items: center; justify-content: center;
  background: url('../assets/images/hero-bg.jpg') center/cover no-repeat;
  color: #fff; text-align: center;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
}
.hero__content { position: relative; z-index: 2; max-width: 700px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 16px; line-height: 1.2; }
.hero p { font-size: 1.1rem; margin-bottom: 24px; opacity: 0.9; }

/* Grid */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px; margin-top: 24px;
}

/* Modal (Dialog) */
.modal {
  border: none; padding: 0; background: transparent; max-width: 800px; width: 100%;
  margin: auto; border-radius: var(--radius); overflow: hidden;
}
.modal::backdrop { background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.modal__content {
  background: var(--bg-secondary); height: 100%; display: flex; flex-direction: column;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.modal__close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  background: rgba(0,0,0,0.5); color: #fff; border-radius: 50%; width: 32px; height: 32px;
}
.modal__body { display: flex; flex-direction: column; overflow: auto; max-height: 80vh; }
.modal__img { width: 100%; height: 250px; object-fit: cover; }
.modal__info { padding: 24px; color: var(--text-primary); }

/* Footer */
.footer { padding: 40px 0; text-align: center; border-top: 1px solid var(--border); margin-top: 40px; color: var(--text-secondary); }

/* Responsive */
@media (max-width: 768px) {
  .nav { display: none; }
  .container { padding: 0 14px; }
  .section { padding: 28px 0; }
  .hero { height: 52vh; min-height: 320px; }
  .hero p { font-size: 1rem; margin-bottom: 18px; }
  .grid { grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
  .modal { width: 100%; max-width: none; border-radius: var(--radius) var(--radius) 0 0; align-self: flex-end; height: 94%; }
  .modal__img { height: 200px; }
  .modal__close { top: 10px; right: 10px; }
  .modal__info { padding: 16px; }
}

@media (max-width: 420px) {
  .logo { font-size: 1.1rem; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 0.95rem; }
}