/* ─── RESET & BASE ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Montserrat is loaded from Google Fonts (see header.php). */

:root {
  --brand-primary: #6c63ff;
  --brand-secondary: #f5f5f5;
  --text-dark: #1a1a2e;
  --text-muted: #666;
  --bg: #fff;
  --card-bg: #fff;
  --border: #e8e8e8;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.07);
  --shadow-hover: 0 8px 40px rgba(0,0,0,.13);
  --font: 'Montserrat', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --transition: .25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.7;
  font-size: 1rem;
}

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

a { color: var(--brand-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

ul { list-style: none; }

/* ─── UTILITIES ─────────────────────────────────────────────────────────────── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  color: var(--text-dark);
}
.section-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 4px;
  background: var(--brand-primary);
  border-radius: 2px;
  margin: .75rem auto 0;
}

.empty-state { text-align: center; color: var(--text-muted); font-size: 1.1rem; }

/* ─── BUTTONS ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .75rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  line-height: 1;
}
.btn--primary {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}
.btn--primary:hover {
  filter: brightness(1.12);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(108,99,255,.35);
}
.btn--outline {
  background: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.btn--outline:hover {
  background: var(--brand-primary);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

/* ─── NAVIGATION ────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav__logo { display: flex; align-items: center; }
.nav__logo-img { height: 44px; object-fit: contain; }
.nav__logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -.5px;
  text-decoration: none;
}
.nav__links {
  display: flex;
  gap: 2rem;
}
.nav__links a {
  color: var(--text-dark);
  font-weight: 500;
  font-size: .95rem;
  transition: color var(--transition);
  text-decoration: none;
}
.nav__links a:hover { color: var(--brand-primary); }
.nav__toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
}

/* ─── HERO — minimal, white, compact ────────────────────────────────────────── */
.hero {
  background: #fff;
  padding: 4rem 0 3rem;
  text-align: center;
}
.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero__heading {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-dark);
  letter-spacing: -.3px;
}
.hero__sub {
  font-size: .95rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 1.75rem;
  line-height: 1.75;
  font-weight: 400;
}
.hero__cta {
  font-size: .9rem;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ─── PROJECTS GRID — sharp corners, square images, Bolge style ─────────────── */
.projects-section { padding: 2rem 0 5rem; background: #fff; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 2rem;
}
.project-card { background: transparent; }
.project-card__link { display: block; text-decoration: none; color: inherit; }
.project-card__img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;   /* square */
  background: #f0f0f0;
}
.project-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .3s ease;
}
.project-card__link:hover .project-card__img { opacity: .88; }
.project-card__img-placeholder {
  width: 100%;
  height: 100%;
  background: #e8e8e8;
}
.project-card__body {
  padding: .9rem 0 0;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.project-card__title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: .2rem;
  letter-spacing: .1px;
  width: 100%;
  text-align: center;
}
.project-card__category {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 400;
  width: 100%;
  text-align: center;
}

/* ─── PROJECT DETAIL — images first, details below ──────────────────────────── */
.project-detail { padding-bottom: 6rem; }

.project-detail__back {
  display: inline-block;
  padding: 2rem 0 1.5rem;
  font-size: .85rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: .3px;
  transition: color var(--transition);
}
.project-detail__back:hover { color: var(--text-dark); text-decoration: none; }

/* Full-width images area */
.project-detail__images { padding: 0 0 2.5rem; }

.project-detail__featured { margin-bottom: 1rem; }
.project-detail__featured-img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  aspect-ratio: 16/8;
  object-fit: cover;
}

.project-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}
.project-gallery__img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: opacity .3s ease;
}
.project-gallery__img:hover { opacity: .88; }

/* Info section below images — left-aligned, same width as image grid */
.project-detail__info {
  padding-top: 3rem;
}
.project-detail__title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 2rem;
  line-height: 1.2;
  color: var(--text-dark);
}
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.project-meta__item { display: flex; flex-direction: column; gap: .25rem; }
.project-meta__item dt {
  font-weight: 600;
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.project-meta__item dd { color: var(--text-dark); font-size: .9rem; }
.project-detail__description {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text-dark);
  margin-bottom: 3rem;
}
.project-detail__back--bottom {
  display: inline-block;
  font-size: .85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.project-detail__back--bottom:hover { color: var(--text-dark); text-decoration: none; }

/* ─── LIGHTBOX ──────────────────────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.lightbox.active { display: flex; }
.lightbox__img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
}
.lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
}

/* ─── FOOTER — 3-column dark layout, Bolge style ────────────────────────────── */
.site-footer {
  background: #415092;
  color: rgba(255,255,255,.65);
  padding: 3.5rem 0;
  font-size: .875rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1.4fr auto;
  gap: 2rem;
  align-items: start;
}

/* Brand column */
.footer__brand-name {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .5rem;
  letter-spacing: -.2px;
}
.footer__brand-tag {
  color: rgba(255,255,255,.5);
  font-size: .8rem;
  line-height: 1.6;
  margin: 0;
}

/* Contact column */
.footer__contact p {
  margin: 0 0 .4rem;
  line-height: 1.5;
  color: rgba(255,255,255,.6);
  font-size: .82rem;
}
.footer__contact a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color var(--transition);
}
.footer__contact a:hover { color: #fff; }

/* Social icons column — small circular buttons */
.footer__social {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-top: .15rem;
}
.footer__social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.7);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.footer__social-icon:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.6);
  color: #fff;
  text-decoration: none;
}

