/*
 * Sinop Kamp Ateşi - Premium Custom Stylesheet
 * Handcrafted Night Forest & Campfire Theme
 */

/* ==========================================================================
   1. CSS Reset & Base Variables
   ========================================================================== */
:root {
  /* Color Palette */
  --bg-dark: #0d0d0d;
  --bg-card: rgba(30, 61, 47, 0.08);
  --bg-card-hover: rgba(30, 61, 47, 0.16);
  --orange-primary: #ff7a00;
  --orange-glow: rgba(255, 122, 0, 0.35);
  --forest-dark: #1e3d2f;
  --nature-green: #2f5d50;
  --warm-white: #f5f1e8;
  --text-white: #ffffff;
  --text-muted: #b8b8b8;
  --border-color: rgba(47, 93, 80, 0.25);
  --border-hover: rgba(255, 122, 0, 0.4);

  /* Fonts */
  --font-heading: verdana, sans-serif;
  --font-body: "Outfit", sans-serif;

  /* Layout Variables */
  --header-height: 80px;
  --border-radius: 12px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-white);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--warm-white);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--orange-primary);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   2. Typography
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--warm-white);
  line-height: 1.2;
  letter-spacing: 0.03em;
}

h1 {
  font-size: 3rem;
}
h2 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  position: relative;
}
h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
h4 {
  font-size: 1.15rem;
}

p {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.text-orange {
  color: var(--orange-primary);
}

.text-center {
  text-align: center;
}

/* Section Header styling with fire element */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--orange-primary);
  margin: 12px auto 0;
  box-shadow: 0 0 10px var(--orange-primary);
  border-radius: 2px;
}

/* ==========================================================================
   3. Buttons & Interactive Elements
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--orange-primary);
  color: var(--bg-dark);
  box-shadow: 0 4px 20px rgba(255, 122, 0, 0.4);
  font-weight: 600;
}

.btn-primary:hover {
  background-color: #ff9133;
  color: var(--bg-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 122, 0, 0.6);
}

.btn-outline {
  background-color: transparent;
  color: var(--warm-white);
  border-color: var(--border-color);
}

.btn-outline:hover {
  color: var(--orange-primary);
  border-color: var(--orange-primary);
  box-shadow: 0 0 15px var(--orange-glow);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

/* ==========================================================================
   4. Navigation & Header
   ========================================================================== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(13, 13, 13, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.main-header.scrolled {
  height: 70px;
  background: rgba(13, 13, 13, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.header-container {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--warm-white);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.fire-icon {
  animation: flicker 2s infinite alternate;
}

.nav-list {
  display: flex;
  gap: 30px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 400;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--orange-primary);
  transition: var(--transition-smooth);
}

.nav-link:hover::after {
  width: 100%;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-login-header {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.btn-login-header:hover {
  color: var(--warm-white);
}

/* User Dropdown */
.user-dropdown {
  position: relative;
  display: inline-block;
}

.user-dropdown-btn {
  background: transparent;
  border: none;
  color: var(--warm-white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-avatar-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--nature-green);
}

.dropdown-chevron {
  transition: var(--transition-smooth);
}

.user-dropdown.open .dropdown-chevron {
  transform: rotate(180deg);
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 40px;
  background-color: #121212;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  z-index: 9999;
  overflow: hidden;
}

.dropdown-content a {
  color: var(--text-muted);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 0.9rem;
}

.dropdown-content a:hover {
  background-color: var(--forest-dark);
  color: var(--warm-white);
}

.dropdown-divider {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 0;
}

