@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');

:root {
  --charcoal-black: #050505;
  --deep-grey: #0a0a0a;
  --vintage-gold: linear-gradient(135deg, #d4af37 0%, #996515 100%);
  --gold-solid: #C5A059;
  --gold-muted: rgba(197, 160, 89, 0.4);
  --gold-glow: rgba(197, 160, 89, 0.1);
  --sandy-beige: #b5a48b;
  --white: #ffffff;
  --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none !important; /* Globally remove underlines */
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--charcoal-black);
  color: var(--white);
  overflow-x: hidden;
  direction: rtl;
  text-align: right;
  position: relative;
}

/* Subtle Geometric Pattern Overlay for Background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url('data:image/svg+xml;utf8,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><path d="M20 0L40 20L20 40L0 20Z" fill="none" stroke="rgba(197, 160, 89, 0.03)" stroke-width="1"/></svg>');
  background-size: 60px 60px;
  pointer-events: none;
  z-index: -2;
}

/* Custom Cursor */
.custom-cursor {
  width: 10px;
  height: 10px;
  background: var(--gold-solid);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 10000;
  transition: transform 0.1s ease;
}

.cursor-glow {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(197, 160, 89, 0.08) 0%, transparent 70%);
  position: fixed;
  top: -200px; /* offset so center aligns to cursor */
  left: -200px;
  pointer-events: none;
  z-index: 9999;
}

@media (max-width: 1024px) {
  .custom-cursor, .cursor-glow { display: none; }
}

/* Premium Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--charcoal-black);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-muted);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-solid);
}

/* Background Watermark */
.bg-watermark {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50vw;
  opacity: 0.04;
  pointer-events: none;
  z-index: -1;
  animation: logoFloat 20s infinite alternate ease-in-out;
}

@keyframes logoFloat {
  from { transform: translate(-50%, -52%) scale(1); }
  to { transform: translate(-50%, -48%) scale(1.05); }
}

/* Header Navigation */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background-color: rgba(5,5,5,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(197, 160, 89, 0.1);
}
header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('data:image/svg+xml;utf8,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><path d="M20 0L40 20L20 40L0 20Z" fill="none" stroke="rgba(197, 160, 89, 0.05)" stroke-width="1"/></svg>');
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
}

.logo-container img {
  height: 60px;
  width: auto;
  object-fit: contain;
  outline: none;
  border: none;
  box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.15),
              0 0 20px rgba(197, 160, 89, 0.2);
  filter: drop-shadow(0 0 10px rgba(197, 160, 89, 0.3));
  transition: var(--transition-smooth);
}

.logo-container img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 1px rgba(197, 160, 89, 0.4),
              0 0 30px rgba(197, 160, 89, 0.35);
}

nav ul {
  display: flex;
  gap: 3rem;
}

nav ul li a {
  color: var(--white);
  opacity: 0.7;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

nav ul li a:hover {
  opacity: 1;
  color: var(--gold-solid);
}

.nav-toggle {
  display: none; /* Hidden on desktop */
  cursor: pointer;
}

/* Fullscreen Menu Styles */
.fullscreen-menu {
  position: fixed;
  inset: 0;
  background: rgba(5,5,5,0.98);
  backdrop-filter: blur(20px);
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: translateY(-20px);
}
.fullscreen-menu.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.fullscreen-menu a {
  font-size: 1.8rem;
  color: var(--white);
  text-decoration: none;
  font-weight: bold;
  border-bottom: 2px solid transparent;
  transition: 0.3s;
}
.fullscreen-menu a:hover {
  color: var(--gold-solid);
  border-bottom: 2px solid var(--gold-solid);
}
.close-menu {
  position: absolute;
  top: 2rem;
  left: 2rem;
  font-size: 2.5rem;
  color: var(--gold-solid);
  cursor: pointer;
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(circle at center, rgba(197, 160, 89, 0.08) 0%, transparent 70%),
              linear-gradient(rgba(5, 5, 5, 0.5), rgba(5, 5, 5, 0.9)),
              url('public/images/hero.png');
  background-size: cover;
  background-position: center;
  padding: 0 10%;
}

.hero-content {
  max-width: 900px;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(to bottom, #fff, var(--gold-solid));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  color: var(--sandy-beige);
  margin-bottom: 3rem;
  font-weight: 300;
}

.btn-luxury {
  display: inline-block;
  padding: 1.2rem 3.5rem;
  border: 1px solid var(--gold-solid);
  color: var(--gold-solid);
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition-smooth);
}

.btn-luxury:hover {
  background: var(--gold-solid);
  color: #000;
  box-shadow: 0 10px 30px rgba(197, 160, 89, 0.4);
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 6rem;
}

.section-header span {
  display: block;
  font-size: 0.9rem;
  color: var(--gold-solid);
  letter-spacing: 5px;
  margin-bottom: 0.5rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--white);
}