/* ─── ADMIN STYLES ──────────────────────────────────────────────────────────── */
.admin-body {
  background: #f0f2f5;
  font-family: var(--font);
  min-height: 100vh;
}
.admin-header {
  background: var(--text-dark);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.admin-header__brand {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}
.admin-header__nav a {
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  margin-left: 1.5rem;
  text-decoration: none;
  transition: color var(--transition);
}
.admin-header__nav a:hover { color: #fff; }
.admin-layout { display: flex; min-height: calc(100vh - 60px); }
.admin-sidebar {
  width: 240px;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  flex-shrink: 0;
}
.admin-sidebar nav a {
  display: block;
  padding: .75rem 1.5rem;
  color: var(--text-dark);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: var(--transition);
}
.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
  color: var(--brand-primary);
  background: rgba(108,99,255,.06);
  border-left-color: var(--brand-primary);
}
.admin-content { flex: 1; padding: 2rem; overflow-x: auto; }
.admin-content h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}
.admin-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.admin-form-group { margin-bottom: 1.25rem; }
.admin-form-group label {
  display: block;
  font-weight: 600;
  font-size: .875rem;
  margin-bottom: .4rem;
  color: var(--text-dark);
}
.admin-form-group small {
  display: block;
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .3rem;
}
.admin-input,
.admin-textarea,
.admin-select {
  width: 100%;
  padding: .65rem .9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  font-family: var(--font);
  color: var(--text-dark);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.admin-input:focus,
.admin-textarea:focus,
.admin-select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,.12);
}
.admin-textarea { min-height: 120px; resize: vertical; }
.admin-submit { margin-top: .5rem; }
.btn--admin {
  background: var(--brand-primary);
  color: #fff;
  border: none;
  padding: .7rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}
.btn--admin:hover { filter: brightness(1.1); transform: translateY(-1px); text-decoration: none; }
.btn--danger { background: #e74c3c; color: #fff; border: none; }
.btn--danger:hover { background: #c0392b; }
.btn--secondary-admin { background: #6c757d; }
.btn--sm { padding: .4rem 1rem; font-size: .8rem; }

.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th,
.admin-table td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { font-weight: 600; background: var(--brand-secondary); color: var(--text-dark); font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; }
.admin-table tr:hover td { background: rgba(108,99,255,.03); }
.admin-table .thumb { width: 60px; height: 45px; object-fit: cover; border-radius: 6px; }
.admin-table .actions { white-space: nowrap; }
.admin-table .actions a,
.admin-table .actions button { margin-right: .5rem; }

.badge { display: inline-block; padding: .25rem .65rem; border-radius: 50px; font-size: .75rem; font-weight: 600; }
.badge--green { background: #d5f5e3; color: #1e8449; }
.badge--red   { background: #fadbd8; color: #922b21; }

.flash { padding: .9rem 1.25rem; border-radius: 8px; margin-bottom: 1.5rem; font-weight: 500; }
.flash--success { background: #d5f5e3; color: #1e8449; border-left: 4px solid #27ae60; }
.flash--error   { background: #fadbd8; color: #922b21; border-left: 4px solid #e74c3c; }

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #a29bfe 100%);
}
.login-card {
  background: #fff;
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  width: 100%;
  max-width: 400px;
}
.login-card__title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--text-dark);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
.dashboard-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--text-dark);
  transition: transform var(--transition), box-shadow var(--transition);
  border-top: 4px solid var(--brand-primary);
}
.dashboard-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); text-decoration: none; }
.dashboard-card__icon { font-size: 2rem; margin-bottom: .75rem; }
.dashboard-card__label { font-weight: 600; font-size: .95rem; }

.thumb-preview { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; margin-top: .5rem; }

.color-row { display: flex; align-items: center; gap: .75rem; }
.color-row input[type="color"] { width: 48px; height: 36px; padding: 2px; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }

/* ─── RESPONSIVE ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__social { grid-column: 1 / -1; justify-content: flex-start; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding: .75rem 0; }
  .admin-sidebar nav { display: flex; overflow-x: auto; padding: 0 .5rem; gap: .25rem; }
  .admin-sidebar nav a { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .admin-sidebar nav a:hover,
  .admin-sidebar nav a.active { border-left-color: transparent; border-bottom-color: var(--brand-primary); }
}
@media (max-width: 640px) {
  .nav__links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: #fff; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .nav__links.open { display: flex; }
  .nav__toggle { display: block; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-gallery__grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__social { justify-content: flex-start; }
  .admin-header { padding: 0 1rem; }
  .admin-content { padding: 1rem; }
}