/* Dropdown opens via JS .open class — NOT hover */
.user-dropdown.open .dropdown-content {
  display: block;
  animation: fadeIn 0.15s ease;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.mobile-toggle .bar {
  width: 25px;
  height: 2px;
  background-color: var(--warm-white);
  transition: var(--transition-smooth);
}

/* ==========================================================================
   5. Hero Section
   ========================================================================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  padding-top: var(--header-height);
}

/* Overlay gradient to blend into dark page */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(13, 13, 13, 0.4) 0%,
    rgba(13, 13, 13, 0.95) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.hero h1 {
  font-size: 3.5rem;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.hero-subheading {
  font-size: 1.25rem;
  color: var(--orange-primary);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin-bottom: 2rem;
  font-weight: 500;
}

.hero-buttons {
  display: flex;
  gap: 20px;
}

/* Simulated embers floating in Hero using CSS */
.hero-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* ==========================================================================
   6. General Layouts & Modules
   ========================================================================== */
.main-content {
  padding-top: calc(var(--header-height) + 20px);
  flex: 1 0 auto;
}

/* Section base formatting */
.section {
  padding: 100px 0;
}

.section-dark {
  background-color: #080808;
}

/* Cards Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

/* Custom premium card layout */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(255, 122, 0, 0.08);
}

.card-img-wrap {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  transition: var(--transition-smooth);
}

.card:hover .card-img-wrap img {
  transform: scale(1.05);
}

.card-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--orange-primary);
  color: var(--bg-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta {
  display: flex;
  gap: 15px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-body h3 {
  margin-bottom: 12px;
}

.card-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   7. Form Controls
   ========================================================================== */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  color: var(--warm-white);
  font-size: 0.9rem;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px 16px;
  color: var(--text-white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--orange-primary);
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 10px rgba(255, 122, 0, 0.2);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-error {
  color: #ff4a4a;
  font-size: 0.8rem;
  margin-top: 6px;
}

/* ==========================================================================
   8. Flash Messages & Alerts
   ========================================================================== */
.flash-container {
  margin-bottom: 20px;
}

.alert {
  padding: 16px 20px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  border-left: 4px solid;
}

.alert-success {
  background-color: rgba(47, 93, 80, 0.2);
  border-color: #2f5d50;
  color: #b3dfce;
}

.alert-danger {
  background-color: rgba(255, 74, 74, 0.1);
  border-color: #ff4a4a;
  color: #ffb8b8;
}

.alert-warning {
  background-color: rgba(255, 122, 0, 0.1);
  border-color: var(--orange-primary);
  color: #ffd1a4;
}

/* ==========================================================================
   9. Footer Styles
   ========================================================================== */
.main-footer {
  background-color: #070707;
  border-top: 1px solid var(--border-color);
  padding-top: 80px;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.5fr 2fr 1.5fr;
  gap: 60px;
}

.footer-info .logo-text {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: block;
}

.footer-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.social-links a:hover {
  color: var(--orange-primary);
  border-color: var(--orange-primary);
  box-shadow: 0 0 10px var(--orange-glow);
}

.footer-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.footer-col h4,
.footer-newsletter h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--warm-white);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-col a:hover {
  color: var(--orange-primary);
  padding-left: 5px;
}

.footer-newsletter p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.form-group-newsletter {
  display: flex;
  gap: 10px;
}

.form-group-newsletter input {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  color: var(--text-white);
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.form-group-newsletter input:focus {
  outline: none;
  border-color: var(--orange-primary);
}

.form-group-newsletter .btn {
  border-radius: 50px;
  padding: 10px 24px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  margin-top: 60px;
  padding: 30px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.bottom-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.legal-links {
  display: flex;
  gap: 20px;
}

.legal-links a {
  color: var(--text-muted);
}

.legal-links a:hover {
  color: var(--orange-primary);
}

/* ==========================================================================
   10. Gallery Masonry & Lightbox
   ========================================================================== */
.gallery-grid {
  column-count: 3;
  column-gap: 20px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: auto;
  transition: var(--transition-smooth);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    0deg,
    rgba(13, 13, 13, 0.85) 0%,
    rgba(13, 13, 13, 0.2) 100%
  );
  opacity: 0;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.gallery-overlay p {
  font-size: 0.8rem;
  margin-bottom: 0;
  color: var(--warm-white);
}

/* Lightbox Styling */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(13, 13, 13, 0.95);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 85%;
  max-height: 80%;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border: 2px solid var(--border-color);
  border-radius: 4px;
}

.lightbox-caption {
  text-align: center;
  color: var(--warm-white);
  margin-top: 15px;
  font-family: var(--font-heading);
}

.lightbox-close {
  position: absolute;
  top: 25px;
  right: 35px;
  color: var(--warm-white);
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  background: transparent;
  border: none;
}

.lightbox-close:hover {
  color: var(--orange-primary);
}

/* ==========================================================================
   11. Animations
   ========================================================================== */
@keyframes flicker {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 2px var(--orange-primary));
  }
  100% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px #ffa800);
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   12. Responsive Media Queries
   ========================================================================== */
@media (max-width: 992px) {
  h1 {
    font-size: 2.5rem;
  }
  .hero h1 {
    font-size: 2.75rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .gallery-grid {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: rgba(13, 13, 13, 0.98);
    border-bottom: 1px solid var(--border-color);
    padding: 30px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  }

  .nav-menu.active {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  .user-actions {
    margin-left: auto;
    margin-right: 20px;
  }

  .hero-content {
    padding: 0 10px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .bottom-container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .gallery-grid {
    column-count: 1;
  }
}

/* ==========================================================================
   13. Scroll Reveal Animations
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition:
    opacity 1s cubic-bezier(0.215, 0.61, 0.355, 1),
    transform 1s cubic-bezier(0.215, 0.61, 0.355, 1);
  will-change: opacity, transform;
}

.reveal.reveal-left {
  transform: translateX(-40px) translateY(0);
}

.reveal.reveal-right {
  transform: translateX(40px) translateY(0);
}

.reveal.reveal-scale {
  transform: scale(0.95);
}

.reveal.active {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* ==========================================================================
   14. Mobile Responsive Layout Fixes
   ========================================================================== */
.details-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 768px) {
  .details-grid,
  .profile-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* Testimonials layout on mobile */
  .testimonials-container {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Stats bar layout on mobile */
  .stats-bar {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }

  /* Header mobile adjustment (Avatar on far right, hamburger next to it) */
  .user-dropdown-btn .username-display,
  .user-dropdown-btn .dropdown-chevron {
    display: none !important;
  }

  .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .user-actions {
    order: 2 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    gap: 10px !important;
  }

  .mobile-toggle {
    order: 3 !important;
    margin-left: 10px !important;
  }

  .logo {
    order: 1 !important;
  }

  .user-actions .btn-sm {
    display: none !important;
  }

  .btn-login-header {
    font-size: 0.85rem !important;
    padding: 6px 12px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .stats-bar {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }

  .section {
    padding: 40px 0 !important;
  }

  .container {
    padding: 0 16px !important;
  }
}

/* ==========================================================================
   15. Admin Panel Mobile Responsive Fixes
   ========================================================================== */
.admin-sidebar-mobile {
    display: none;
}

.admin-sidebar-desktop {
    display: block;
}

.admin-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* Make tables scrollable on small screens to prevent layout breakage */
div:has(> table) {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

div:has(> table) table {
    margin-bottom: 0 !important;
}

@media (max-width: 992px) {
    .admin-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .admin-sidebar-mobile {
        display: block !important;
    }
    
    .admin-sidebar-desktop {
        display: none !important;
    }
    
    /* Prevent admin content containers from expanding beyond viewport width */
    .admin-grid > div {
        min-width: 0 !important;
        width: 100% !important;
    }
    
    /* Ensure table rows do not shrink to vertical lines on narrow screens */
    .admin-grid table {
        min-width: 750px !important;
    }
    
    /* Stack admin form grid columns vertically on mobile/tablet viewports */
    .admin-grid form div[style*="display: grid"],
    .admin-grid form div[style*="display:grid"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}
