/* Custom styles for Revira Petrochem */

/* =========================
   HEADER – RESPONSIVE
========================= */
.header-nav {
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

/* Default vs compact header visibility */
.default-header {
  display: block;
}

.compact-header {
  display: none;
}

@media (min-width: 768px) {

  /* Desktop: compact header available */
  #scrolled-nav {
    display: block;
  }
}

@media (max-width: 767px) {

  /* On mobile, allow compact header if JS shows it */
  /* #scrolled-nav {
    /* default to hidden, JS toggles class 'visible' or 'hidden' */
  /* But we must NOT use !important so JS can override it via classes  
  */
}

/* Logo circle – no pseudo overlay on small screens to avoid clutter */
#main-nav .logo-circle {
  position: relative;
}

#main-nav .header-logo-circle {
  flex-shrink: 0;
}

/* Nav links row: wrap on medium screens, single row on large */
.nav-links-row {
  gap: 0.125rem 0.25rem;
}

@media (min-width: 1024px) {
  .nav-links-row {
    gap: 0.25rem 0;
  }
}

/* Very small viewports: ensure header doesn’t overflow */


.gold-glow {
  box-shadow: 0 4px 20px -5px rgba(200, 161, 101, 0.4);
}

.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.text-shadow-light {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Material Symbols Outlined - ensure icons display */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: 400;
  font-style: normal;
  font-size: inherit;
  line-height: 1;
  letter-spacing: normal;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(200, 161, 101, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(200, 161, 101, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(200, 161, 101, 0);
  }
}

.animate-pulse-dot {
  animation: pulse-dot 2s infinite;
}

/* Animation delay utilities for pulse dots */
.animation-delay-500 {
  animation-delay: 0.5s;
}

.animation-delay-1000 {
  animation-delay: 1s;
}

.animation-delay-1500 {
  animation-delay: 1.5s;
}

/* Nav: light background when over hero */
#main-nav.nav-over-hero {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom-color: rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease-in-out;
}

/* Nav: solid white when scrolled past hero */
#main-nav.nav-scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#main-nav.nav-scrolled .nav-logo-text,
#main-nav .nav-logo-text {
  color: #0f172a;
}

#main-nav.nav-scrolled .nav-logo-sub,
#main-nav .nav-logo-sub {
  color: #0f172a;
}

#main-nav.nav-scrolled .nav-link,
#main-nav .nav-link {
  color: #475569;
}

#main-nav.nav-scrolled .nav-link:hover,
#main-nav .nav-link:hover {
  color: #0f172a;
}

#main-nav.nav-scrolled .nav-link:first-child,
#main-nav .nav-link:first-child {
  color: #0f172a;
}

#main-nav.nav-scrolled #mobile-menu-button,
#main-nav #mobile-menu-button {
  color: #475569;
}

#main-nav.nav-scrolled #mobile-menu-button:hover,
#main-nav #mobile-menu-button:hover {
  color: #0f172a;
}

/* Mobile menu */
#mobile-menu.mobile-menu-open {
  opacity: 1;
  pointer-events: auto;
}

#mobile-menu.mobile-menu-open .mobile-menu-panel {
  transform: translateX(0) !important;
}

/* Mobile menu panel: always show list, safe areas */
.mobile-menu-panel {
  padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0));
  -webkit-overflow-scrolling: touch;
}

.mobile-menu-panel nav {
  visibility: visible;
  opacity: 1;
}

.mobile-nav-link {
  color: #fff;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
}

.mobile-nav-link:hover {
  color: #f1f5f9;
}

/* Panel stays narrow so backdrop (rest of page) stays visible and tappable to close */
.mobile-menu-panel {
  min-height: 100%;
}

/* Hero horizontal slider */
.hero-slider {
  overflow: hidden;
}

.hero-slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide {
  flex: 0 0 100%;
  min-width: 100%;
  height: 100%;
  position: relative;
}

.hero-slide-img {
  position: absolute;
  inset: 0;
}

/* Hero slide dots: inactive = light gray, active = dark */
.hero-dot {
  background-color: rgba(255, 255, 255, 0.4);
}

.hero-dot:hover {
  background-color: rgba(255, 255, 255, 0.7);
}

.hero-dot-active {
  background-color: rgba(15, 23, 42, 0.9);
  transform: scale(1.15);
}

/* Map section background */
.map-section-bg {
  background-image: url('https://lh3.googleusercontent.com/aida-public/AB6AXuDI3IbpJhUL8TtR9KgNFSdSK7icivXq3szqP3jQDpVDbblUEJI15Oy_aD7wAYjlbq2gBv7YHTjW1udT97SG-l4bCFuTzUJy9GljIzMTdDm4KWAeapGza92AHjXshcQmhkNIGHbnvksE8QtXyIHYeN9_-BV_OTACeDp02LEBBfEy6AuRYiJUFdaTOeSQnJv8RiKoMJieEdgNJpJwk8jvkcYYkrWzR8e6mU0RoTalZMPSjB9xcx42FZZ0Q9PJJK2oHXrGeSbcCORg_8I');
  filter: invert(0);
}

