/* ============================================================
   STREET LIGHT CONSULTING — BRAND THEME & LAYOUT
   ============================================================ */

/* --- Root Variables --- */
:root {
  --primary: #C19A6B;        /* bronze */
  --secondary: #F5C26B;      /* flame */
  --background-color: #1A1A1A; /* charcoal */
  --color: #EAE6DF;          /* soft white text */
  --muted-color: #CFC7BA;
  --card-background-color: rgba(255,255,255,0.03);
  --border-radius: 14px;
  --transition: all 0.2s ease-in-out;
}

/* ============================================================
   BASE TYPOGRAPHY & GLOBAL COLORS
   ============================================================ */
html, body {
  background: var(--background-color);
  color: var(--color);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", "Lora", Arial, sans-serif;
  line-height: 1.7;
}

p, li, label, fieldset legend {
  color: var(--muted-color);
}

article {
  background-color: var(--background-color);
}

h1 {
  font-family: "Montserrat", sans-serif;
  color: var(--muted-color);
}

h2, h3, h4 {
  font-family: "Montserrat", sans-serif;
  color: var(--primary);
}

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

a:hover {
  color: var(--secondary);
}

/* ============================================================
   NAVIGATION BAR
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(26,26,26,0.95);
  backdrop-filter: blur(6px);
  z-index: 1000;
  padding-block: 0;
}

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

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color);
  text-decoration: none;
}

.brand-text {
  font-weight: 800;
  letter-spacing: 0.5px;
}

main.main-content {
  padding-top: 5rem;
}

/* --- Navigation Links --- */
.nav-links ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color);
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--secondary);
}

/* --- Mobile Navigation --- */
.nav-toggle, .nav-toggle-label {
  display: none;
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: none;
    flex-direction: column;
    text-align: center;
    padding: 1rem 0;
  }

  .nav-links ul {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-toggle:checked + .nav-toggle-label + .nav-links {
    display: flex;
  }

  /* Hamburger button */
  .nav-toggle-label {
    display: block;
    cursor: pointer;
    width: 28px;
    height: 22px;
    position: relative;
  }

  .nav-toggle-label span,
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    content: '';
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--color);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .nav-toggle-label span { top: 10px; }
  .nav-toggle-label span::before { top: -8px; }
  .nav-toggle-label span::after { top: 8px; }

  .nav-toggle:checked + .nav-toggle-label span {
    background: transparent;
  }

  .nav-toggle:checked + .nav-toggle-label span::before {
    transform: rotate(45deg);
    top: 0;
  }

  .nav-toggle:checked + .nav-toggle-label span::after {
    transform: rotate(-45deg);
    top: 0;
  }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  text-align: center;
  padding: 2rem 1rem 4rem;
}

.hero-logo {
  width: 500px;
  height: auto;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6));
}

.hero h1 {
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.hero .tagline {
  color: var(--muted-color);
  margin-bottom: 0.5rem;
}

.hero .intro {
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto 1.25rem;
}

/* ============================================================
   GRID & CARD LAYOUT
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 2rem;
  margin: 1.5rem 0 2rem;
  align-items: stretch;
}

.card {
  background: var(--card-background-color);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius);
  padding: 1.2rem 1.2rem 1.4rem;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

/* Prevent avatar distortion inside posts */
.card img:not(.author-avatar):not(.author-avatar-small) {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 15px;
}


/* ============================================================
   BUTTONS
   ============================================================ */
.btn, .bronze {
  display: inline-block;
  background: var(--primary);
  color: var(--background-color);
  padding: 0.65rem 1.1rem;
  border-radius: 12px;
  font-weight: 700;
  transition: var(--transition);
}

.btn:hover, .bronze:hover {
  background: var(--secondary);
}

/* ============================================================
   PAGES & POSTS
   ============================================================ */
.page .page-body,
.post .post-body {
  margin-top: 0.75rem;
}

.post .meta,
.card .meta,
.price,
.tagline,
.post-preview {
  color: var(--muted-color);
}

.service-detail .service-hero {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}

/* ============================================================
   AUTHOR & AVATAR STYLING
   ============================================================ */
.author-profile {
  max-width: 800px;
  margin: 4rem auto;
  text-align: center;
  padding: 0 1rem;
}

.avatar-frame {
  display: inline-block;
  border-radius: 50%;
  padding: 6px;
  background: #fff;
}

.favicon-style {
  border: 2px solid #eaeaea;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 8px;
  margin-bottom: 15px;
}

/* --- Unified Avatar Style --- */
.avatar-frame {
  display: inline-block;
  border-radius: 50%;
  padding: 6px;
  background: #fff;
  border: 2px solid #eaeaea;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.author-avatar,
.author-avatar-small {
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

/* Sizes */
.author-avatar {
  width: 120px;
  height: 120px;
}

.author-avatar-small {
  width: 60px;   /* increased from 42px to look proportional */
  height: 60px;
  padding: 0;
}


.post-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.avatar-link {
  display: inline-block;
  line-height: 0;
}

.author-text {width:90%;}

.author-text p {
  margin: 0;
  color: var(--muted-color);
  font-size: 0.95rem;
}

.author-text a {
  color: var(--primary);
  font-weight: 600;
}

.author-text a:hover {
  color: var(--secondary);
}

.author-tagline {
  color: #777;
  font-style: italic;
  margin-left: 0.25rem;
}

/* Optional hover glow */
.avatar-link:hover .author-avatar-small {
  box-shadow: 0 0 10px rgba(193, 154, 107, 0.4);
  transition: box-shadow 0.3s ease;
}

/* ============================================================
   SERVICE LAYOUT (IMAGE RIGHT)
   ============================================================ */
.service-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  flex-direction: row-reverse;
}

.service-layout .service-hero {
  width: 40%;
  max-width: 450px;
  border-radius: 12px;
  flex-shrink: 0;
}

.service-layout .service-text {
  flex: 1;
  min-width: 250px;
}

@media (max-width: 768px) {
  .service-layout {
    flex-direction: column;
  }

  .service-layout .service-hero {
    width: 100%;
    margin-bottom: 1rem;
  }
}

/* ============================================================
   FORMS & MODALS
   ============================================================ */
form {
  max-width: 600px;
  margin: 2rem auto;
  background: var(--card-background-color);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255,255,255,0.08);
}

input, textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #2A2A2A;
  color: var(--color);
  margin-top: 0.25rem;
}

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

legend {
  color: var(--muted-color);
}

/* Frosted glass modal */
.form-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: opacity 0.3s ease;
}

.form-modal.show {
  display: flex;
  animation: fadeIn 0.4s ease forwards;
}

.form-content {
  background: rgba(42, 42, 42, 0.8);
  backdrop-filter: blur(12px);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 90%;
  max-width: 640px;
  color: var(--color);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
  max-height: 90vh;
  animation: scaleIn 0.3s ease forwards;
}

.close-modal {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: var(--muted-color);
  cursor: pointer;
}

.close-modal:hover {
  color: var(--secondary);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  text-align: center;
  color: var(--muted-color);
  padding: 2rem 0;
  margin-top: 2rem;
}

.divider {
  width: 60px;
  height: 2px;
  background: var(--primary);
  margin: 0 auto 1rem;
  opacity: 0.7;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
