/* ==========================================================================
   SaudiScreenMarket — Global Styles
   ========================================================================== */

:root {
  --color-navy: #0b1f3a;
  --color-navy-dark: #071427;
  --color-white: #ffffff;
  --color-silver: #c8ccd1;
  --color-silver-light: #eef0f3;
  --color-charcoal: #2b2f33;
  --color-gold: #c9a24b;
  --color-gold-light: #e2c987;

  --font-main: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;

  --radius: 10px;
  --transition-fast: 0.2s ease;
  --transition-medium: 0.35s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-white);
  color: var(--color-charcoal);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

section {
  padding: 70px 20px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--color-navy);
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--color-charcoal);
  opacity: 0.75;
  max-width: 640px;
  margin: 0 auto 40px;
  font-size: 1rem;
}

.gold-underline {
  width: 70px;
  height: 3px;
  background: var(--color-gold);
  margin: 14px auto 30px;
  border-radius: 2px;
}

/* ==========================================================================
   Photo Placeholder (16:9) — temporary gray template for future images
   ========================================================================== */

.photo-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #d9dcdf 0%, #c8ccd1 100%);
  border: 1px dashed #a8adb3;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7076;
  font-size: 0.95rem;
  text-align: center;
  padding: 10px;
  overflow: hidden;
}

.photo-placeholder:has(img) {
  padding: 0;
  border: none;
  background: none;
}

.photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
}

.photo-placeholder span {
  pointer-events: none;
}

/* ==========================================================================
   Header + Navigation
   ========================================================================== */

.site-header {
  background: var(--color-navy);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  position: relative;
  gap: 12px;
}

.logo {
  color: var(--color-white);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo span {
  color: var(--color-gold);
}

.nav-menu {
  display: flex;
  gap: 28px;
}

.nav-menu a {
  color: var(--color-silver-light);
  font-size: 0.98rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-menu a:hover {
  color: var(--color-gold);
}

.burger-label {
  display: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
}

.burger-label span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition-medium), opacity var(--transition-medium);
}

#nav-toggle {
  display: none;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  background:
    linear-gradient(120deg, rgba(22, 34, 58, 0.92) 0%, rgba(15, 24, 42, 0.88) 100%),
    url("images/SaudiScreenMarket-background.jpg") center / cover no-repeat;
  color: var(--color-white);
  padding: 90px 20px;
}

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-text h1 {
  font-size: 2.4rem;
  margin-bottom: 18px;
  line-height: 1.5;
}

.hero-text h1 em {
  color: var(--color-gold);
  font-style: normal;
}

.hero-text p {
  color: var(--color-silver-light);
  margin-bottom: 26px;
  font-size: 1.05rem;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-navy-dark);
}

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

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

