/* ==========================================================================
   WESMAR — Modern Static Website
   Color palette: #618798 (primary), #406575 (dark), #d6dfe3 (light), #58595b (text)
   ========================================================================== */

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

:root {
  --color-primary: #618798;
  --color-primary-dark: #406575;
  --color-primary-light: #d6dfe3;
  --color-text: #58595b;
  --color-text-light: #888;
  --color-bg: #f5f7f8;
  --color-white: #ffffff;
  --color-border: #e0e4e7;
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --max-width: 1200px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--color-primary-dark);
}

h1, h2, h3, h4 {
  color: var(--color-primary-dark);
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header / Navigation --- */
.site-header {
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 2px;
}

.logo svg,
.logo img {
  height: 56px;
  width: auto;
}

.logo:hover svg .logo-mark {
  opacity: 0.85;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 36px;
  height: 36px;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  height: 3px;
  background: var(--color-primary-dark);
  border-radius: 1.5px;
  transition: all 0.3s ease;
  transform-origin: center;
  position: relative;
}

/* Drawer knobs */
.nav-toggle span::after {
  content: '';
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-primary);
  transition: all 0.3s ease;
}

/* Open state — X */
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  opacity: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-menu a {
  display: block;
  padding: 8px 18px;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
  background: var(--color-primary);
  color: var(--color-white);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: var(--color-primary-dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(64,101,117,0.7) 0%, rgba(97,135,152,0.4) 100%);
}

.hero-content {
  position: absolute;
  bottom: 60px;
  left: 0;
  right: 0;
  z-index: 2;
}

.hero-content h1 {
  color: var(--color-white);
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-content p {
  color: rgba(255,255,255,0.9);
  font-size: 1.15rem;
  max-width: 600px;
  margin-bottom: 24px;
}

.hero-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.hero-dot.active {
  background: var(--color-white);
  transform: scale(1.2);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-primary-dark);
}

/* --- Section Spacing --- */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--color-white);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  margin-bottom: 12px;
}

.section-header p {
  color: var(--color-text-light);
  font-size: 1.05rem;
  max-width: 720px;
  margin: 0 auto;
}

.section-header .accent-line {
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-primary);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* --- Services Grid (Homepage) --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid var(--color-border);
  text-align: center;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.service-card .icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--color-primary);
}

.service-card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.service-card p {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* --- Project Grid --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.project-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.project-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 220px;
  background: linear-gradient(to top, rgba(64,101,117,0.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover .project-card-overlay {
  opacity: 1;
}

.project-card-body {
  padding: 16px 20px;
}

.project-card-body h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.project-card-body p {
  color: var(--color-text-light);
  font-size: 0.85rem;
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.75rem;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border-radius: 100px;
  font-weight: 500;
}

/* --- About / Info Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

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

.about-content h2 {
  margin-bottom: 16px;
}

.about-content p {
  margin-bottom: 16px;
}

.about-stats {
  display: flex;
  gap: 32px;
  margin-top: 24px;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 4px;
}

/* --- Contact Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-info {
  padding: 32px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.contact-info h3 {
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.contact-item .icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--color-primary);
  margin-top: 2px;
}

.contact-item strong {
  display: block;
  margin-bottom: 2px;
}

.contact-item a {
  color: var(--color-primary);
}

.contact-form {
  padding: 32px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.contact-form h3 {
  margin-bottom: 20px;
}

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

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--color-text);
  transition: border-color var(--transition);
  background: var(--color-bg);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-white);
}

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

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

.form-note {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 12px;
}

/* --- Offer / Services Page --- */
.offer-intro {
  max-width: 800px;
  margin: 0 auto 48px;
  text-align: center;
  font-size: 1.05rem;
}

.offer-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 64px;
}

.offer-section.reversed {
  direction: rtl;
}

.offer-section.reversed > * {
  direction: ltr;
}

.offer-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.offer-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.offer-text h3 {
  margin-bottom: 12px;
  font-size: 1.5rem;
}

.offer-text p {
  margin-bottom: 12px;
}

.offer-text ul {
  list-style: none;
  margin-top: 12px;
}

.offer-text ul li {
  padding: 6px 0 6px 24px;
  position: relative;
}

.offer-text ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
}

/* --- Partners / Brands --- */
.brands {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
  opacity: 0.6;
}

.brands span {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text-light);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}

