/* ============================================
   BECORD TECHNOLOGIES - Main Stylesheet
   ============================================ */

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

html {
  font-family: 'Titillium Web', sans-serif;
  font-size: 16px;
  color: #fff;
  background-color: #111;
  background-size: 100%;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  height: 100%;
  overflow: hidden;
}

body {
  height: 100%;
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.4) 15%, rgba(0,0,0,0.0) 30%);
  z-index: 1;
  pointer-events: none;
}

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

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
}

/* ---------- Variables ---------- */
:root {
  --sidebar-width: 370px;
  --accent: #00A1BC;
  --cta: #007589;
  --white: #FFFFFF;
  --dark-overlay: rgba(0, 0, 0, 0.7);
  --dark-overlay-light: rgba(0, 0, 0, 0.45);
}

/* ---------- Mobile Header ---------- */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.mobile-logo {
  height: 36px;
  width: 36px;
  border-radius: 4px;
  object-fit: cover;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  z-index: 1002;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  z-index: 1000;
  background: none;
  backdrop-filter: none;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  padding: 40px 40px 30px;
}

.sidebar-top {
  flex: 1;
}

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 50px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.logo-img {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 4px;
  line-height: 1.1;
}

.logo-sub {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 5px;
  opacity: 0.7;
}

/* Navigation */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-link {
  font-size: 21px;
  font-weight: 400;
  padding: 10px 0;
  position: relative;
  transition: color 0.2s, padding-left 0.3s;
  color: rgba(255, 255, 255, 0.8);
}

.nav-link::before {
  content: none;
}

.nav-link:hover {
  color: #D4A24C;
}

.nav-link.active {
  color: #fff;
}

/* Sidebar Footer */
.sidebar-footer {
  padding-top: 30px;
  border-top: none;
}

.footer-links {
  font-size: 13px;
  margin-bottom: 16px;
  opacity: 0.7;
}

.footer-links a {
  transition: color 0.2s;
}

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

.pipe {
  margin: 0 8px;
  opacity: 0.4;
}

.footer-social {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.footer-social a {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: color 0.3s;
  color: rgba(255, 255, 255, 0.7);
}

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

.footer-copy {
  font-size: 11px;
  opacity: 0.5;
  margin-bottom: 8px;
}

.footer-legal {
  font-size: 11px;
  opacity: 0.5;
}

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

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
}

.sidebar-overlay.active {
  display: block;
}

/* ---------- Main Content ---------- */
.main-content {
  margin-left: var(--sidebar-width);
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* ---------- Pages ---------- */
.page {
  display: none;
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.page.active {
  display: block;
}

/* Scrollbar styling */
.page::-webkit-scrollbar {
  width: 6px;
}

.page::-webkit-scrollbar-track {
  background: transparent;
}

.page::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.page::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Page inner wrapper */
.page-inner {
  padding: 60px 60px 80px;
  max-width: 1200px;
}

.page-title {
  font-size: 45px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.page-intro {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 30px;
  max-width: 700px;
  opacity: 0.9;
}

/* ---------- Home Page ---------- */
.page-home {
  overflow-y: auto;
  overflow-x: hidden;
}
.page-home .page-inner {
  padding: 40px 30px 60px;
}

/* Homepage Sections */
.homepage-section {
  margin-bottom: 50px;
  text-align: center;
}
.homepage-section-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.homepage-section .products-grid,
.homepage-section .patterns-grid,
.homepage-section .gallery-grid {
  margin-bottom: 20px;
}
.homepage-section .cta-button {
  display: inline-block;
  margin-top: 10px;
}
.homepage-about-text {
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 16px;
  line-height: 1.6;
  opacity: 0.9;
}
.homepage-quote {
  background: rgba(0,0,0,0.3);
  padding: 40px 30px;
  border-radius: 10px;
}

/* ---------- Links & Buttons ---------- */
.inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

.inline-link:hover {
  opacity: 0.8;
}

.cta-button {
  display: inline-block;
  background: var(--cta);
  color: #fff;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: background 0.3s, transform 0.2s;
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  background: #008fa3;
  transform: translateY(-1px);
}

/* ---------- Products Page ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 30px;
}

.product-card {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.product-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.product-overlay h3 {
  font-size: 20px;
  font-weight: 700;
}

.product-link {
  display: block;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent);
  transition: background 0.3s;
}

.product-link:hover {
  background: rgba(0, 161, 188, 0.1);
}

.product-link i {
  margin-right: 6px;
  font-size: 10px;
}

/* ---------- Patterns Page ---------- */
.filter-bar,
.inspiration-filters {
  display: flex;
  gap: 30px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
  opacity: 0.7;
}

.filter-group select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 32px 8px 12px;
  border-radius: 4px;
  min-width: 160px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='white'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-group select:hover,
.filter-group select:focus {
  border-color: var(--accent);
  outline: none;
}

.filter-group select option {
  background: #222;
  color: #fff;
}

.patterns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 10px;
}

.pattern-card {
  text-align: center;
}

.pattern-thumb {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.pattern-card:hover .pattern-thumb {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.pattern-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pattern-card h4 {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 600;
}

.pattern-view-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--accent);
  transition: opacity 0.2s;
}

.pattern-view-link:hover {
  opacity: 0.7;
  text-decoration: underline;
}

/* ---------- Inspiration / Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 10px;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: transform 0.3s;
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.75));
  display: flex;
  align-items: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  font-size: 14px;
  font-weight: 600;
}

.gallery-item.hidden {
  display: none;
}

/* ---------- About Page ---------- */
.about-hero,
.about-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
  align-items: start;
}

.about-text h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
}