/* Services Grid */
.services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 0 8%;
}
@media (max-width: 1200px) {
  .service-card { width: calc(50% - 1rem); }
}

.service-card {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  border: 1px solid rgba(197, 160, 89, 0.1);
  padding: 0;
  width: calc(33.33% - 1.35rem); /* 3 cards per row in flex */
  aspect-ratio: 1/1;
  display: flex;
  align-items: flex-end;
  text-align: right;
  transition: var(--transition-smooth);
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-solid);
}

.service-card .card-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .card-bg {
  transform: scale(1.1);
}

.service-card .card-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  width: 100%;
}

.icon-wrapper {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-size: 1.8rem;
  color: var(--gold-solid);
  margin: 0;
}

/* Projects Gallery */
.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  padding: 0 8%;
}

.project-box {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.project-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Topics Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 0 8%;
}

.blog-card {
  background: rgba(18, 18, 18, 0.5);
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid rgba(197, 160, 89, 0.05);
}

.blog-image { height: 200px; }
.blog-image img { width: 100%; height: 100%; object-fit: cover; }
.blog-content { padding: 2rem; }
.blog-content h3 { color: var(--gold-solid); margin-bottom: 1rem; }
.blog-content p { color: var(--sandy-beige); opacity: 0.8; font-size: 0.95rem; text-align: justify; }

/* Contact Form */
.quote-card {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(18, 18, 18, 0.8);
  padding: 5rem;
  border-radius: 20px;
  border: 1px solid rgba(197, 160, 89, 0.1);
}

input, select, textarea {
  width: 100%;
  padding: 1.2rem;
  background: rgba(18, 18, 18, 0.9); /* Darker background for form fields */
  border: 1px solid rgba(197, 160, 89, 0.2);
  color: #fff;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-family: 'Cairo', sans-serif;
  appearance: none;
  text-align: right !important;
  direction: rtl !important;
}

/* Fix for Select Options Visibility */
select option {
  background-color: #121212;
  color: #fff;
  padding: 1rem;
}

/* Floating Buttons */
.floating-contact {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 2000;
}

.circle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--deep-grey);
  border: 1px solid var(--gold-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-solid);
  font-size: 1.5rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

/* =============================================
   MOBILE ONLY — Do NOT touch desktop styles
   ============================================= */
