/**
 * Al-Dosari Insulation — Main Pure CSS Stylesheet
 * Responsive Grid & Flexbox, Clamp Typography, Clean Corporate UI
 */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ald-ink);
  background-color: var(--ald-bg);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.3;
  color: var(--ald-ink);
}

h1 { font-size: clamp(1.9rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.45rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

.skip-link {
  position: absolute;
  top: -100px;
  right: 1rem;
  z-index: 9999;
  background: var(--ald-primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
}
.skip-link:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-pad {
  padding: clamp(3.5rem, 6vw, 5.5rem) 0;
}

.bg-alt {
  background-color: var(--ald-bg-alt);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
}

.section-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(0, 82, 204, 0.1);
  color: var(--ald-primary);
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--ald-muted);
  margin-top: 0.65rem;
  font-size: 1.02rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.75rem 1.6rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.btn-secondary {
  background-color: var(--ald-secondary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 107, 53, 0.32);
}
.btn-secondary:hover {
  background-color: var(--ald-secondary-hover);
  transform: translateY(-2px);
}

.btn-primary {
  background-color: var(--ald-primary);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--ald-primary-dark);
  transform: translateY(-2px);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}
.btn-outline-white:hover {
  background: #fff;
  color: var(--ald-ink);
}

.btn-success {
  background-color: var(--ald-success);
  color: #fff;
}
.btn-success:hover {
  filter: brightness(0.92);
  transform: translateY(-2px);
}

/* Top Bar & Header */
.top-bar {
  background-color: #0F172A;
  color: #CBD5E1;
  font-size: 0.82rem;
  padding: 0.55rem 0;
}
.top-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.top-bar-items {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
}
.top-bar-phone {
  color: #fff;
  font-weight: 800;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ald-border);
  box-shadow: var(--ald-shadow-sm);
}
.site-header.header-floating {
  margin: 0.75rem 1.25rem 0;
  border-radius: 16px;
  border: 1px solid var(--ald-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 78px;
}
.header-centered .header-inner {
  flex-direction: row-reverse;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.site-brand img,
.site-brand svg {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}
.brand-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--ald-ink);
  line-height: 1.15;
}
.brand-sub {
  font-size: 0.75rem;
  color: var(--ald-muted);
  font-weight: 600;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}
.main-nav a {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ald-ink);
  padding: 0.4rem 0;
}
.main-nav a:hover {
  color: var(--ald-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.burger-btn {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--ald-border);
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background-color: #0F172A;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(110deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.72) 55%, rgba(0, 82, 204, 0.48) 100%);
}
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 780px;
  padding: 4rem 0;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.82rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
}
.hero-title {
  color: #fff;
  margin-bottom: 1rem;
  font-weight: 900;
}
.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: #E2E8F0;
  margin-bottom: 2rem;
  max-width: 650px;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.scroll-indicator {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

/* Trust Bar */
.trust-bar-wrap {
  position: relative;
  z-index: 5;
  margin-top: -2.25rem;
}
.trust-bar-card {
  background: #fff;
  border-radius: var(--ald-radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--ald-shadow-md);
  border: 1px solid var(--ald-border);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.trust-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ald-bg-alt);
  color: var(--ald-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.trust-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ald-ink);
}
.trust-sub {
  font-size: 0.72rem;
  color: var(--ald-muted);
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-media {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--ald-shadow-lg);
}
.about-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.75rem 0;
}
.about-feat {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: var(--ald-bg-alt);
  border: 1px solid var(--ald-border);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.service-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  padding: 2rem;
  border: 1px solid var(--ald-border);
  box-shadow: var(--ald-shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--ald-shadow-lg);
}
.service-num {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-size: 3.5rem;
  font-weight: 900;
  color: #F1F5F9;
  line-height: 1;
  pointer-events: none;
}
.service-icon-box {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  background: rgba(0, 82, 204, 0.08);
  color: var(--ald-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.service-icon-box svg {
  width: 44px;
  height: 44px;
}
.service-card:hover .service-icon-box {
  background: rgba(255, 107, 53, 0.12);
  color: var(--ald-secondary);
}
.service-title {
  margin-bottom: 0.65rem;
  position: relative;
  z-index: 2;
}
.service-desc {
  color: var(--ald-muted);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}
.service-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--ald-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.service-link {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ald-primary);
}
.service-card:hover .service-link {
  color: var(--ald-secondary);
}

/* Why Us & Process */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.why-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--ald-border);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  box-shadow: var(--ald-shadow-sm);
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.process-card {
  background: var(--ald-bg-alt);
  border: 1px solid var(--ald-border);
  border-radius: 16px;
  padding: 1.75rem 1.25rem;
  text-align: center;
}
.process-step {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ald-secondary);
  color: #fff;
  font-weight: 900;
  font-size: 0.85rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