.about-text p {
  line-height: 1.7;
  margin-bottom: 16px;
  opacity: 0.9;
}

.about-list {
  list-style: square;
  padding-left: 20px;
  margin-top: 10px;
}

.about-list li {
  padding: 5px 0;
  line-height: 1.6;
  opacity: 0.9;
}

.about-list li::marker {
  color: var(--accent);
  font-size: 10px;
}

.about-image {
  border-radius: 8px;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  max-height: 400px;
}

/* ---------- Quote Form ---------- */
.quote-form {
  max-width: 700px;
  margin-top: 30px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.95);
  color: #222;
  font-size: 15px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #888;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 161, 188, 0.2);
}

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

.form-checkboxes {
  margin: 24px 0;
}

.checkbox-label {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 15px;
}

.checkbox-item input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
  background: rgba(0, 0, 0, 0.4);
}

.checkbox-item input[type="checkbox"]:checked + .checkmark {
  background: var(--cta);
  border-color: var(--cta);
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 12px;
  color: #fff;
}

.recaptcha-placeholder {
  margin: 24px 0;
}

.recaptcha-box {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 14px 20px;
}

.recaptcha-logo {
  opacity: 0.4;
  font-size: 12px;
}

.submit-btn {
  margin-top: 10px;
  font-size: 16px;
  padding: 14px 40px;
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 800px;
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 20px 0;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color 0.2s;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-question i {
  font-size: 12px;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-item.open .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: 20px;
}

.faq-answer p {
  font-size: 15px;
  line-height: 1.7;
  opacity: 0.8;
}

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

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 36px;
  color: #fff;
  opacity: 0.7;
  transition: opacity 0.2s;
}

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

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: #fff;
  opacity: 0.6;
  padding: 16px;
  transition: opacity 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* ---------- Page Transition ---------- */
.page {
  animation: none;
}

.page.active {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Dark overlay for inner pages ---------- */
.page-products .page-inner,
.page-patterns .page-inner,
.page-inspiration .page-inner,
.page-about .page-inner,
.page-quote .page-inner,
.page-faq .page-inner {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  border-radius: 0;
  min-height: 100vh;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet & small desktop */
@media (max-width: 1200px) {
  :root {
    --sidebar-width: 300px;
  }

  .sidebar-inner {
    padding: 30px 30px 24px;
  }

  .page-inner {
    padding: 50px 40px 60px;
  }

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

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

/* Tablet portrait */
@media (max-width: 900px) {
  :root {
    --sidebar-width: 280px;
  }

  .about-hero,
  .about-section {
    grid-template-columns: 1fr;
  }

  .about-image img {
    max-height: 300px;
    width: 100%;
  }

  .page-title {
    font-size: 36px;
  }

}

/* Mobile */
@media (max-width: 768px) {
  html {
    overflow: auto;
  }

  body {
    overflow: auto;
  }

  .mobile-header {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.35s ease;
    width: 300px;
    padding-top: 60px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding-top: 60px;
  }

  .page {
    position: relative;
    overflow: visible;
  }

  .page-inner {
    padding: 30px 20px 60px;
  }

  .page-title {
    font-size: 30px;
  }

  .products-grid,
  .patterns-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .inspiration-filters {
    flex-direction: column;
    gap: 16px;
  }

  .filter-group select {
    min-width: 100%;
  }

  .about-hero,
  .about-section {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Reverse alternating sections on mobile */
  .about-section:nth-child(even) .about-image {
    order: -1;
  }
}

/* Small mobile */
@media (max-width: 480px) {

  .page-inner {
    padding: 24px 16px 50px;
  }

  .page-title {
    font-size: 26px;
  }
}