@media (max-width: 768px) {

  /* Header */
  header {
    padding: 1rem 5%;
  }

  .logo-container img {
    height: 40px;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(20px);
    padding: 6rem 2rem 2rem;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 1px solid rgba(197, 160, 89, 0.1);
    z-index: 999;
  }

  nav.active {
    right: 0;
  }

  nav ul {
    flex-direction: column;
    gap: 2rem;
    text-align: right;
  }

  nav ul li a {
    font-size: 1.2rem;
    opacity: 0.9;
  }

  /* Hero */
  .hero {
    padding: 0 5%;
    height: 100svh;
  }

  .hero-content {
    width: 100%;
  }

  .hero-content h1 {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
  }

  .hero-content p {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .btn-luxury {
    padding: 1rem 2.5rem;
    font-size: 0.9rem;
  }

  /* Trust Bar */
  .trust-bar {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 1rem 2% !important;
  }
  .trust-bar span {
    font-size: 0.75rem !important;
  }

  /* Section Headers — reduce spacing */
  .section-header {
    margin-bottom: 3rem;
    padding: 0 5%;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  /* Services Grid - Swipeable "Balot Cards" style */
  .services-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 1rem 5% 2rem 5%;
    gap: 1.5rem;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start !important;
  }

  .services-grid::-webkit-scrollbar {
    display: none;
  }

  .service-card {
    flex: 0 0 75% !important;
    width: 75% !important;
    scroll-snap-align: center;
    aspect-ratio: 3/4 !important;
  }

  .service-card .card-content {
    padding: 0.8rem;
    padding-top: 2.5rem; /* Prevent overlap with icon */
  }

  .icon-wrapper {
    top: 0.8rem;
    left: 0.8rem;
    font-size: 1.2rem;
    margin: 0;
  }

  .service-card h3 {
    font-size: 0.9rem !important;
    margin-bottom: 0.3rem;
    color: var(--gold-solid) !important;
  }
  
  .service-card p {
    font-size: 0.65rem !important;
    line-height: 1.3 !important;
    margin: 0;
  }

  /* Projects */
  .projects-container {
    grid-template-columns: 1fr;
    padding: 0 5%;
    gap: 1rem;
  }

  /* Blog / Topics */
  .blog-grid {
    grid-template-columns: 1fr;
    padding: 0 5%;
    gap: 1.5rem;
  }

  .blog-content {
    padding: 1.5rem;
  }

  .blog-content h3 {
    font-size: 1.1rem;
    color: var(--gold-solid) !important;
  }
  
  .blog-content p {
    color: var(--white) !important;
    text-align: justify;
    text-justify: inter-word;
  }

  /* Contact Form */
  .quote-card {
    padding: 2rem 1.5rem;
    margin: 0 5%;
    border-radius: 15px;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  /* Footer */
  footer div[style*="display: flex"] {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  /* Floating Buttons — move to left on mobile (RTL) to avoid overlap */
  .floating-contact {
    bottom: 1.5rem;
    right: 1.5rem;
    left: auto;
    gap: 0.8rem;
  }

  .circle-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  /* Disable GSAP/cursor effects on touch */
  .custom-cursor,
  .cursor-glow {
    display: none !important;
  }

  /* Fix horizontal overflow */
  section {
    overflow-x: hidden;
  }

  /* Sections inline padding override */
  #services, #projects, #topics, #contact {
    padding-left: 0;
    padding-right: 0;
  }

  /* Global Mobile Typography & Layout Overrides */
  main {
    padding: 6rem 5% 2rem !important; /* Preserve header space, reduce sides */
  }
  
  article {
    padding: 1.5rem !important; /* Fix squished text on mobile */
  }
  
  main h1, .hero-content h1 {
    font-size: 1.6rem !important;
    line-height: 1.4 !important;
  }
  
  main h2, .section-header h2 {
    font-size: 1.4rem !important;
    line-height: 1.4 !important;
  }
  
  main h3 {
    font-size: 1.2rem !important;
  }
  
  main p, .hero-content p, .blog-content p {
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
  }

  /* Fix overlapping buttons inside blog posts */
  article .btn-luxury {
    width: 100%;
    margin-bottom: 0.8rem;
    text-align: center;
  }
}

/* More aggressive media query for Bottom Nav to ensure it shows on large phones too */
@media (max-width: 1024px) {
  header .nav-toggle, header nav {
    display: none !important;
  }
  header .nav-toggle {
    display: block !important;
  }
}
