/* ============================
   GLOBAL BASE STYLES
   ============================ */

/* ============================
   NAVBAR SCROLLED STATE
   ============================ */
/* When .scrolled class is toggled on #navbar via JS, all child text/icons turn white */
#navbar .navbar-brand-text,
#navbar .nav-link {
  transition: color 0.35s ease;
}
#navbar .hamburger-line1,
#navbar .hamburger-line2,
#navbar .hamburger-line3 {
  transition: background-color 0.35s ease, transform 0.3s ease, opacity 0.3s ease;
}

#navbar.scrolled .navbar-brand-text {
  color: white !important;
}
#navbar.scrolled .nav-link {
  color: rgba(255, 255, 255, 0.88) !important;
}
#navbar.scrolled .nav-link:hover {
  color: #38BDF8 !important;
}
#navbar.scrolled .nav-link.nav-active {
  color: #38BDF8 !important;
}
#navbar.scrolled .hamburger-line1,
#navbar.scrolled .hamburger-line2,
#navbar.scrolled .hamburger-line3 {
  background-color: white;
}

/* ============================
   ADÓ 1% CTA GOMB – BEACON PULSE
   ============================ */
@keyframes beacon-pulse {
  0%   { box-shadow: 0 4px 24px rgba(0,229,255,0.4), 0 0 0 0 rgba(0,229,255,0.5); }
  60%  { box-shadow: 0 4px 24px rgba(0,229,255,0.4), 0 0 0 14px rgba(0,229,255,0); }
  100% { box-shadow: 0 4px 24px rgba(0,229,255,0.4), 0 0 0 0 rgba(0,229,255,0); }
}
.ado-cta-btn {
  animation: beacon-pulse 2.4s ease-out infinite;
}
.ado-cta-btn:hover {
  animation: none;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 40px rgba(0,229,255,0.55) !important;
}

:root {
  --deep-navy: #0F172A; /* Deeper elegant navy */
  --dark-teal: #1E293B; /* Slate 800 */
  --electric-blue: #38BDF8; /* Sky 400 - more muted */
  --ocean-mid: #0284C7; /* Sky 600 */
  --ocean-light: #0EA5E9; /* Sky 500 */
  --bg-color: #F8FAFC; /* Slate 50 */
  --text-main: #334155; /* Slate 700 */
  --text-muted: #64748B; /* Slate 500 */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::selection {
  background: rgba(0, 229, 255, 0.3);
  color: white;
}

/* ============================
   SCROLLBAR
   ============================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--deep-navy);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--electric-blue), var(--ocean-mid));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--electric-blue);
}

/* ============================
   CARD AND UI UTILITIES
   ============================ */
.glass-panel {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.glass-panel:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

.glass-panel-light {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.glass-panel-light:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}



.flat-btn {
  background-color: var(--ocean-mid);
  color: white;
  font-weight: 600;
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(2, 132, 199, 0.2);
  will-change: transform;
  transform: translateZ(0);
}

.flat-btn:hover {
  background-color: var(--ocean-light);
  box-shadow: 0 6px 12px -1px rgba(2, 132, 199, 0.35);
}

/* ============================
   KEYFRAMES
   ============================ */

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes bubbleRise {
  0% {
    transform: translateY(0) scale(1) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100vh) scale(1.5) translateX(20px);
    opacity: 0;
  }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

.animate-bounce {
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8,0,1,1);
  }
  50% {
    transform: none;
    animation-timing-function: cubic-bezier(0,0,0.2,1);
  }
}

.animate-fade-in {
  animation: fade-in 1s ease-out forwards;
}

/* ============================
   GALLERY ENHANCEMENTS
   ============================ */
.gallery-item {
  perspective: 1000px;
}
.gallery-item .gallery-overlay {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

/* ============================
   BACK TO TOP BUTTON
   ============================ */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--ocean-mid);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
#back-to-top.show {
  opacity: 1;
  visibility: visible;
}
#back-to-top:hover {
  background: var(--electric-blue);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.4);
}

/* Mobilon kisebb méret és más pozíció, ne takarja el az elemeket */
@media (max-width: 767px) {
  #back-to-top {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
}

/* ============================
   FOOTER PATTERN
   ============================ */
