/* ==========================================================================
   The Great Clinics - Under Construction Page Stylesheet
   Updated with New Official Brand Colors: Deep Teal (#00708c) & Aqua (#74c8c4)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Official Brand Palette from New Logo Proposal */
  --primary-teal: #00708c;
  --primary-teal-dark: #00556b;
  --primary-teal-light: #e6f4f7;
  --primary-teal-glow: rgba(0, 112, 140, 0.28);
  
  --secondary-aqua: #74c8c4;
  --secondary-aqua-dark: #4da6a2;
  --secondary-aqua-light: #f0faf9;
  --secondary-aqua-glow: rgba(116, 200, 196, 0.35);

  --text-dark: #003846;
  --text-body: #3b626e;
  --text-muted: #789ea8;
  
  --bg-canvas: #f6fafb;
  --card-bg: #ffffff;
  --card-border: rgba(0, 112, 140, 0.08);
  --card-shadow: 0 25px 60px -15px rgba(0, 112, 140, 0.14), 0 0 1px rgba(0, 0, 0, 0.05);

  --font-en: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ar: 'Cairo', system-ui, -apple-system, sans-serif;
}

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

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

body {
  font-family: var(--font-en);
  background-color: var(--bg-canvas);
  color: var(--text-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  padding: 40px 20px;
}

body[dir="rtl"] {
  font-family: var(--font-ar);
}

/* ==========================================================================
   Background Decorative Elements (Teal & Aqua Organic Shapes)
   ========================================================================== */
.bg-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* 0. Brand Logo Repeating Pattern (from Page 3 of PDF) */
.bg-pattern-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('pattern_tile_opt.png');
  background-size: 220px 223px;
  background-repeat: repeat;
  opacity: 0.08;
  pointer-events: none;
  z-index: 1;
}

/* 1. Top-Left Dot Matrix */
.decor-dot-grid {
  position: absolute;
  top: 30px;
  left: 30px;
  width: 160px;
  height: 160px;
  background-image: radial-gradient(#b2d8dd 2.2px, transparent 2.2px);
  background-size: 18px 18px;
  opacity: 0.85;
  animation: subtleFade 6s ease-in-out infinite alternate;
}

/* 2. Top-Right Organic Blobs (Aqua & Teal) */
.decor-blob-tr-green {
  position: absolute;
  top: -80px;
  right: -50px;
  width: 260px;
  height: 260px;
  background: var(--secondary-aqua);
  border-radius: 42% 58% 65% 35% / 45% 45% 55% 55%;
  opacity: 0.95;
  animation: floatSlow 14s ease-in-out infinite alternate;
}

.decor-blob-tr-blue {
  position: absolute;
  top: 20px;
  right: 120px;
  width: 180px;
  height: 180px;
  background: var(--primary-teal);
  border-radius: 50%;
  opacity: 0.95;
  animation: floatReverse 16s ease-in-out infinite alternate;
}

.decor-circle-tr-1 {
  position: absolute;
  top: 70px;
  right: 320px;
  width: 18px;
  height: 18px;
  background: var(--secondary-aqua);
  border-radius: 50%;
}

.decor-circle-tr-2 {
  position: absolute;
  top: 135px;
  right: 290px;
  width: 28px;
  height: 28px;
  background: var(--primary-teal);
  border-radius: 50%;
}

/* 3. Bottom-Left Organic Blobs (Teal & Aqua) */
.decor-blob-bl-blue {
  position: absolute;
  bottom: -90px;
  left: -80px;
  width: 280px;
  height: 280px;
  background: var(--primary-teal);
  border-radius: 55% 45% 40% 60% / 60% 50% 50% 40%;
  opacity: 0.95;
  animation: floatSlow 18s ease-in-out infinite alternate;
}

.decor-blob-bl-green {
  position: absolute;
  bottom: 80px;
  left: -40px;
  width: 180px;
  height: 180px;
  background: var(--secondary-aqua);
  border-radius: 50%;
  opacity: 0.95;
  animation: floatReverse 12s ease-in-out infinite alternate;
}

.decor-circle-bl-1 {
  position: absolute;
  bottom: 220px;
  left: 140px;
  width: 22px;
  height: 22px;
  background: var(--primary-teal);
  border-radius: 50%;
}

.decor-circle-bl-2 {
  position: absolute;
  bottom: 120px;
  left: 220px;
  width: 28px;
  height: 28px;
  background: var(--secondary-aqua);
  border-radius: 50%;
}

/* 4. Bottom-Right Concentric Arcs */
.decor-arcs-br {
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 320px;
  height: 320px;
  opacity: 0.9;
}

.decor-arcs-br svg {
  width: 100%;
  height: 100%;
}

/* 5. Bottom Soft Ground Wave */
.decor-wave-floor {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, rgba(225, 243, 246, 0.7), transparent);
  pointer-events: none;
}

