/* 
 * OFREM Global Styles - Overhaul v2
 * Strict Brand Adherence: Dark Header, Deep Blue, Spacious Layout
 */

:root {
  /* Brand Colors */
  --color-primary: #0055ff;
  /* More vibrant blue for better contrast */
  --color-primary-dark: #0033cc;
  --color-secondary: #000000;
  /* Strict Black */
  --color-accent: #00d4ff;
  /* Cyan for subtle highlights */

  /* Neutrals */
  /* Neutrals */
  --bg-dark: #050505;
  --bg-light: #ffffff;
  --bg-gray: #f8f9fa;
  --bg-white: #e2e8f0;
  --text-main: #1a1a1a;
  --text-light: #555555;
  --text-white: #ffffff;
  --text-footer: #e2e8f0;
  /* Improved footer contrast */

  /* Spacing */
  --container-width: 1280px;
  --header-height: 90px;
  --section-padding: 5rem 2rem;
  /* Reduced from 8rem for more compact layout */
  --card-padding: 2.5rem;

  /* Shadows & Borders */
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --border-light: #e5e5e5;

  /* Transitions */
  --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;

  /* Cinematic Gradients */
  --grad-dark: linear-gradient(180deg, #000000 0%, #050a1a 100%);
  --grad-accent: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.7;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.1;
  color: var(--secondary);
}

h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  color: var(--text-light);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.grid {
  display: grid;
  gap: 3rem;
  /* 4rem seems too wide on small screens, reducing slightly for balance */
  padding-bottom: 2rem;
  /* Margin bottom for cards */
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Cinematic Utilities */
.cinematic-section {
  padding: 6rem 0;
  background: var(--bg-dark);
  color: white;
  overflow: hidden;
  position: relative;
}

.text-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: var(--transition);
}

.text-reveal.aos-animate {
  opacity: 1;
  transform: translateY(0);
}

.glow-text {
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 3rem;
  transition: var(--transition);
}

.section-title {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.section-title span {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

/* Creative Typography Enhancements */
.cinematic-section h2 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0;
  text-transform: uppercase;
  color: white;
}

.cinematic-section .section-title .header-glow-shell {
  margin-bottom: 2rem;
}

.liquid-glow {
  background: linear-gradient(to right,
      #ffffff 20%,
      var(--color-accent) 40%,
      #8a2be2 60%,
      var(--color-primary) 80%,
      #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: liquid-flow 8s linear infinite;
  position: relative;
  transition: var(--transition);
}

.liquid-glow:hover {
  letter-spacing: 0.05em;
  transform: translateY(-2px);
  filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.4));
}

@keyframes liquid-flow {
  to {
    background-position: 200% center;
  }
}

.header-glow-shell {
  position: relative;
  display: inline-block;
}

.header-glow-shell::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: var(--transition);
}

.header-glow-shell:hover::before {
  opacity: 1;
}

.cinematic-section .section-title span {
  font-size: 0.875rem;
  letter-spacing: 0.3em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
  margin-bottom: 1rem;
}

.cinematic-section p {
  font-size: 1.2rem;
  line-height: 1.8;
  max-width: 700px;
  color: rgba(255, 255, 255, 0.7);
}

.text-sweep {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine-sweep 6s infinite linear;
}

@keyframes shine-sweep {
  0% {
    background-position: -100% 0;
  }

  100% {
    background-position: 100% 0;
  }
}

.text-highlight {
  position: relative;
  color: var(--color-accent);
  font-weight: 700;
  display: inline-block;
}

.text-highlight::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--color-primary);
  opacity: 0.3;
  z-index: -1;
  transition: var(--transition);
}

.text-highlight:hover::after {
  height: 100%;
  opacity: 0.2;
}

.phantom-text {
  position: absolute;
  font-size: clamp(8rem, 15vw, 12rem);
  font-weight: 900;
  color: white;
  opacity: 0.02;
  pointer-events: none;
  z-index: 1;
  line-height: 0.8;
  white-space: nowrap;
  text-transform: uppercase;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(0, 85, 255, 0.4);
}

.btn-primary:hover {
  background: var(--color-accent);
  color: var(--color-secondary);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.5);
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(0, 212, 255, 0.1);
  transform: translateY(-3px);
}

/* Navbar (Dark) */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--color-secondary);
  /* Black/Dark Background */
  z-index: 1000;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo img {
  height: 70px;
  /* Increased from 50px for bolder display */
  width: auto;
  transition: var(--transition);
}

.logo img:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: white;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  padding: calc(var(--header-height) + 1rem) 0 2rem;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #000;
  z-index: 5;
}

