﻿/* ----------  CSS RESET & TOKENS  ---------- */
:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --accent: #0ea5e9;
  --accent2: #38bdf8;
  --text: #111827;
  --shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ----------  HEADER  ---------- */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--card);
  box-shadow: var(--shadow);
}

.logo {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--accent);
}

.login-btn {
  background: var(--accent);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: .85rem;
  transition: .3s;
}
.login-btn:hover {
  background: var(--accent2);
}

/* ----------  LAYOUT SHELL  ---------- */
.layout-wrapper {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.sidebar {
  width: 300px;
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid #e5e7ea;
  padding: 1.5rem;
  overflow-y: auto;
}

.main-column {
  flex: 1 1 auto;
  padding: 2rem 2.5rem;
  min-width: 0;
}

/* ----------  TYPOGRAPHY / UTILS  ---------- */
.section-title {
  font-weight: 600;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--text);
}

/* ----------  GALLERY & CARDS  ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  padding: 1rem 0;
}

@media (min-width: 1200px) {
  .gallery {
    grid-template-columns: repeat(5, 1fr);
  }
}

.card {
  background: var(--card);
  border: 1px solid #e5e7ea;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: .3s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.preview {
  height: 140px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #fff;
  font-size: 1.1rem;
}

.preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info {
  padding: .8rem;
  text-align: center;
  font-weight: 500;
  font-size: .9rem;
}

/* ----------  REVIEW CAROUSEL  ---------- */
.review-carousel {
  position: relative;
  overflow: hidden;
  max-width: 1000px;
  margin: 2rem auto;
}

.review-track {
  display: flex;
  transition: transform .4s ease;
}

.review-slide {
  flex: 0 0 33.333%;
  padding: 0 .5rem;
  box-sizing: border-box;
}

.review-dots {
  text-align: center;
  margin-top: 1rem;
}

.dot {
  height: 10px;
  width: 10px;
  margin: 0 4px;
  background: #bbb;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
}

.dot.active {
  background: var(--accent);
}

@media (max-width: 768px) {
  .review-slide {
    flex: 0 0 100%;
  }
}

/* ----------  FOOTER  ---------- */
.footer {
  background: #e5e7ea;
  text-align: center;
  padding: .8rem;
  font-size: .75rem;
  color: #4b5563;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ----------  MODAL BASE  ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(3px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  max-width: 480px;
  width: 90%;
  padding: 2rem;
  color: var(--text);
  box-shadow: 0 8px 25px rgba(0, 0, 0, .1);
}

.modal-header {
  text-align: center;
  margin-bottom: 1rem;
}

.modal-header h2 {
  font-weight: 600;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 500;
  font-size: .75rem;
  margin-bottom: .2rem;
  display: block;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: .5rem;
  border-radius: 5px;
  border: 1px solid #d1d5db;
  font-size: .8rem;
}

.contact-group {
  display: flex;
  gap: .3rem;
}

.contact-group select {
  flex: 0 0 90px;
}

.form-actions {
  margin-top: 1.2rem;
  text-align: center;
}

.form-actions button {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: .6rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: .3s;
}

.form-actions button:hover {
  background: var(--accent2);
}

/* ----------  PREMIUM ENHANCEMENTS  ---------- */

/* 1. Glass-morphism card */
.card.premium {
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(16px) saturate(180%);
  transition: transform .4s, box-shadow .4s;
}
.card.premium:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0,0,0,.15);
}

/* 2. Masonry gallery on large screens */
@media (min-width: 1200px) {
  .gallery {
    display: block;
    column-count: 5;
    column-gap: 1.2rem;
  }
  .gallery > .card {
    break-inside: avoid;
    margin-bottom: 1.2rem;
  }
}

/* 3. Lazy image fade-in */
.preview img {
  opacity: 0;
  transition: opacity .6s;
}
.preview img.loaded {
  opacity: 1;
}

/* 4. Back-to-top button */
#btt {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
#btt.show {
  opacity: 1;
  pointer-events: auto;
}

.dark-mode {
  background-color: #111827;
  color: #f5f7fa;
}
.dark-mode .card {
  background: #1f2937;
  color: #f5f7fa;
}
.dark-mode .header,
.dark-mode .sidebar,
.dark-mode .footer {
  background-color: #1f2937;
  color: #f5f7fa;
}
.dark-mode .login-btn {
  background: #38bdf8;
}

.social-proof { padding: 2rem 2.5rem; text-align: center; }
.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.proof-card img {
  max-width: 100%;
  filter: grayscale(100%);
  opacity: .7;
  transition: .3s;
}
.proof-card:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  font-size: .9rem;
}
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
}