/* ==========================================================================
   Header Bar (World Flags Bar - Pure Flags)
   ========================================================================== */
.top-nav {
  position: absolute;
  top: 24px;
  right: 32px;
  z-index: 30;
}

body[dir="rtl"] .top-nav {
  right: auto;
  left: 32px;
}

.flags-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 112, 140, 0.16);
  padding: 6px 12px;
  border-radius: 40px;
  box-shadow: 0 6px 20px rgba(0, 112, 140, 0.08);
}

.flag-btn {
  position: relative;
  background: none;
  border: none;
  padding: 3px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.flag-svg {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.25s ease;
  display: block;
}

.flag-btn:hover {
  transform: translateY(-2px) scale(1.14);
}

.flag-btn:hover .flag-svg {
  box-shadow: 0 4px 12px rgba(0, 112, 140, 0.3);
}

.flag-btn.active {
  transform: scale(1.08);
}

.flag-btn.active .flag-svg {
  box-shadow: 0 0 0 2.5px #ffffff, 0 0 0 5px var(--primary-teal);
}

/* Tooltip on Hover */
.flag-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--text-dark);
  color: #ffffff;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 40;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.flag-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: transparent transparent var(--text-dark) transparent;
}

.flag-btn:hover .flag-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Central Card Component
   ========================================================================== */
.construction-card {
  position: relative;
  z-index: 10;
  background: var(--card-bg);
  border-radius: 28px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  width: 100%;
  max-width: 720px;
  padding: 48px 48px 46px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  backdrop-filter: blur(16px);
  animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Logo Header */
.card-logo-wrap {
  margin-bottom: 24px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.brand-logo {
  max-width: 320px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 112, 140, 0.08));
  transition: transform 0.3s ease;
}

.brand-logo:hover {
  transform: scale(1.02);
}

/* Illustration Container */
.illustration-wrap {
  width: 100%;
  max-width: 340px;
  margin: 0 auto 16px;
  position: relative;
}

.construction-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* SVG Animations */
.hammer-hand {
  transform-origin: 270px 170px;
  animation: hammerTap 2.4s ease-in-out infinite;
}

.sparks circle, .sparks path {
  animation: sparkTwinkle 2.4s ease-in-out infinite;
}

/* Content Headings */
.card-title {
  color: var(--text-dark);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 12px;
}

body[dir="rtl"] .card-title {
  font-weight: 900;
  letter-spacing: normal;
}

.highlight-phrase {
  position: relative;
  display: inline-block;
  color: var(--primary-teal);
  white-space: nowrap;
}

.brush-stroke {
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 10px;
  stroke: var(--secondary-aqua);
  stroke-width: 4.5;
  fill: none;
  stroke-linecap: round;
  opacity: 0.95;
}

.card-subtitle {
  font-size: 1.05rem;
  color: var(--text-body);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 28px;
  font-weight: 400;
}

body[dir="rtl"] .card-subtitle {
  font-size: 1.1rem;
}

/* ==========================================================================
   Countdown Timer
   ========================================================================== */
.countdown-container {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  width: 100%;
  max-width: 480px;
}

.time-box {
  flex: 1;
  background: linear-gradient(135deg, #f7fafb 0%, #eef6f8 100%);
  border: 1px solid rgba(0, 112, 140, 0.12);
  border-radius: 16px;
  padding: 14px 8px 10px;
  min-width: 72px;
  box-shadow: 0 4px 12px rgba(0, 112, 140, 0.05);
  transition: all 0.3s ease;
}

.time-box:hover {
  transform: translateY(-3px);
  border-color: rgba(116, 200, 196, 0.6);
  box-shadow: 0 8px 20px rgba(0, 112, 140, 0.12);
}

.time-val {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-teal);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.time-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 4px;
}

body[dir="rtl"] .time-label {
  letter-spacing: 0;
  font-size: 0.8rem;
}

/* ==========================================================================
   Email Subscription Form
   ========================================================================== */