.footer-brand .logo-footer svg,
.footer-brand .logo-footer img {
  height: 56px;
  width: auto;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 320px;
}

.footer-nav h4,
.footer-contact h4 {
  color: var(--color-white);
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-nav ul {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 8px;
}

.footer-nav a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--color-white);
}

.footer-contact p {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.footer-contact a {
  color: rgba(255,255,255,0.8);
}

.footer-contact a:hover {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
}

.footer-bottom a:hover {
  color: var(--color-white);
}

/* --- Page Header (Subpages) --- */
.page-header {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  padding: 48px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header h1 {
  color: var(--color-white);
  font-size: 2.2rem;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.page-header p {
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem;
  position: relative;
  z-index: 1;
}

/* --- SVG Decorations --- */
.bg-decoration {
  position: absolute;
  pointer-events: none;
  opacity: 0.06;
  z-index: 0;
}

.bg-decoration-left {
  left: -40px;
}

.bg-decoration-right {
  right: -40px;
}

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

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Gallery Grid (Project Detail) --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}

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

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

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner h2 {
  color: var(--color-white);
  font-size: 2rem;
  margin-bottom: 12px;
}

.cta-banner p {
  color: rgba(255,255,255,0.85);
  font-size: 1.05rem;
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-24 { margin-top: 24px; }
.mt-48 { margin-top: 48px; }
.mb-24 { margin-bottom: 24px; }
.mb-48 { margin-bottom: 48px; }

/* --- Responsive --- */
@media (max-width: 992px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.7rem; }

  .about-grid,
  .contact-grid,
  .offer-section {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-grid .contact-info-inner {
    max-width: 400px;
    margin: 0 auto;
  }

  .offer-section.reversed {
    direction: ltr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero { height: 420px; }
  .hero-content h1 { font-size: 2.2rem; }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    order: 1;
    margin-left: auto;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: 16px 24px;
    box-shadow: var(--shadow-md);
    gap: 0;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu a {
    padding: 12px 16px;
    border-radius: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .hero { height: 360px; }
  .hero-content h1 { font-size: 1.8rem; }
  .hero-content p { font-size: 1rem; }

  .about-stats {
    gap: 24px;
  }

  .stat-number {
    font-size: 1.8rem;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .section {
    padding: 48px 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.4rem; }

  .hero { height: 300px; }
  .hero-content { bottom: 40px; }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Process Steps --- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  counter-reset: step;
}

.process-step {
  text-align: center;
  position: relative;
}

.process-step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 auto 16px;
}

.process-step h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.process-step p {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* connector line between steps */
.process-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(50% + 36px);
  width: calc(100% - 72px);
  height: 2px;
  background: var(--color-primary-light);
}

/* --- FAQ Section --- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  background: var(--color-white);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 24px;
  background: none;
  border: none;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  cursor: pointer;
  text-align: left;
  gap: 16px;
  transition: background var(--transition);
}

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

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item.open .faq-question::after {
  content: '−';
}

.faq-answer {
  display: none;
  padding: 0 24px 18px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text);
}

.faq-item.open .faq-answer {
  display: block;
}

/* --- Benefits Grid --- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.benefit-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
}

.benefit-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.benefit-card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* --- Area / Location Tags --- */
.area-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}

.area-tag {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.85rem;
  background: var(--color-white);
  color: var(--color-primary-dark);
  border: 1px solid var(--color-primary-light);
  border-radius: 100px;
  font-weight: 500;
}

/* --- Responsive: new sections --- */
@media (max-width: 768px) {
  .process-steps {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .process-step:not(:last-child)::after {
    display: none;
  }

  .faq-question {
    padding: 14px 18px;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .process-steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Accessibility --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--color-primary-dark);
  color: var(--color-white);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  z-index: 200;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 8px;
}

*:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.gallery-item {
  cursor: pointer;
}

.gallery-item:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.lightbox[role="dialog"] {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .hero-slide {
    transition: none !important;
  }
}