/* Background Highlight */
.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(0, 51, 170, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 5;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.hero-content-col {
  max-width: 650px;
}

.hero-visual-col {
  position: relative;
  height: 650px;
  overflow: hidden;
  z-index: 10;
  mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.hero-bg-anim {
  display: flex;
  gap: 20px;
  height: 100%;
}

.hero-track {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: scroll-vertical 40s linear infinite;
}

.hero-track:nth-child(even) {
  animation-direction: reverse;
  animation-duration: 50s;
}

.hero-track img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease;
}

.hero-track img:hover {
  transform: scale(1.02);
  border-color: var(--color-accent);
}

@keyframes scroll-vertical {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-50%);
  }
}

/* Responsive Stacking */
@media (max-width: 992px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + 3rem);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-content-col {
    text-align: center;
    margin: 0 auto;
  }

  .hero-visual-col {
    height: 450px;
  }

  .track-hide-mobile {
    display: none;
  }
}

/* Immersive Pillar Cards */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  height: 700px;
  margin-top: 5rem;
  border-radius: 20px;
  overflow: hidden;
}

.pillar-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  padding: 4rem 3rem;
  transition: var(--transition);
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
  z-index: 2;
  transition: var(--transition);
}

.pillar-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  transition: var(--transition);
}

.pillar-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  transition: var(--transition);
}

.pillar-content {
  position: relative;
  z-index: 3;
  width: 100%;
  transition: var(--transition);
}

.pillar-content h3 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.pillar-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: var(--transition);
  color: rgba(255, 255, 255, 0.8);
}

.pillar-card:hover {
  flex: 1.5;
}

.pillar-card:hover .pillar-bg img {
  transform: scale(1);
}

.pillar-card:hover .pillar-details {
  max-height: 200px;
  opacity: 1;
  margin-top: 1.5rem;
}

.pillar-card:hover::before {
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 51, 170, 0.7) 100%);
}

@media (max-width: 992px) {
  .pillar-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .pillar-card {
    height: 400px;
  }
}

/* Stats Redesign */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.stat-item {
  padding: 3rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.02);
  border-left-color: var(--color-accent);
}

.stat-number {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  display: block;
}

.card-icon {
  width: 70px;
  height: 70px;
  background: rgba(0, 51, 170, 0.1);
  color: var(--color-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

/* Contact Page Corrections */
.contact-section {
  padding: var(--section-padding) 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 51, 170, 0.1);
}

/* Footer */
/* Footer */
footer {
  background: var(--bg-dark);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-col h4 {
  color: white;
  margin-bottom: 2rem;
}

.footer-col ul li {
  margin-bottom: 1rem;
}

.footer-col ul li a {
  color: var(--text-footer);
  /* Lighter text for contrast */
}

.footer-col ul li a:hover {
  color: white;
  text-decoration: underline;
}

/* === New Additions === */

/* Page Loader */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb li+li::before {
  content: '/';
  margin: 0 0.5rem;
  color: rgba(255, 255, 255, 0.4);
}

.breadcrumb a:hover {
  color: white;
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--color-primary);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  /* Hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

#back-to-top:hover {
  background: white;
  color: var(--color-primary);
  transform: translateY(-5px);
}

/* Responsive Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
    /* Stack on mobile */
  }
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: var(--bg-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 3rem 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .hamburger {
    display: block;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .section-title {
    margin-bottom: 3rem;
  }

  h1 {
    font-size: 2.75rem;
  }

  /* Reduce excessive gaps on mobile */
  :root {
    --section-padding: 3rem 1.5rem;
    --card-padding: 1.5rem;
  }

  .glass-card {
    padding: 1.5rem;
  }

  .container {
    padding: 0 1rem;
  }

  .grid {
    gap: 2rem;
  }

  .hero {
    padding-top: calc(var(--header-height) + 2rem);
    padding-bottom: 3rem;
  }

  .form-control {
    padding: 1.25rem 1rem;
    font-size: 1.1rem;
    /* Easier to tap and read on mobile */
  }

  .btn {
    padding: 1.25rem 2rem;
    /* Larger touch targets */
  }
}

/* Animations (Simple Fade) */
[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* Modal System */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
  padding: 2rem;
}

.modal-content {
  width: 100%;
  max-width: 1100px;
  height: 85vh;
  background: #f1f1f1;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  transition: 0.3s;
  z-index: 10001;
  line-height: 1;
}

.modal-close:hover {
  color: var(--color-primary);
  transform: scale(1.1);
}

.pdf-viewer-container {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Discourage selection/copying on the container */
.pdf-viewer-container {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}