/* Critical CSS for DP World - Above-the-fold content */
/* Generated manually for optimal performance - Update when banner changes */

/* CSS Reset and Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Pilat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #fafafa;
  color: #374151;
  overflow-x: hidden;
}

/* Font face declarations for critical fonts */
@font-face {
  font-family: 'Pilat';
  src: url('/fonts/Pilat-Regular.woff2') format('woff2'),
    url('/fonts/Pilat-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pilat Wide';
  src: url('/fonts/PilatWide-Regular.woff2') format('woff2'),
    url('/fonts/Pilat-Wide-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pilat Wide';
  src: url('/fonts/Pilat-Wide-Bold.woff2') format('woff2'),
    url('/fonts/Pilat-Wide-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Arabic font support */
@font-face {
  font-family: 'Makdessi';
  src: url('/fonts/Makdessi-Regular.woff2') format('woff2'),
    url('/fonts/Makdessi-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* CSS Variables for typography - matching your design system */
:root {
  /* Heading sizes - Desktop */
  --heading-5xl-size: 60px;
  --heading-4xl-size: 48px;
  --heading-5xl-line-height: 68px;
  --heading-4xl-line-height: 56px;

  /* Body sizes - Desktop */
  --body-xl-size: 20px;
  --body-l-size: 18px;
  --body-xl-line-height: 29px;
  --body-l-line-height: 24px;

  /* Spacing */
  --space-2xl: 2rem;
  --space-4xl: 4rem;
  --space-7xl: 7rem;
  --space-13xl: 13rem;
}

/* Mobile typography adjustments */
@media (max-width: 767px) {
  :root {
    --heading-5xl-size: 36px;
    --heading-4xl-size: 32px;
    --heading-5xl-line-height: 40px;
    --heading-4xl-line-height: 36px;
    --body-xl-size: 18px;
    --body-l-size: 16px;
    --body-xl-line-height: 22px;
    --body-l-line-height: 20px;
  }
}

/* Arabic typography */
[dir='rtl'] body,
[lang='ar'] body {
  font-family: 'Makdessi', 'Pilat', system-ui, sans-serif;
}

/* Container utilities */
.container-fluid {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 768px) {
  .container-fluid {
    padding-right: 2rem;
    padding-left: 2rem;
  }
}

/* Grid system for banner layout */
.grid {
  display: grid;
}

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid-cols-12 {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.col-span-4 {
  grid-column: span 4 / span 4;
}
.col-span-7 {
  grid-column: span 7 / span 7;
}
.col-span-full {
  grid-column: 1 / -1;
}

/* Banner component styles */
.banner-wrapper {
  position: relative;
  width: 100%;
  height: 90vh;
  max-height: 800px;
  overflow: hidden;
}

.banner-media-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.banner-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Banner content overlay */
.banner-content-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding-top: var(--space-13xl);
  padding-bottom: var(--space-7xl);
  z-index: 10;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
}

/* RTL support */
[dir='rtl'] .banner-content-wrapper {
  left: auto;
  right: 0;
}

/* Banner text content */
.banner-headline {
  font-family: 'Pilat Wide', 'Pilat', system-ui, sans-serif;
  font-size: var(--heading-4xl-size);
  line-height: var(--heading-4xl-line-height);
  font-weight: 700;
  margin-bottom: var(--space-2xl);
  color: white;
}

@media (min-width: 1024px) {
  .banner-headline {
    font-size: var(--heading-5xl-size);
    line-height: var(--heading-5xl-line-height);
  }
}

.banner-description {
  font-family: 'Pilat', system-ui, sans-serif;
  font-size: var(--body-l-size);
  line-height: var(--body-l-line-height);
  color: white;
  opacity: 0.9;
}

@media (min-width: 1024px) {
  .banner-description {
    font-size: var(--body-xl-size);
    line-height: var(--body-xl-line-height);
  }
}

/* Gradient border bottom effect */
.gradient-border-bottom {
  position: relative;
  padding-bottom: var(--space-4xl);
}

.gradient-border-bottom::after {
  content: '';
  height: 1px;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* Utility classes used by Banner */
.relative {
  position: relative;
}
.absolute {
  position: absolute;
}
.inset-0 {
  inset: 0;
}
.z-0 {
  z-index: 0;
}
.z-10 {
  z-index: 10;
}
.w-full {
  width: 100%;
}
.h-full {
  height: 100%;
}
.overflow-hidden {
  overflow: hidden;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.text-white {
  color: white;
}
.opacity-90 {
  opacity: 0.9;
}
.font-bold {
  font-weight: 700;
}

/* Grid gutter */
.grid-gutter {
  gap: 1rem;
}

@media (min-width: 768px) {
  .grid-gutter {
    gap: 1.5rem;
  }
}

/* Responsive grid adjustments */
@media (min-width: 480px) {
  .xs\:grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .xs\:col-span-5 {
    grid-column: span 5 / span 5;
  }
}

@media (min-width: 768px) {
  .sm\:grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .sm\:col-span-8 {
    grid-column: span 8 / span 8;
  }
  .sm\:col-span-7 {
    grid-column: span 7 / span 7;
  }
}

@media (min-width: 1024px) {
  .m\:grid-cols-7 {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  .m\:col-span-5 {
    grid-column: span 5 / span 5;
  }
  .m\:col-span-6 {
    grid-column: span 6 / span 6;
  }
  .m\:col-span-7 {
    grid-column: span 7 / span 7;
  }
  .m\:justify-end {
    justify-content: flex-end;
  }
}

/* RTL specific adjustments */
[dir='rtl'] .start-0 {
  left: auto;
  right: 0;
}

[dir='rtl'] .m\:justify-end {
  justify-content: flex-start;
}

/* Tailwind utility classes for banner */
.mb-2xl {
  margin-bottom: var(--space-2xl);
}
.pt-13xl {
  padding-top: var(--space-13xl);
}
.pb-7xl {
  padding-bottom: var(--space-7xl);
}
.pb-4xl {
  padding-bottom: var(--space-4xl);
}

/* Font family utilities */
.font-header-pilat {
  font-family: 'Pilat Wide', 'Pilat', system-ui, sans-serif;
}
.font-body-pilat {
  font-family: 'Pilat', system-ui, sans-serif;
}

/* Typography utilities matching your design system */
.heading-5xl {
  font-size: var(--heading-5xl-size);
  line-height: var(--heading-5xl-line-height);
}

.heading-4xl {
  font-size: var(--heading-4xl-size);
  line-height: var(--heading-4xl-line-height);
}

.body-xl {
  font-size: var(--body-xl-size);
  line-height: var(--body-xl-line-height);
}

.body-l {
  font-size: var(--body-l-size);
  line-height: var(--body-l-line-height);
}

/* Prevent FOUC */
.banner-wrapper > * {
  visibility: visible;
}

/* Loading state for images */
img[data-loading='lazy'] {
  background-color: #e5e7eb;
}

/* Focus styles for accessibility */
*:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