.subscribe-form-wrap {
  width: 100%;
  max-width: 480px;
  margin-bottom: 8px;
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.input-group {
  position: relative;
  width: 100%;
}

.email-input {
  width: 100%;
  height: 54px;
  padding: 0 20px;
  background: #ffffff;
  border: 1.5px solid #c7dfe5;
  border-radius: 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-dark);
  transition: all 0.25s ease;
  outline: none;
}

body[dir="rtl"] .email-input {
  text-align: right;
}

.email-input:focus {
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 4px var(--primary-teal-glow);
}

.email-input::placeholder {
  color: #8daab2;
}

.submit-btn {
  width: 100%;
  height: 54px;
  background: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-teal-dark) 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px -4px var(--primary-teal-glow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.submit-btn:hover {
  background: linear-gradient(135deg, #0087a8 0%, var(--primary-teal) 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(0, 112, 140, 0.4);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition: transform 0.3s ease;
}

body[dir="rtl"] .submit-btn svg {
  transform: rotate(180deg);
}

.submit-btn:hover svg {
  transform: translateX(4px);
}

body[dir="rtl"] .submit-btn:hover svg {
  transform: rotate(180deg) translateX(4px);
}

/* Form Feedback Messages */
.form-feedback {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 12px;
  animation: fadeIn 0.3s ease forwards;
}

.form-feedback.success {
  display: flex;
  background: var(--secondary-aqua-light);
  color: var(--secondary-aqua-dark);
  border: 1px solid rgba(116, 200, 196, 0.4);
}

.form-feedback.error {
  display: flex;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.page-footer {
  margin-top: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  z-index: 10;
  position: relative;
}

.page-footer p {
  line-height: 1.6;
}

/* ==========================================================================
   Keyframe Animations
   ========================================================================== */
@keyframes cardEntrance {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floatSlow {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    transform: translate(15px, 20px) rotate(4deg);
  }
}

@keyframes floatReverse {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-15px, -18px) scale(1.04);
  }
}

@keyframes subtleFade {
  0% { opacity: 0.65; }
  100% { opacity: 0.95; }
}

@keyframes hammerTap {
  0%, 100% {
    transform: rotate(0deg);
  }
  20% {
    transform: rotate(-18deg);
  }
  30% {
    transform: rotate(8deg);
  }
  40% {
    transform: rotate(0deg);
  }
  45% {
    transform: rotate(-12deg);
  }
  55% {
    transform: rotate(6deg);
  }
  65% {
    transform: rotate(0deg);
  }
}

@keyframes sparkTwinkle {
  0%, 15%, 45%, 100% {
    opacity: 0;
    transform: scale(0.6);
  }
  28%, 32% {
    opacity: 1;
    transform: scale(1.15);
  }
  53%, 57% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 768px) {
  body {
    padding: 24px 14px;
  }

  .top-nav {
    position: static;
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .flags-bar {
    gap: 6px;
    padding: 5px 10px;
  }

  .flag-svg {
    width: 25px;
    height: 25px;
  }

  .construction-card {
    padding: 36px 22px 32px;
    border-radius: 22px;
  }

  .brand-logo {
    max-width: 250px;
  }

  .illustration-wrap {
    max-width: 280px;
  }

  .card-title {
    font-size: 1.85rem;
  }

  .countdown-container {
    gap: 10px;
  }

  .time-box {
    padding: 10px 4px 8px;
    min-width: 58px;
  }

  .time-val {
    font-size: 1.5rem;
  }

  .time-label {
    font-size: 0.68rem;
  }

  .decor-blob-tr-green {
    width: 180px;
    height: 180px;
  }
  .decor-blob-tr-blue {
    display: none;
  }
  .decor-blob-bl-blue {
    width: 190px;
    height: 190px;
  }
  .decor-arcs-br {
    width: 220px;
    height: 220px;
  }
}

@media (max-width: 480px) {
  .card-title {
    font-size: 1.55rem;
  }

  .card-subtitle {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }

  .countdown-container {
    gap: 8px;
  }

  .time-box {
    min-width: 50px;
  }

  .time-val {
    font-size: 1.35rem;
  }

  .time-label {
    font-size: 0.62rem;
  }

  .flags-bar {
    gap: 4px;
    padding: 4px 8px;
  }

  .flag-svg {
    width: 22px;
    height: 22px;
  }
}
