/* UKAdmit — Mobile Responsiveness Stylesheet */

/* ─── Prestige Editorial Typography ─────────── */
/* Playfair Display for all display-level headings */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,800;0,900;1,700;1,800&display=swap');

.font-display-lg,
h1.font-display-lg {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  letter-spacing: -0.025em;
  font-weight: 800;
}

/* ─── Section Label Accent ───────────────────── */
/* Usage: <p class="section-label">Your Journey</p> */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0F9F8F;
  font-family: 'Manrope', sans-serif;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background-color: #0F9F8F;
  flex-shrink: 0;
  border-radius: 2px;
}

/* ─── Grain Texture Overlay ──────────────────── */
/* Add class="grain-texture" to any section for tactile depth */
.grain-texture {
  position: relative;
}
.grain-texture::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='250'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.70' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 250px 250px;
}

/* ─── Hero Image Grid Enhancement ────────────── */
.hero-image-grid-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11,31,58,0.08) 0%, transparent 60%);
  border-radius: 2rem;
  pointer-events: none;
  z-index: 2;
}

/* ─── Refined Floating Cards ─────────────────── */
.float-card {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(11,31,58,0.14), 0 4px 12px rgba(11,31,58,0.06);
}

/* ─── Stats Section Accent ───────────────────── */
.stat-card-accent {
  border-top: 2px solid #0F9F8F;
}

/* ─── University / Programme Card Reveal ─────── */
@keyframes card-reveal {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card-reveal {
  animation: card-reveal 0.5s ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  .font-display-lg { letter-spacing: -0.02em; }
  .card-reveal { animation: none; opacity: 1; }
}

/* ─── Global ─────────────────────────────────── */
html, body { overflow-x: hidden; }

/* ─── Typography ─────────────────────────────── */
@media (max-width: 767px) {
  .text-display-lg {
    font-size: 2.25rem !important;
    line-height: 1.15 !important;
    letter-spacing: -0.01em !important;
  }
  .text-headline-lg {
    font-size: 1.875rem !important;
    line-height: 1.25 !important;
    letter-spacing: 0 !important;
  }
  .text-headline-md {
    font-size: 1.375rem !important;
  }
}

@media (max-width: 479px) {
  .text-display-lg { font-size: 1.875rem !important; }
  .text-headline-lg { font-size: 1.625rem !important; }
}

/* ─── Section Spacing ────────────────────────── */
@media (max-width: 767px) {
  .py-section-gap {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }
  .pt-section-gap { padding-top: 3.5rem !important; }
  .pb-section-gap { padding-bottom: 3.5rem !important; }
  .mb-section-gap { margin-bottom: 3.5rem !important; }
  .mt-section-gap { margin-top: 3.5rem !important; }
}

/* ─── Hero Heights ───────────────────────────── */
@media (max-width: 767px) {
  /* Index hero */
  .hero-gradient {
    min-height: auto !important;
    padding-top: 5rem !important;
    padding-bottom: 3rem !important;
  }
  /* Coventry university hero */
  .relative.min-h-\[716px\],
  section.min-h-\[716px\] {
    min-height: auto !important;
    padding-top: 5rem !important;
    padding-bottom: 3rem !important;
  }
}

/* ─── Fixed Image Heights ────────────────────── */
@media (max-width: 767px) {
  /* About page hero image */
  .h-\[400px\] { height: 220px !important; }
  /* University overview image */
  .h-\[500px\] { height: 260px !important; }
  /* Index hero image */
  .h-\[600px\] { height: 300px !important; }
}

/* ─── Success Stories Bento ──────────────────── */
/* Featured testimonial: all children are absolute-positioned,
   so give the container a defined height on mobile */
@media (max-width: 767px) {
  .md\:col-span-8 {
    min-height: 360px !important;
  }
}

/* ─── Programme Cards ────────────────────────── */
@media (min-width: 768px) {
  .md\:h-\[560px\] {
    height: 584px !important;
  }
}

@media (max-width: 767px) {
  /* Allow programme cards to grow naturally */
  .h-\[560px\] { height: auto !important; }
}

/* ─── CTA Hero Buttons ───────────────────────── */
@media (max-width: 639px) {
  .hero-cta-buttons {
    flex-direction: column;
  }
  .hero-cta-buttons > * {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* ─── Nav adjustment handled inline ─────────── */
/* nav inner container: px-4 sm:px-8 (changed in HTML) */

/* ─── Contact Page ───────────────────────────── */
@media (max-width: 767px) {
  /* Final CTA heading */
  .text-\[40px\] { font-size: 1.875rem !important; }
  .text-\[48px\] { font-size: 2.25rem !important; }
}

/* ─── Programmes Sidebar ─────────────────────── */
@media (max-width: 1023px) {
  /* On tablet/mobile, sidebar loses sticky and stacks */
  aside.sticky { position: static !important; }
}

/* ─── Bento Grids (Success Stories) ─────────── */
@media (max-width: 767px) {
  /* Remove the fixed auto-rows set via Tailwind arbitrary */
  .grid { grid-auto-rows: auto !important; }
}

/* ─── Section Flex Headers ───────────────────── */
@media (max-width: 639px) {
  .section-header-flex {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }
}

@media (max-width: 639px) {
  .hero-search-box {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem !important;
    align-items: center !important;
    padding: 0.875rem !important;
  }

  .hero-search-icon {
    margin-left: 0 !important;
  }

  .hero-search-input {
    min-width: 0;
    width: 100%;
  }

  .hero-search-button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 3rem;
  }
}