/* Gallery */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filter-btn {
  padding: 0.5rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--ald-border);
  background: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s ease;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--ald-primary);
  color: #fff;
  border-color: var(--ald-primary);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: #CBD5E1;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.gallery-item:hover img {
  transform: scale(1.06);
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.2));
  color: #fff;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.lightbox-modal.open {
  display: flex;
}
.lightbox-box {
  background: #fff;
  border-radius: 18px;
  max-width: 820px;
  width: 100%;
  overflow: hidden;
  position: relative;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
}

/* Stats */
.stats-section {
  background: var(--ald-primary);
  color: #fff;
  padding: 4rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.stat-number {
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
}
.stat-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FED7AA;
  margin-top: 0.4rem;
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.testimonial-card {
  background: var(--ald-bg-alt);
  border: 1px solid var(--ald-border);
  border-radius: 16px;
  padding: 1.75rem;
  position: relative;
}
.testimonial-stars {
  color: #F59E0B;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ald-border);
}
.testimonial-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ald-primary);
  color: #fff;
  font-weight: 900;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* FAQ Accordion */
.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.faq-item {
  background: #fff;
  border: 1px solid var(--ald-border);
  border-radius: 14px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  padding: 1.15rem 1.4rem;
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: right;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ald-ink);
  cursor: pointer;
}
.faq-toggle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ald-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex-shrink: 0;
}
.faq-item.active .faq-toggle {
  background: var(--ald-secondary);
  color: #fff;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-answer-inner {
  padding: 0 1.4rem 1.25rem;
  color: var(--ald-muted);
  font-size: 0.94rem;
  border-top: 1px solid #F1F5F9;
  padding-top: 0.9rem;
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.blog-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--ald-border);
  overflow: hidden;
  box-shadow: var(--ald-shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.blog-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}
.blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-cat {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--ald-primary);
  color: #fff;
  padding: 0.2rem 0.7rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}
.blog-body {
  padding: 1.35rem;
}

/* Service Areas & Contact */
.areas-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2.5rem;
  align-items: start;
}
.areas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}
.area-card {
  background: #fff;
  border: 1px solid var(--ald-border);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cta-banner {
  position: relative;
  padding: 4.5rem 0;
  color: #fff;
  text-align: center;
  background: linear-gradient(100deg, #0F172A, var(--ald-primary));
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 2.5rem;
}
.contact-form-box {
  background: var(--ald-bg-alt);
  border: 1px solid var(--ald-border);
  border-radius: 18px;
  padding: 2rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1px solid #CBD5E1;
  background: #fff;
  font-size: 0.92rem;
}

/* Footer */
.site-footer {
  background: #0B1120;
  color: #CBD5E1;
  padding: 4rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 1.1rem;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.88rem;
}
.footer-links a:hover {
  color: var(--ald-secondary);
}
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid #1E293B;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: #94A3B8;
}

.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ald-primary);
  color: #fff;
  border: 0;
  box-shadow: var(--ald-shadow-md);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 800;
}
.back-to-top.visible {
  display: flex;
}

/* Responsive Breakpoints */
@media (max-width: 1199px) {
  .trust-bar-card { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 991px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    border-bottom: 1px solid var(--ald-border);
    padding: 1rem 1.25rem;
    box-shadow: var(--ald-shadow-md);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .burger-btn { display: flex; }
  .about-grid, .areas-layout, .contact-grid { grid-template-columns: 1fr; }
  .services-grid, .why-grid, .gallery-grid, .testimonials-grid, .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
  .hero-section { min-height: 70vh; }
  .trust-bar-card { grid-template-columns: repeat(2, 1fr); }
  .services-grid, .why-grid, .gallery-grid, .testimonials-grid, .blog-grid, .process-grid, .areas-grid, .form-row, .about-features, .footer-grid {
    grid-template-columns: 1fr;
  }
  .header-actions .btn { display: none; }
}
