/* ============================================
   AS Bošnjak — Main Stylesheet
   ============================================ */

/* ---------- 1. Variables ---------- */
:root {
  --color-brand:      #06406F;
  --color-brand-dark: #042e50;
  --color-accent:     #E8901A;
  --color-text:       #222222;
  --color-muted:      #666666;
  --color-bg:         #F5F5F5;
  --color-surface:    #FFFFFF;
  --color-border:     #E0E0E0;
  --max-width:        960px;
  --radius:           6px;
  --shadow:           0 2px 8px rgba(0, 0, 0, 0.10);
  --shadow-card:      0 2px 12px rgba(0, 0, 0, 0.12);
}

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

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

body {
  font-family: 'Raleway', Tahoma, Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 700;
}

/* ---------- 3. Site Wrapper ---------- */
.site-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--color-surface);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ---------- 4. Header & Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-brand);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  padding: 0.6rem 1.5rem;
  position: relative;
}

.logo {
  margin-right: auto;
}

.logo-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-inner img {
  height: 48px;
  width: auto;
}

.logo-text {
  font-family: 'Calibri', 'Candara', 'Segoe UI', Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.85);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color 0.2s, color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

.site-nav a.active {
  border-bottom: 2px solid var(--color-accent);
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: 0.5rem;
}

.nav-toggle-label span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #FFFFFF;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ---------- 5. Hero Section (index only) ---------- */
.hero {
  position: relative;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(4, 46, 80, 0.78) 0%, rgba(4, 46, 80, 0.25) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 2.5rem;
}

.hero-overlay h1 {
  color: #FFFFFF;
  font-size: 1.8rem;
  max-width: 520px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  margin-bottom: 1.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: #c97516;
}

.btn-outline {
  background-color: transparent;
  color: #FFFFFF;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* ---------- 7. Section Utilities ---------- */
.section-padding {
  padding: 3rem 2rem;
}

.section-title {
  font-size: 1.4rem;
  color: var(--color-brand);
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--color-accent);
  display: inline-block;
}

.section-title i {
  margin-right: 0.5rem;
}

/* ---------- 8. Icon Cards ---------- */
.icon-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.icon-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}

.icon-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.icon-card i {
  font-size: 2rem;
  color: var(--color-brand);
  margin-bottom: 1rem;
}

.icon-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--color-brand);
}

.icon-card p {
  font-size: 0.88rem;
  color: var(--color-muted);
  line-height: 1.5;
}

/* Services page — 4-column grid */
.service-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

/* ---------- 9. About Section (home) ---------- */
.about-section {
  background-color: var(--color-bg);
  padding: 3rem 2rem;
}

.about-section h2 {
  color: var(--color-brand);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  border-bottom: 3px solid var(--color-accent);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.about-section p {
  margin-bottom: 0.85rem;
  max-width: 680px;
}

/* ---------- 10. Contact Strip (home) ---------- */
.contact-strip {
  background-color: var(--color-brand);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-strip-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.contact-strip-item:last-child {
  border-right: none;
}

.contact-strip-item i {
  color: var(--color-accent);
  font-size: 1rem;
}

.contact-strip-item a {
  color: rgba(255, 255, 255, 0.9);
}

.contact-strip-item a:hover {
  color: var(--color-accent);
}

/* ---------- 11. Page Header (inner pages) ---------- */
.page-header {
  background-color: var(--color-brand);
  color: #FFFFFF;
  padding: 1.75rem 2rem;
}

.page-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
}

.page-header h1 i {
  margin-right: 0.5rem;
  color: var(--color-accent);
}

/* ---------- 12. Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.gallery-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.2s, opacity 0.2s;
  cursor: pointer;
}

.gallery-item img:hover {
  transform: scale(1.04);
  opacity: 0.88;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox:target {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  height: auto;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: #FFFFFF;
  font-size: 2.5rem;
  line-height: 1;
  opacity: 0.8;
  font-weight: 400;
}

.lightbox-close:hover {
  opacity: 1;
}

/* ---------- 13. Price Table ---------- */
.price-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.price-table thead {
  background-color: var(--color-brand);
  color: #FFFFFF;
}

.price-table thead th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 600;
}

.price-table thead th:last-child {
  text-align: right;
}

.price-table tbody tr:nth-child(odd) {
  background-color: var(--color-bg);
}

.price-table tbody tr:hover {
  background-color: #EBF3FA;
}

.price-table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.price-table tbody td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--color-brand);
  white-space: nowrap;
}

.price-note {
  color: var(--color-muted);
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
}

/* ---------- 14. Contact Page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-info h2 {
  color: var(--color-brand);
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--color-accent);
  display: inline-block;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.contact-detail i {
  color: var(--color-brand);
  font-size: 1.1rem;
  margin-top: 0.2rem;
  width: 1.2rem;
  text-align: center;
  flex-shrink: 0;
}

.contact-detail a {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s;
}

.contact-detail a:hover {
  text-decoration-color: var(--color-brand);
}

.contact-hours dt {
  font-weight: 600;
  color: var(--color-brand);
}

.contact-hours dd {
  margin-bottom: 0.25rem;
  margin-left: 0;
}

.contact-map iframe {
  width: 100%;
  height: 400px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* ---------- 15. Footer ---------- */
.site-footer {
  background-color: var(--color-brand-dark);
  color: rgba(255, 255, 255, 0.8);
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2.5rem 2rem;
}

.footer-col p,
.footer-col a {
  font-size: 0.88rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
}

.footer-col a:hover {
  color: var(--color-accent);
}

.footer-heading {
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.footer-brand {
  color: #FFFFFF;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-col ul li {
  margin-bottom: 0.1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 2rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- 16. 404 Page ---------- */
.error-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem;
  min-height: 400px;
}

.error-code {
  font-size: 6rem;
  font-weight: 700;
  color: var(--color-brand);
  opacity: 0.18;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-section h2 {
  font-size: 1.5rem;
  color: var(--color-brand);
  margin-bottom: 0.75rem;
}

.error-section p {
  color: var(--color-muted);
  margin-bottom: 2rem;
}

/* ---------- 17. Responsive ---------- */
@media (max-width: 600px) {
  /* Show hamburger */
  .nav-toggle-label {
    display: flex;
  }

  /* Hide nav by default on mobile */
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-brand-dark);
    flex-direction: column;
    padding: 0.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  }

  .site-nav a {
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    width: 100%;
    border-bottom: none;
  }

  /* Show nav when toggle is checked */
  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }

  /* Hero */
  .hero img {
    height: 240px;
  }

  .hero-overlay {
    padding: 1.5rem;
  }

  .hero-overlay h1 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  /* Grids */
  .icon-cards {
    grid-template-columns: 1fr;
  }

  .service-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-map iframe {
    height: 280px;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
  }

  /* Contact strip */
  .contact-strip {
    flex-direction: column;
  }

  .contact-strip-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.85rem 1.5rem;
  }

  .contact-strip-item:last-child {
    border-bottom: none;
  }

  .section-padding {
    padding: 2rem 1.25rem;
  }

  .page-header {
    padding: 1.25rem 1.5rem;
  }
}

@media (min-width: 601px) and (max-width: 960px) {
  .service-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