footer::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath fill='%23ffffff' d='M40 0C17.9 0 0 17.9 0 40s17.9 40 40 40 40-17.9 40-40S62.1 0 40 0zm0 75C20.7 75 5 59.3 5 40S20.7 5 40 5s35 15.7 35 35-15.7 35-35 35z'/%3E%3C/svg%3E");
  background-size: 80px 80px;
  pointer-events: none;
}

@media (pointer: fine) {
  .cursor-aura {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 180, 220, 0.5);
    background: rgba(0, 229, 255, 0.06);
    pointer-events: none;
    z-index: 9998;
    /* FIX: transform helyett left/top – GPU compositor, nem layout engine */
    transform: translate(-50%, -50%);
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background 0.3s ease,
                border-color 0.3s ease;
    will-change: transform;
  }
}

/* FIX: scale() helyett width/height – nem okoz layout reflow-t, nincs hover feedback loop */
.cursor-aura.active {
  transform: translate(-50%, -50%) scale(2);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(0, 0, 0, 0.08);
}





/* ============================
   SCROLL MARGIN – navbar ne takarja el a szekciók tetejét
   ============================ */
section[id] {
  scroll-margin-top: 80px;
}

/* ============================
   SECTION STYLES
   ============================ */
.section-heading {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  color: var(--deep-navy);
  text-align: center;
  margin-bottom: 1.5rem;
}

.section-subheading {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: var(--text-muted);
  text-align: center;
  max-width: 650px;
  margin: 0 auto 4rem;
  line-height: 1.8;
  font-weight: 400;
}

/* CSS specific for Modal */
.modal-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.active .modal-content {
  opacity: 1;
  transform: scale(1);
}

.mobile-menu {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.45s ease,
              opacity 0.35s ease;
  /* Teljesen szilárd háttér – semmi nem üt át alatta */
  background-color: #0F172A;
  /* z-index: a navbar (z-50) alatt, de minden oldaltartalom felett */
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  width: 100%;
  max-width: 100vw;
}

/* ============================
   MENU BACKDROP (BLUR)
   ============================ */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  z-index: 45; /* Navbar (50) alá, de tartalom fölé */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, backdrop-filter 0.4s ease;
}

.menu-backdrop.active {
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Scroll prevention while menu open */
body.menu-open {
  overflow: hidden !important;
}
.mobile-menu.open {
  max-height: 500px;
  padding-top: 0.5rem;
  padding-bottom: 1rem;
  opacity: 1;
  pointer-events: auto;
  /* Erős árnyék, hogy a menü vizuálisan „leválik" az oldaltartalomról */
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.hamburger-line1, .hamburger-line2, .hamburger-line3 {
  transition: all 0.3s ease;
}
.hamburger-open .hamburger-line1 {
  transform: rotate(45deg) translate(5px, 6px);
}
.hamburger-open .hamburger-line2 {
  opacity: 0;
}
.hamburger-open .hamburger-line3 {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Video CSS Hardware Acceleration */
.video-accel {
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
}

/* Image zoom effect for cards */
.gallery-item img, .gallery-item .zoom-bg {
  transition: transform 0.5s ease;
}
.gallery-item:hover img, .gallery-item:hover .zoom-bg {
  transform: scale(1.1);
}

/* ============================
   REALISTIC UNDERWATER BUBBLES
   ============================ */
.bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 
        inset 0 0 5px rgba(255, 255, 255, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: bubble-rise 2s ease-out forwards, bubble-wobble 0.5s ease-in-out infinite alternate;
    z-index: 9999;
}

/* Specific highlight for a glossy look */
.bubble::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 15%;
    width: 25%;
    height: 25%;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    filter: blur(1px);
}

@keyframes bubble-rise {
    0% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(0.5);
    }
    10% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -150px) scale(1.2); /* Rises and expands slightly */
    }
}

@keyframes bubble-wobble {
    0% { border-radius: 50% 45% 50% 45% / 45% 50% 45% 50%; }
    100% { border-radius: 45% 50% 45% 50% / 50% 45% 50% 45%; }
}

/* ============================
   SCROLL PROGRESS BAR
   ============================ */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #0284C7, #00E5FF, #38BDF8);
  z-index: 99999;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.7), 0 0 4px rgba(0, 229, 255, 0.5);
  pointer-events: none;
}

/* ============================
   HERO CAUSTIC DRIFT OVERLAY
   ============================ */
