/* ========== Base / reset ========== */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

:root {
  /* Desktop “card size” reference */
  --card-height-desktop: 360px;
}

body {
  font-family: Arial, sans-serif;

  /* 1) Light grey site background */
  background: #ededed;

  color: #111;
  line-height: 1.5;
}

/* ========== Layout helpers ========== */
.container {
  width: min(1100px, 100% - 32px);
  margin: 0 auto;
}

/* ========== Header (no photo modifiers) ========== */
.site-header {
  position: relative;
  height: 88px;
  overflow: visible;
}

.header-bg {
  position: absolute;
  inset: 0;

  background-image: url("assets/header.jpeg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center -40px;

  transform: scaleX(-1);
  z-index: 0;
}

.header-inner {
  position: relative;
  z-index: 1;

  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 16px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 240px;
  width: auto;
  display: block;
}

/* Nav */
.nav {
  display: flex;
  gap: 14px;
}

.nav a {
  color: #fff;
  font-weight: bold;
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
}

/* Hamburger button (desktop default hidden) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: #fff;
  cursor: pointer;
}

/* ========== Hero ========== */
.hero {
  padding: 56px 0;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.1;
}

.hero p {
  margin: 0 0 18px;
  font-size: 16px;
  color: #333;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 14px;
  border-radius: 10px;
}

.btn.primary {
  background: #111;
  color: #fff;
}

.btn.ghost {
  border: 2px solid #111;
  color: #111;
}

/* ========== Image sections ("cards" on homepage) ========== */
.section {
  position: relative;
  padding: 80px 0;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  z-index: 0;
}

.section > .container {
  position: relative;
  z-index: 1;
}

/* Products — white text */
.section-products { color: #fff; }
.section-products::before { background-image: url("assets/products.jpg"); }

/* About — black text */
.section-about { color: #111; }
.section-about::before { background-image: url("assets/about.jpeg"); }

/* Contact — white text */
.section-contact { color: #fff; }
.section-contact::before { background-image: url("assets/contact.jpeg"); }

/* Make ALL text in the cards bold */
.section-products,
.section-about,
.section-contact {
  font-weight: 700;
}

/* Whole-card link (homepage) */
.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-link:hover {
  text-decoration: none;
}

.card-link:focus-visible {
  outline: 3px solid rgba(255,255,255,0.85);
  outline-offset: 6px;
  border-radius: 12px;
}

/* ========== Subpage: bottom “two cards” grid ========== */
.subcards {
  padding: 50px 0 70px;
}

.subcards h2 {
  margin: 0 0 14px;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px; /* mobile default spacing */
}

.mini-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 44px 22px;

  color: #fff;
  font-weight: 700;

  min-height: 220px;
}

.mini-card::before {
  content: "";
  position: absolute;
  inset: 0;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  z-index: 0;
}

.mini-card > .mini-inner {
  position: relative;
  z-index: 1;
}

.mini-card a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.mini-card a:hover {
  text-decoration: underline;
}

/* Mini-card variants */
.mini-products { color: #fff; }
.mini-products::before { background-image: url("assets/products.jpg"); }

.mini-about { color: #111; }
.mini-about::before { background-image: url("assets/about.jpeg"); }

.mini-contact { color: #fff; }
.mini-contact::before { background-image: url("assets/contact.jpeg"); }

/* ========== 3) Readable main body section under the main card ========== */
.page-body {
  padding: 40px 0 70px;
}

.body-panel {
  background: #f9f9f9;         /* legible panel on light grey body */
  color: #111;
  padding: 26px;
  border-radius: 16px;
}

.body-panel h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.body-panel p {
  margin: 0 0 14px;
  font-weight: 400;            /* normal paragraph styling */
  font-size: 16px;
  color: #222;
}

.body-panel p:last-child {
  margin-bottom: 0;
}

/* ========== Footer ========== */
.footer {
  background: #f5f5f5;
  padding: 18px;
  text-align: center;
  color: #333;
}

/* ========== Mobile ========== */
@media (max-width: 600px) {
  .site-header { height: 78px; }

  .header-inner {
    padding: 0 12px;
    gap: 10px;
  }

  .brand-logo { height: 200px; }

  /* Hamburger with semi-transparent “pop” */
  .nav-toggle {
    display: block;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    padding: 8px 12px;
    line-height: 1;
  }

  .nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 12px;

    background: rgba(0,0,0,0.9);
    flex-direction: column;
    display: none;
    padding: 10px;
    gap: 8px;

    border-radius: 12px;
    z-index: 10;
    min-width: 180px;
  }

  .nav.is-open { display: flex; }

  .nav a {
    width: 100%;
    font-size: 13px;
    padding: 10px 10px;
  }

  .header-bg {
    background-position: center -70px;
  }
}

/* Portrait-only logo shift */
@media (max-width: 600px) and (orientation: portrait) {
  .brand { transform: translateX(-25px); }
}

/* Portrait: card height reduced */
@media (orientation: portrait) {
  .section {
    padding: 48px 0;
  }
}

/* Landscape header image raise */
@media (max-width: 900px) and (orientation: landscape) {
  .header-bg {
    background-position: center -170px;
  }
}

/* ========== Desktop ========== */
@media (min-width: 900px) {
  .site-header { height: 104px; }
  .brand-logo { height: 260px; }

  .section {
    min-height: var(--card-height-desktop);
  }

  .hero {
    min-height: calc(var(--card-height-desktop) * 2);
    padding: 72px 0;
    display: flex;
    align-items: center;
  }

  /* Card typography scaling on desktop */
  .section-products,
  .section-about,
  .section-contact {
    font-size: 2em;
  }

  .section h2 {
    margin-top: 0;
    font-size: 1.2em;
  }

  .section p {
    font-size: 1em;
  }

  .hero h1 { font-size: 44px; }
  .hero p  { font-size: 18px; }

  /* 2) Increase spacing between Explore cards on desktop */
  .card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 44px; /* <-- bigger desktop spacing */
  }

  .mini-card {
    min-height: 260px;
  }

  .body-panel {
    padding: 32px;
  }

  .body-panel p {
    font-size: 17px;
  }
}

/* ========== Page-specific image overrides ========== */
/* Products page: use products2.jpg ONLY for the main Products card */
.page-products .section-products::before {
  background-image: url("assets/products2.jpg");
}

/* Contact page: use contact2.jpeg ONLY for the main Contact card */
.page-contact .section-contact::before {
  background-image: url("assets/contact2.jpeg");
}
