/* ========================================
   AL RAHMAN TRAVEL - FRONTEND MAIN CSS
   Modern Islamic Luxury Design System
   ======================================== */

/* ===== 1. GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ===== 2. CSS CUSTOM PROPERTIES ===== */
:root {
  /* Brand Colors */
  --color-primary:     #664131;   /* Deep Mahogany — main brand color */
  --color-secondary:   #a88d5e;   /* Warm Gold — accents, highlights */
  --color-tertiary:    #e59756;   /* Amber — CTAs, hover states, icons */

  /* Derived Tints & Shades */
  --color-primary-dark:    #4a2e22;
  --color-primary-light:   #8a5a47;
  --color-secondary-light: #c4aa80;
  --color-tertiary-light:  #f0b87a;

  /* Neutrals */
  --color-white:       #ffffff;
  --color-off-white:   #fdf8f3;   /* Warm off-white — page backgrounds */
  --color-light-bg:    #f5ede4;   /* Warm light background for sections */
  --color-border:      #e8d9cc;   /* Subtle warm border */
  --color-text-dark:   #2c1810;   /* Near-black body text */
  --color-text-mid:    #6b4c3b;   /* Mid-tone text */
  --color-text-light:  #9d7a6a;   /* Muted text / captions */

  /* Semantic */
  --color-success:     #4a7c59;
  --color-error:       #c0392b;

  /* Typography */
  --font-display:  'Cormorant Garamond', Georgia, serif;   /* Headings, hero, brand */
  --font-body:     'DM Sans', system-ui, -apple-system, sans-serif;        /* Body, UI, forms */
  
  /* Type Scale */
  --text-xs:    0.75rem;    /* 12px */
  --text-sm:    0.875rem;   /* 14px */
  --text-base:  1rem;       /* 16px */
  --text-lg:    1.125rem;   /* 18px */
  --text-xl:    1.25rem;    /* 20px */
  --text-2xl:   1.5rem;     /* 24px */
  --text-3xl:   2rem;       /* 32px */
  --text-4xl:   2.5rem;     /* 40px */
  --text-5xl:   3.5rem;     /* 56px */
  --text-hero:  clamp(2.5rem, 6vw, 4.5rem);

  /* Spacing */
  --space-xs:   0.25rem;  /* 4px */
  --space-sm:   0.5rem;   /* 8px */
  --space-md:   1rem;     /* 16px */
  --space-lg:   1.5rem;   /* 24px */
  --space-xl:   2rem;     /* 32px */
  --space-2xl:  3rem;     /* 48px */
  --space-3xl:  4rem;     /* 64px */
  --space-4xl:  6rem;     /* 96px */

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(102, 65, 49, 0.06);
  --shadow-md:  0 4px 24px rgba(102, 65, 49, 0.10);
  --shadow-lg:  0 8px 40px rgba(102, 65, 49, 0.12);
  --shadow-xl:  0 12px 56px rgba(102, 65, 49, 0.15);

  /* Transitions */
  --transition-fast:   0.15s ease-in-out;
  --transition-base:   0.3s ease-in-out;
  --transition-slow:   0.5s ease-in-out;

  /* Border Radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-2xl: 24px;
  --radius-pill: 50px;
}

/* ===== 3. CSS RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text-dark);
  background-color: var(--color-off-white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-tertiary);
}

ul, ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ===== 4. TYPOGRAPHY SCALE ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-mid);
}

.lead {
  font-size: var(--text-xl);
  font-weight: 300;
  color: var(--color-text-mid);
}

.small-text {
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

/* ===== 5. GLOBAL UTILITY CLASSES ===== */
.container-fluid {
  width: 100%;
  padding-right: var(--space-md);
  padding-left: var(--space-md);
}

.section {
  padding: var(--space-4xl) 0;
}

.section-sm {
  padding: var(--space-3xl) 0;
}

.section-lg {
  padding: 6rem 0;
}

.text-center {
  text-align: center;
}

.text-primary { color: var(--color-primary) !important; }
.text-secondary { color: var(--color-secondary) !important; }
.text-tertiary { color: var(--color-tertiary) !important; }

.bg-primary { background-color: var(--color-primary) !important; }
.bg-secondary { background-color: var(--color-secondary) !important; }
.bg-tertiary { background-color: var(--color-tertiary) !important; }
.bg-off-white { background-color: var(--color-off-white) !important; }
.bg-light { background-color: var(--color-light-bg) !important; }

/* Section Title Styling */
.section-title {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title h2 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  color: var(--color-primary);
  margin-bottom: var(--space-md);
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-secondary);
}

.section-title p,
.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-light);
  font-style: italic;
  margin-top: var(--space-lg);
}

.gold-divider {
  width: 60px;
  height: 3px;
  background: var(--color-secondary);
  margin: var(--space-lg) auto;
}

.gold-divider-left {
  margin-left: 0;
  margin-right: auto;
}

/* Islamic Pattern Background */
.islamic-pattern-bg {
  background-image: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(168, 141, 94, 0.04) 10px,
      rgba(168, 141, 94, 0.04) 11px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 10px,
      rgba(168, 141, 94, 0.04) 10px,
      rgba(168, 141, 94, 0.04) 11px
    );
}

/* ===== 6. SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-light-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-secondary);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* ===== 7. SELECTION COLOR ===== */
::selection {
  background-color: var(--color-tertiary);
  color: var(--color-white);
}

::-moz-selection {
  background-color: var(--color-tertiary);
  color: var(--color-white);
}

/* ===== 8. BACK TO TOP BUTTON ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--color-tertiary);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  z-index: 999;
  border: none;
  cursor: pointer;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

/* ===== 9. RESPONSIVE TYPOGRAPHY ===== */
@media (max-width: 768px) {
  :root {
    --text-hero:  clamp(2rem, 8vw, 2.5rem);
    --text-5xl:   2.5rem;
    --text-4xl:   2rem;
    --text-3xl:   1.75rem;
  }

  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }

  .section {
    padding: var(--space-3xl) 0;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 576px) {
  .section {
    padding: var(--space-2xl) 0;
  }

  .section-title {
    margin-bottom: var(--space-2xl);
  }
}

/* ===== 10. FOCUS STATES (Accessibility) ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-tertiary);
  outline-offset: 2px;
}
