/* ==========================================================================
   CESA Özel Güvenlik Hizmetleri ve Eğitim Kurumu
   Modernize Edilmiş Ortak Stil Dosyası
   ========================================================================== */

:root {
  --bg-dark: #000000;
  --bg-page: #0d0d0d;
  --bg-container: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1c1c1c;
  --bg-dropdown: #181818;
  --color-gold: #fdc800;
  --color-gold-hover: #ffd933;
  --color-blue: #00ccff;
  --color-text: #cccccc;
  --color-text-light: #f0f0f0;
  --color-text-muted: #888888;
  --border-dark: #2a2a2a;
  --border-light: #383838;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container-width: 980px;
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  background-image: radial-gradient(#1a1a1a 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--color-text);
  font-family: var(--font-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-gold-hover);
  text-decoration: underline;
}

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

/* Site Ana Kapsayıcı */
.site-wrapper {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  background-color: var(--bg-container);
  border: 1px solid var(--border-dark);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ==========================================================================
   Üst Bilgi ve Hızlı Erişim Çubuğu (Top Bar)
   ========================================================================== */
.top-bar {
  background-color: #080808;
  border-bottom: 1px solid var(--border-dark);
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--color-text-muted);
}

.top-bar-contact {
  display: flex;
  gap: 16px;
  align-items: center;
}

.top-bar-contact a {
  color: var(--color-text-light);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.top-bar-contact a:hover {
  color: var(--color-gold);
  text-decoration: none;
}

.top-bar-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.top-bar-links a {
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.top-bar-links a:hover {
  color: var(--color-gold);
  text-decoration: none;
}

.top-bar-links .badge-link {
  background: #222;
  color: var(--color-gold);
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid var(--border-dark);
  font-weight: 500;
}

.top-bar-links .badge-link:hover {
  background: var(--color-gold);
  color: #000;
}

/* ==========================================================================
   Header Banner
   ========================================================================== */
.site-header {
  width: 100%;
  background-color: #000;
  line-height: 0;
}

.site-header img {
  width: 100%;
  height: auto;
}

/* ==========================================================================
   Navigasyon / Menü
   ========================================================================== */
.navbar {
  background: linear-gradient(180deg, #1f1f1f 0%, #111111 100%);
  border-top: 1px solid #333333;
  border-bottom: 2px solid var(--color-gold);
  position: relative;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Mobil Menü Butonu */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  padding: 12px 16px;
  font-size: 16px;
  cursor: pointer;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  font-weight: bold;
}

.mobile-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
  flex: 1 1 auto;
  text-align: center;
}

.nav-link {
  display: block;
  padding: 12px 10px;
  font-size: 12px;
  font-weight: bold;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-right: 1px solid #282828;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}

.nav-item:last-child .nav-link {
  border-right: none;
}

.nav-link:hover,
.nav-item.active > .nav-link,
.nav-item:focus-within > .nav-link {
  background-color: #2b2b2b;
  color: var(--color-gold);
  text-decoration: none;
}

/* Açılır Menü (Dropdown) */
.has-dropdown > .nav-link::after {
  content: " ▾";
  font-size: 10px;
  opacity: 0.8;
}

.dropdown-menu {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background-color: var(--bg-dropdown);
  border: 1px solid var(--border-light);
  border-top: 2px solid var(--color-gold);
  box-shadow: 0 8px 20px rgba(0,0,0,0.7);
  display: none;
  padding: 4px 0;
  z-index: 1001;
  text-align: left;
}

.dropdown-menu li a {
  display: block;
  padding: 9px 15px;
  font-size: 12px;
  font-weight: 600;
  color: #dddddd;
  border-bottom: 1px solid #222222;
  transition: all 0.15s ease;
}

.dropdown-menu li:last-child a {
  border-bottom: none;
}

.dropdown-menu li a:hover {
  background-color: #252525;
  color: var(--color-gold);
  padding-left: 19px;
  text-decoration: none;
}

/* Masaüstünde Hover ile Açılma */
@media (min-width: 769px) {
  .nav-item.has-dropdown:hover > .dropdown-menu,
  .nav-item.has-dropdown:focus-within > .dropdown-menu {
    display: block;
  }
}

/* ==========================================================================
   Ana İçerik Alanı
   ========================================================================== */
.site-content {
  padding: 24px 20px;
  flex: 1;
}

/* Sayfa Başlıkları */
.page-header-banner {
  text-align: center;
  margin-bottom: 24px;
}

.page-header-banner img {
  display: inline-block;
}

.page-title {
  color: var(--color-gold);
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 12px;
}

.section-title {
  color: #ffffff;
  font-size: 15px;
  font-weight: bold;
  margin: 16px 0 10px;
}

/* ==========================================================================
   Ana Sayfa Özel Düzeni (3 Kolonlu Kartlar)
   ========================================================================== */
.home-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 10px;
}

.home-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.home-card:hover {
  border-color: var(--color-gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}

.home-card-header {
  background-color: #0c0c0c;
  text-align: center;
  border-bottom: 1px solid var(--border-dark);
  line-height: 0;
}

.home-card-header img {
  width: 100%;
  height: auto;
}

.home-card-image {
  overflow: hidden;
  line-height: 0;
}

.home-card-image img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.home-card:hover .home-card-image img {
  transform: scale(1.03);
}

.home-card-body {
  padding: 16px;
  font-size: 13px;
  line-height: 1.6;
  text-align: justify;
  color: #bbbbbb;
  flex: 1;
}

/* ==========================================================================
   İç Sayfa Düzenleri (2 Kolonlu: Yan Görsel + Metin)
   ========================================================================== */
.page-layout-split {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

.page-sidebar-media {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-sidebar-media img {
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  width: 100%;
}

.page-main-text {
  font-size: 13.5px;
  line-height: 1.8;
  color: #d0d0d0;
}

.page-main-text p {
  margin-bottom: 14px;
  text-align: justify;
}

.page-main-text ul {
  margin: 14px 0 18px 24px;
}

.page-main-text li {
  margin-bottom: 8px;
}

/* Belge ve Sertifika Thumbnail Galerisi */
.cert-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.cert-thumbnail {
  border: 1px solid var(--border-dark);
  padding: 4px;
  background: #181818;
  border-radius: 4px;
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
}

.cert-thumbnail:hover {
  border-color: var(--color-gold);
  transform: scale(1.03);
}

.cert-thumbnail img {
  width: 110px;
  height: 150px;
  object-fit: cover;
}

/* Foto Galeri Izgarası */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.gallery-item {
  border: 1px solid var(--border-dark);
  background: #141414;
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.25s ease;
  cursor: pointer;
}

.gallery-item:hover {
  border-color: var(--color-gold);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.6);
}

.gallery-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

/* ==========================================================================
   Tablolar ve Form Listeleri (Mevzuat, Şartlar, Belgeler vb.)
   ========================================================================== */
.modern-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
}

.modern-table th,
.modern-table td {
  padding: 10px 14px;
  border: 1px solid var(--border-dark);
  text-align: left;
}

.modern-table th {
  background-color: #1e1e1e;
  color: var(--color-gold);
  font-weight: bold;
}

.modern-table tr:nth-child(even) {
  background-color: #131313;
}

.modern-table tr:hover {
  background-color: #1a1a1a;
}

/* Basın Sayfası Tablosu / Izgarası */
.press-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.press-item {
  border: 1px solid var(--border-dark);
  background: #161616;
  padding: 8px;
  border-radius: 4px;
  text-align: center;
  transition: border-color 0.2s;
}

.press-item:hover {
  border-color: var(--color-gold);
}

.press-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 2px;
}

/* ==========================================================================
   İletişim ve Harita
   ========================================================================== */
.contact-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  padding: 24px;
  max-width: 600px;
  width: 100%;
  line-height: 1.8;
  font-size: 14px;
}

.contact-card h3 {
  color: var(--color-gold);
  margin-bottom: 12px;
  font-size: 16px;
}

.map-wrapper {
  width: 100%;
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  overflow: hidden;
  line-height: 0;
}

.map-wrapper iframe {
  width: 100%;
  height: 450px;
  border: 0;
}

/* ==========================================================================
   Basit ve Temiz Lightbox Modal
   ========================================================================== */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border: 2px solid var(--color-gold);
  box-shadow: 0 10px 40px rgba(0,0,0,0.9);
  animation: modalZoom 0.25s ease;
}

@keyframes modalZoom {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #fff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: var(--color-gold);
}

/* ==========================================================================
   Footer (Alt Bilgi)
   ========================================================================== */
.site-footer {
  background-color: #0a0a0a;
  border-top: 1px solid var(--border-dark);
  padding: 24px 20px 16px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.footer-col {
  flex: 1 1 250px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 13px;
  margin-bottom: 10px;
  border-left: 3px solid var(--color-gold);
  padding-left: 8px;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 6px;
}

.footer-links a {
  color: var(--color-text-muted);
}

.footer-links a:hover {
  color: var(--color-gold);
}

.footer-bottom {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid #1a1a1a;
  font-size: 11px;
}

/* ==========================================================================
   Duyarlı Tasarım (Responsive Media Queries)
   ========================================================================== */
@media (max-width: 768px) {
  .site-wrapper {
    border-left: none;
    border-right: none;
  }

  .top-bar {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .top-bar-contact, .top-bar-links {
    justify-content: center;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    background-color: #141414;
    border-top: 1px solid var(--border-dark);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-item {
    width: 100%;
    text-align: left;
  }

  .nav-link {
    border-right: none;
    border-bottom: 1px solid #222222;
    padding: 12px 18px;
  }

  .dropdown-menu {
    position: static;
    display: none;
    background-color: #1a1a1a;
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .dropdown-menu.is-open {
    display: block;
  }

  .dropdown-menu li a {
    padding-left: 30px;
  }

  .home-cards-grid {
    grid-template-columns: 1fr;
  }

  .page-layout-split {
    grid-template-columns: 1fr;
  }

  .page-sidebar-media {
    max-width: 400px;
    margin: 0 auto;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
  }
}