.btn-outline:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.hero-photo .photo-placeholder:not(:has(img)) {
  background: linear-gradient(135deg, #24344f 0%, #16223a 100%);
  border-color: #3a4c6c;
  color: var(--color-silver-light);
}

/* ==========================================================================
   Content Sections
   ========================================================================== */

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

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

.card {
  background: var(--color-white);
  border: 1px solid #e2e5e9;
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: border-color var(--transition-fast);
}

.card:hover {
  border-color: var(--color-gold);
}

.card i {
  font-size: 1.6rem;
  color: var(--color-gold);
  margin-bottom: 14px;
  display: inline-block;
}

.card h3 {
  color: var(--color-navy);
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.card p {
  font-size: 0.95rem;
  color: var(--color-charcoal);
  opacity: 0.85;
}

.section-media {
  margin-top: 34px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.two-col-reverse {
  direction: ltr;
}

.two-col-reverse > * {
  direction: rtl;
}

.guide-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--color-white);
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid #e2e5e9;
}

.guide-list i {
  color: var(--color-gold);
  margin-top: 3px;
  font-size: 1.1rem;
}

.guide-list h4 {
  color: var(--color-navy);
  font-size: 1rem;
  margin-bottom: 4px;
}

.guide-list p {
  font-size: 0.92rem;
  opacity: 0.85;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */

.testimonial-card {
  background: var(--color-white);
  border: 1px solid #e2e5e9;
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
}

.testimonial-stars {
  color: var(--color-gold);
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.testimonial-text {
  font-size: 0.96rem;
  color: var(--color-charcoal);
  opacity: 0.9;
  margin-bottom: 18px;
}

.testimonial-name {
  font-weight: 700;
  color: var(--color-navy);
}

.testimonial-role {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ==========================================================================
   Contact Form
   ========================================================================== */

.contact-wrapper {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: flex-start;
}

.contact-info {
  background: var(--color-navy);
  color: var(--color-white);
  border-radius: var(--radius);
  padding: 32px 26px;
}

.contact-info h3 {
  color: var(--color-gold);
  margin-bottom: 16px;
  font-size: 1.2rem;
}

.contact-info ul {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-info li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--color-silver-light);
}

.contact-info i {
  color: var(--color-gold);
  margin-top: 3px;
}

.contact-form {
  background: var(--color-white);
  border: 1px solid #e2e5e9;
  border-radius: var(--radius);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.form-group label {
  font-size: 0.9rem;
  color: var(--color-navy);
  font-weight: 600;
}

.form-group input,
.form-group textarea {
  padding: 12px 14px;
  border: 1px solid #d3d7db;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  background: var(--color-white);
  color: var(--color-charcoal);
  transition: border-color var(--transition-fast);
}

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

.form-hint {
  font-size: 0.78rem;
  opacity: 0.65;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
}

.form-checkbox input {
  margin-top: 3px;
  accent-color: var(--color-gold);
}

.form-checkbox a {
  color: var(--color-gold);
  text-decoration: underline;
}

.form-error {
  font-size: 0.8rem;
  color: #b13b3b;
  min-height: 14px;
}

/* ==========================================================================
   Modal (Form Success)
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 58, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 36px 30px;
  max-width: 380px;
  width: 100%;
  text-align: center;
}

.modal-box i {
  font-size: 2.6rem;
  color: var(--color-gold);
  margin-bottom: 16px;
}

.modal-box h3 {
  color: var(--color-navy);
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.modal-box p {
  font-size: 0.92rem;
  opacity: 0.8;
  margin-bottom: 22px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-navy-dark);
  color: var(--color-silver-light);
  padding: 50px 20px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
  max-width: 1180px;
  margin: 0 auto;
}

.footer-col h4 {
  color: var(--color-gold);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.footer-col p,
.footer-col a {
  font-size: 0.9rem;
  color: var(--color-silver-light);
  opacity: 0.85;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul a:hover {
  color: var(--color-gold);
}

.footer-bottom {
  max-width: 1180px;
  margin: 30px auto 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  opacity: 0.7;
}

/* ==========================================================================
   Cookie Banner
   ========================================================================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-navy-dark);
  color: var(--color-silver-light);
  padding: 18px 24px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  z-index: 3000;
  border-top: 2px solid var(--color-gold);
}

.cookie-banner.active {
  display: flex;
}

.cookie-text {
  font-size: 0.88rem;
  max-width: 760px;
}

.cookie-text a {
  color: var(--color-gold);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 12px;
}

/* ==========================================================================
   Responsive — Burger Menu (breakpoint 900px)
   ========================================================================== */

@media (max-width: 900px) {
  .logo {
    flex: 1;
    min-width: 0;
    font-size: 1.15rem;
    line-height: 1.35;
  }

  .burger-label {
    display: flex;
    flex-shrink: 0;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-navy);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-medium);
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu a {
    display: block;
    width: 100%;
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  #nav-toggle:checked ~ nav .nav-menu {
    max-height: 400px;
  }

  #nav-toggle:checked ~ .burger-label span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  #nav-toggle:checked ~ .burger-label span:nth-child(2) {
    opacity: 0;
  }

  #nav-toggle:checked ~ .burger-label span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero-inner,
  .two-col,
  .contact-wrapper {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 560px) {
  .hero-text h1 {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  section {
    padding: 50px 16px;
  }

  .legal-content h1 {
    font-size: 1.35rem;
  }
}

/* ==========================================================================
   Legal pages (privacy, terms, cookies)
   ========================================================================== */

.legal-content {
  max-width: 860px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 60px 20px 90px;
}

.legal-content h1 {
  color: var(--color-navy);
  font-size: 2rem;
  margin-bottom: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.legal-content .updated {
  opacity: 0.65;
  font-size: 0.85rem;
  margin-bottom: 30px;
}

.legal-content h2 {
  color: var(--color-navy);
  font-size: 1.25rem;
  margin: 30px 0 12px;
}

.legal-content p,
.legal-content li {
  font-size: 0.96rem;
  opacity: 0.88;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.legal-content ul {
  padding-right: 20px;
  list-style: disc;
  margin-bottom: 14px;
}

.legal-content a.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--color-gold);
  font-weight: 600;
}

.legal-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 16px 0 24px;
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.legal-content th,
.legal-content td {
  border: 1px solid #e2e5e9;
  padding: 10px 12px;
  font-size: 0.9rem;
  text-align: right;
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.legal-content th {
  background: var(--color-silver-light);
  color: var(--color-navy);
}

@media (max-width: 900px) {
  .legal-content {
    padding: 44px 16px 72px;
  }

  .legal-content h1 {
    font-size: 1.55rem;
  }

  .legal-content h2 {
    font-size: 1.12rem;
  }

  .legal-content table,
  .legal-content thead,
  .legal-content tbody,
  .legal-content tr,
  .legal-content th,
  .legal-content td {
    display: block;
    width: 100%;
  }

  .legal-content thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .legal-content tbody tr {
    background: var(--color-white);
    border: 1px solid #e2e5e9;
    border-radius: var(--radius);
    margin-bottom: 14px;
    padding: 4px 0;
  }

  .legal-content tbody tr:last-child {
    margin-bottom: 0;
  }

  .legal-content td {
    border: none;
    border-bottom: 1px solid #eef0f2;
    padding: 12px 14px;
  }

  .legal-content td:last-child {
    border-bottom: none;
  }

  .legal-content td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--color-navy);
    margin-bottom: 6px;
  }
}