/* =========================
   OUR SOLUTIONS ANIMATION
========================= */
.solution-reveal {
  --solution-delay: 0ms;
  opacity: 0;
  transform: translateY(36px) scale(0.97);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--solution-delay);
}

.solution-reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.solution-card {
  position: relative;
}

/* =========================
   HERO LINE-BY-LINE DROP
========================= */
.hero-heading {
  overflow: hidden;
}

.hero-heading .hero-line {
  display: block;
  opacity: 0;
  transform: translateY(-40px);
  animation: heroLineDown 0.8s ease-out forwards;
}

/* H1 stagger */
.hero-heading .hero-line:nth-child(1) {
  animation-delay: 0.1s;
}

.hero-heading .hero-line:nth-child(2) {
  animation-delay: 0.3s;
}

.hero-heading .hero-line:nth-child(3) {
  animation-delay: 0.5s;
}

.hero-heading .hero-line:nth-child(4) {
  animation-delay: 0.7s;
}

/* =========================
     PARAGRAPH DROP
  ========================= */
.hero-para {
  opacity: 0;
  transform: translateY(-30px);
  animation: heroFadeDown 0.7s ease-out forwards;
  animation-delay: 0.95s;
  /* after heading */
}

/* =========================
     BUTTONS DROP
  ========================= */
.hero-buttons {
  opacity: 0;
  transform: translateY(-20px);
  animation: heroFadeDown 0.7s ease-out forwards;
  animation-delay: 1.15s;
}

/* =========================
     KEYFRAMES
  ========================= */
@keyframes heroLineDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroFadeDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
     ACCESSIBILITY
  ========================= */
@media (prefers-reduced-motion: reduce) {

  .hero-line,
  .hero-para,
  .hero-buttons,
  .solution-reveal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Mobile: touch-friendly and safe areas */
@media (max-width: 767px) {
  .hero-dots {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}

/* Prevent double-tap zoom on buttons (optional) */
button,
a {
  touch-action: manipulation;
}

/* =========================
   FOOTER – RESPONSIVE
========================= */
footer {
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

/* Footer watermark: always 80% of footer height */
.footer-watermark {
  height: 80%;
}

/* Footer watermark logo: keep visible on mobile (default position hides it) */
@media (max-width: 767px) {
  .footer-watermark {
    bottom: 0;
    right: 0;
    width: 70%;
    max-width: 280px;
    opacity: 0.12;
  }
}

/* Footer grid: 2 columns on tablet (brand full width, then Quick Access + HQ side by side) */
@media (min-width: 768px) and (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid>div:first-child {
    grid-column: 1 / -1;
  }
}

/* Small viewports: compact logo and brand */
@media (max-width: 639px) {
  footer .flex.items-center.gap-3.mb-2 img {
    height: 2.5rem;
  }

  footer .nav-logo-text {
    font-size: 1.25rem;
  }

  footer .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .footer-grid {
    gap: 2rem;
    margin-bottom: 2rem;
  }

  .footer-grid h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  /* Contact cards: stack icon above text on very narrow so text can wrap */
  footer ul.space-y-4 li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  footer ul.space-y-4 li .material-symbols-outlined {
    font-size: 1.25rem;
  }

  /* Bottom bar: center and wrap */
  footer .footer-bottom {
    padding-top: 1.5rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  footer .footer-bottom p {
    max-width: 100%;
    line-height: 1.5;
  }

  footer .footer-bottom button {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

/* Very small screens: prevent overflow */
@media (max-width: 380px) {
  footer .nav-logo-text {
    font-size: 1.125rem;
  }

  footer .flex.gap-3.mt-2 a {
    width: 2.25rem;
    height: 2.25rem;
  }

  footer .flex.gap-3.mt-2 a svg,
  footer .flex.gap-3.mt-2 a .material-symbols-outlined {
    width: 1rem;
    height: 1rem;
    font-size: 1rem;
  }
}

/* Compact sticky header styles */
#scrolled-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease-in-out;
  transform: translateY(-100%);
}

#scrolled-nav.visible {
  transform: translateY(0);
}

#scrolled-nav.hidden {
  transform: translateY(-100%);
}

/* Compact header center nav links */
.compact-nav-link {
  position: relative;
  color: #64748b;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
  text-decoration: none;
}

.compact-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: #C8A165;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.compact-nav-link:hover {
  color: #0f172a;
}

.compact-nav-link:hover::after,
.compact-nav-link.active::after {
  width: 100%;
}

.compact-nav-link.active {
  color: #0f172a;
}

/* Mobile menu button in compact header */
#mobile-menu-button-compact .menu-icon-compact,
#mobile-menu-button-compact .close-icon-compact {
  font-size: 1.5rem;
}

/* Better touch targets for mobile */
@media (max-width: 768px) {

  a,
  button:not(.hero-dot),
  .nav-link,
  .mobile-nav-link {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* =========================
   PARALLAX SCROLLING
========================= */
.parallax-bg,
.parallax-element {
  will-change: transform;
  /* Hardware acceleration hint */
  transform: translate3d(0, 0, 0);
}

/* Disable parallax on reduced motion preference */
@media (prefers-reduced-motion: reduce) {

  .parallax-bg,
  .parallax-element {
    transform: none !important;
    will-change: auto;
  }
}