@keyframes caustic-drift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(15,23,42,0.80) 0%,
    rgba(2,132,199,0.18) 35%,
    rgba(0,229,255,0.07) 55%,
    rgba(15,23,42,0.88) 100%
  );
  background-size: 400% 400%;
  animation: caustic-drift 14s ease infinite;
}

/* ============================
   GLASSMORPHISM CARDS
   ============================ */
.glass-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 8px 32px rgba(2, 132, 199, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.glass-card:hover {
  box-shadow:
    0 16px 48px rgba(2, 132, 199, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.glass-card-tinted {
  background: rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(15, 23, 42, 0.15);
  box-shadow:
    0 8px 32px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  transition: all 0.3s ease;
}
.glass-card-tinted:hover {
  background: rgba(15, 23, 42, 0.10);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  transform: translateY(-2px);
}

.glass-card-rep {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 4px 20px rgba(2, 132, 199, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  transition: all 0.3s ease;
}
.glass-card-rep:hover {
  transform: translateY(-6px);
  box-shadow:
    0 14px 44px rgba(2, 132, 199, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* ============================
   ACTIVE NAV INDICATOR
   ============================ */
.nav-link {
  position: relative;
}
.nav-link:hover {
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}
.nav-link.nav-active {
  color: #38BDF8 !important;
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}
.nav-link::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--electric-blue);
  border-radius: 2px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}
.nav-link:hover::before {
  width: 80%;
}
.nav-link.nav-active::before {
  width: 100%;
  background: linear-gradient(90deg, #38BDF8, #00E5FF);
}

/* ============================
   TYPEWRITER CURSOR
   ============================ */
.typing-cursor {
  display: inline-block;
  animation: blink-cursor 0.7s step-end infinite;
  color: #00E5FF;
  font-weight: 200;
  margin-left: 3px;
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ============================
   LOGO INFINITE SCROLL
   ============================ */
.logo-scroll-container {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.logo-track {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  animation: logo-scroll 24s linear infinite;
  width: max-content;
}
.logo-track:hover {
  animation-play-state: paused;
}
@keyframes logo-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.logo-item {
  flex-shrink: 0;
  width: 160px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.logo-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

/* ============================
   REPRESENTATIVE AVATAR
   ============================ */
.rep-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284C7 0%, #00E5FF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: white;
  text-shadow: 0 1px 4px rgba(0,0,0,0.25);
  box-shadow: 0 4px 20px rgba(2,132,199,0.38);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0 auto;
}
.glass-card-rep:hover .rep-avatar {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(0,229,255,0.42);
}

/* ============================
   TAX NUMBER NEON GLOW
   ============================ */
.tax-number-display {
  transition: box-shadow 0.4s ease, border-color 0.4s ease !important;
}
.tax-number-display:hover {
  border-color: rgba(0, 229, 255, 0.55) !important;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.04),
    0 0 22px rgba(0, 229, 255, 0.28),
    0 0 44px rgba(0, 229, 255, 0.1) !important;
}

/* ============================
   CONTACT FORM FOCUS EFFECT
   ============================ */
.contact-input {
  transition: box-shadow 0.3s ease, transform 0.2s ease !important;
}
.contact-input:focus {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 2px rgba(0, 229, 255, 0.35),
    0 8px 24px rgba(0, 229, 255, 0.12) !important;
  outline: none !important;
}

/* ============================
   MOBILNÉZETI FINOMHANGOLÁSOK
   ============================ */

/* Contact szekció: alul extra padding, hogy a back-to-top gomb
   ne takarja el a submit gombot mobilon */
@media (max-width: 767px) {
  #navbar {
    max-width: 100% !important;
  }

  #contact {
    padding-bottom: 5rem;
  }

  /* Representatives: kis mobilon 1 oszlop */
  #representatives .grid {
    grid-template-columns: 1fr;
  }

  /* Adó 1% szekció: a dekoratív 1% felirat ne lógjon ki */
  #ado-1 .absolute > span {
    font-size: clamp(8rem, 28vw, 18rem) !important;
  }
}

/* Nagyon kis képernyő (360px alatt) */
@media (max-width: 360px) {
  .section-heading {
    font-size: 1.7rem;
  }

  /* Adószám display: kisebb font */
  .tax-number-display {
    font-size: 1.3rem !important;
    letter-spacing: 0.05em;
  }
}

/* Scroll-indicator: mobilon (640px alatt) elrejtés */
@media (max-width: 639px) {
  #scroll-indicator {
    display: none !important;
  }
}
