/* ==========================================================================
   Project: Riyadh Gypsum & Paints - Optimized Mobile UX & CRO Style Sheet
   Palette: Modern Corporate Blue (#0b3c5d, #328cc1, #ffffff, #f8f9fa, #1d2731)
   ========================================================================== */

:root {
  --primary: #0b3c5d;
  --primary-hover: #082a42;
  --secondary: #328cc1;
  --secondary-hover: #28729e;
  --accent: #ff9f1c;
  --dark: #1d2731;
  --gray-light: #f8f9fa;
  --gray-border: #e9ecef;
  --gray-text: #5a6578;
  --white: #ffffff;
  --whatsapp-color: #25d366;
  --call-color: #328cc1;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

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

body {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  direction: rtl;
  text-align: right;
  background-color: var(--white);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

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

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

ul {
  list-style: none;
}

.container {
  width: 100%;
  padding-right: 1.25rem;
  padding-left: 1.25rem;
  margin-right: auto;
  margin-left: auto;
  max-width: 1200px;
}

/* --------------------------------------------------------------------------
   Top Promo Bar
   -------------------------------------------------------------------------- */
.promo-bar {
  background: linear-gradient(90deg, #0b3c5d 0%, #328cc1 100%);
  color: var(--white);
  text-align: center;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  position: relative;
  z-index: 1001;
}

.promo-bar span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

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

.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
}

.logo-brand img {
  height: 45px;
  width: auto;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-weight: 600;
  color: var(--dark);
  padding: 0.5rem 0;
  font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--secondary);
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  padding: 0.5rem 0;
}

.dropdown-toggle svg {
  transition: transform 0.3s ease;
  fill: currentColor;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--white);
  min-width: 230px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 1100;
  border: 1px solid var(--gray-border);
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  border-bottom: 1px solid #f1f1f1;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background-color: var(--gray-light);
  color: var(--secondary);
  padding-right: 1.5rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--primary);
}

/* Mobile Nav Drawer */
@media (max-width: 991px) {
  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 1.5rem 2rem 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease-in-out;
    z-index: 999;
    gap: 1rem;
    overflow-y: auto;
  }

  .nav-menu.active {
    right: 0;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background-color: var(--gray-light);
    width: 100%;
    display: none;
    margin-top: 0.5rem;
    border-radius: var(--radius-sm);
  }

  .dropdown-menu.show {
    display: block;
  }
}

/* Overlay for Mobile Menu */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  display: none;
}
.menu-overlay.active {
  display: block;
}

/* --------------------------------------------------------------------------
   Hero Section & Call to Action
   -------------------------------------------------------------------------- */
.hero {
  padding: 2.5rem 0 3.5rem 0;
  background: linear-gradient(180deg, rgba(50, 140, 193, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.hero-badge {
  display: inline-block;
  background-color: rgba(50, 140, 193, 0.15);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--primary);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

.hero-description {
  font-size: 1rem;
  color: var(--gray-text);
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-align: center;
  width: 100%;
}

@media (min-width: 576px) {
  .btn {
    width: auto;
  }
}

.btn-primary {
  background-color: var(--secondary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(50, 140, 193, 0.3);
}

.btn-primary:hover {
  background-color: var(--secondary-hover);
}

.btn-whatsapp {
  background-color: var(--whatsapp-color);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background-color: #20ba5a;
}

.trust-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin-top: 1rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dark);
}

.trust-item svg {
  fill: var(--secondary);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Lead Generation Form Section
   -------------------------------------------------------------------------- */
.form-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-border);
}

.form-header {
  text-align: center;
  margin-bottom: 1.2rem;
}

.form-header h3 {
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 800;
}

.form-header p {
  font-size: 0.85rem;
  color: var(--gray-text);
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--dark);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1.5px solid var(--gray-border);
  border-radius: var(--radius-sm);
  background-color: var(--gray-light);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary);
  background-color: var(--white);
}

select.form-control {
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Services Section & Cards
   -------------------------------------------------------------------------- */
.section {
  padding: 3rem 0;
}

.section-bg {
  background-color: var(--gray-light);
}

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

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.1rem;
  }
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--gray-text);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 576px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  background-color: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.service-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.service-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.service-desc {
  font-size: 0.85rem;
  color: var(--gray-text);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.service-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* --------------------------------------------------------------------------
   Image Gallery Grid (2 columns on Mobile, 3 on Desktop)
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  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.06);
}

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

.faq-item {
  background-color: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  margin-bottom: 0.8rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  text-align: right;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-question svg {
  transition: transform 0.3s ease;
  fill: var(--secondary);
  flex-shrink: 0;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.25rem;
  font-size: 0.9rem;
  color: var(--gray-text);
  background-color: #fcfcfc;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 1.25rem 1rem 1.25rem;
}

/* --------------------------------------------------------------------------
   Floating Action Buttons & Animation (Shake Every 3s)
   -------------------------------------------------------------------------- */
.floating-actions-right {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1050;
}

.floating-btn-left {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 1050;
}

.fab {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease;
  text-decoration: none;
}

.fab:active {
  transform: scale(0.9);
}

.fab-whatsapp {
  background-color: var(--whatsapp-color);
  animation: shakeAnimation 4s infinite;
}

.fab-call {
  background-color: var(--call-color);
  animation: shakeAnimation 4s infinite 0.5s;
}

.fab-top {
  background-color: var(--primary);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  width: 45px;
  height: 45px;
}

.fab-top.show {
  opacity: 1;
  visibility: visible;
}

.fab svg {
  width: 26px;
  height: 26px;
  fill: var(--white);
}

/* Shake Keyframe Animation (1s shake, 3s pause) */
@keyframes shakeAnimation {
  0% { transform: scale(1) rotate(0deg); }
  3% { transform: scale(1.08) rotate(-8deg); }
  6% { transform: scale(1.08) rotate(8deg); }
  9% { transform: scale(1.08) rotate(-8deg); }
  12% { transform: scale(1.08) rotate(8deg); }
  15% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* --------------------------------------------------------------------------
   Footer & Local SEO Neighborhoods
   -------------------------------------------------------------------------- */
.footer {
  background-color: var(--primary);
  color: var(--white);
  padding: 3rem 0 1.5rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-col h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--secondary);
  position: relative;
  padding-bottom: 0.4rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background-color: var(--secondary);
  border-radius: 2px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: #d1d8e0;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--white);
  padding-right: 0.4rem;
}

.neighborhoods-wrapper {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.neighborhoods-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--secondary);
}

.neighborhoods-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badge-item {
  background-color: rgba(255, 255, 255, 0.08);
  color: #e0e0e0;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #a0aec0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.developer-link {
  color: #ffffff;
  font-weight: 700;
}

.developer-link:hover {
  text-decoration: underline;
  color: var(--secondary);
}
