/* style.css - Customs Legal Website Styles */

/* Custom smooth scroll + additional fixes */
html {
  scroll-behavior: smooth;
}

/* Ensure anchor links offset for sections */
section[id] {
  scroll-margin-top: 30px;
}

/* Burger menu styles */
.burger-menu {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  background: #1a365d;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.burger-menu:hover {
  background: #d4af37;
  transform: scale(1.02);
}

.burger-menu:hover .burger-line {
  background-color: #1a365d;
}

.burger-line {
  width: 24px;
  height: 2px;
  background-color: #d4af37;
  margin: 5px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.burger-menu.active .burger-line:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
  background-color: #fff;
}

.burger-menu.active .burger-line:nth-child(2) {
  opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
  transform: rotate(-45deg) translate(9px, -10px);
  background-color: #fff;
}

/* Sidebar navigation overlay */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  visibility: hidden;
  transition:
    visibility 0.3s,
    background-color 0.3s;
  z-index: 998;
}

.nav-overlay.active {
  visibility: visible;
  background-color: rgba(0, 0, 0, 0.6);
}

.side-nav {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background: linear-gradient(145deg, #0f2a44 0%, #1a365d 100%);
  z-index: 999;
  transition: left 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.3);
  padding-top: 90px;
  padding-left: 24px;
  padding-right: 20px;
  border-right: 2px solid #d4af37;
}

.side-nav.open {
  left: 0;
}

.side-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-nav li {
  margin-bottom: 28px;
  opacity: 0;
  transform: translateX(-20px);
  transition:
    opacity 0.25s ease,
    transform 0.3s ease;
}

.side-nav.open li {
  opacity: 1;
  transform: translateX(0);
}

.side-nav.open li:nth-child(1) {
  transition-delay: 0.05s;
}
.side-nav.open li:nth-child(2) {
  transition-delay: 0.1s;
}
.side-nav.open li:nth-child(3) {
  transition-delay: 0.15s;
}
.side-nav.open li:nth-child(4) {
  transition-delay: 0.2s;
}
.side-nav.open li:nth-child(5) {
  transition-delay: 0.25s;
}
.side-nav.open li:nth-child(6) {
  transition-delay: 0.3s;
}

.side-nav a {
  color: #f5f0e6;
  text-decoration: none;
  font-size: 1.35rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  transition: all 0.2s;
  letter-spacing: 0.5px;
  font-family: "Cinzel", serif;
}

.side-nav a i {
  width: 28px;
  font-size: 1.4rem;
  color: #d4af37;
}

.side-nav a:hover {
  background: rgba(212, 175, 55, 0.2);
  transform: translateX(6px);
  color: #d4af37;
}

/* Close button inside nav */
.nav-close {
  position: absolute;
  top: 24px;
  right: 20px;
  color: #d4af37;
  font-size: 28px;
  cursor: pointer;
  transition: 0.2s;
}

.nav-close:hover {
  transform: rotate(90deg);
  color: white;
}

/* Adjust main content: no extra shift, burger on top left works fine */
body {
  overflow-x: hidden;
}

/* Small responsive for burger on very tiny screens */
@media (max-width: 480px) {
  .burger-menu {
    top: 12px;
    left: 12px;
    width: 42px;
    height: 42px;
  }

  .side-nav {
    width: 260px;
  }
}

/* Ensure no content overlaps under burger */
.hero-section {
  position: relative;
}

/* Additional custom styles for better visual appeal */

/* Text justification for better readability */
.text-justify {
  text-align: justify;
}

/* Custom transitions for cards */
.hover\:shadow-lg:hover {
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Ensure images are responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Custom scrollbar for sidebar (optional) */
.side-nav::-webkit-scrollbar {
  width: 4px;
}

.side-nav::-webkit-scrollbar-track {
  background: #0f2a44;
}

.side-nav::-webkit-scrollbar-thumb {
  background: #d4af37;
  border-radius: 4px;
}

/* Smooth hover effects for contact links */
a.text-gray-600:hover {
  color: #d4af37 !important;
  transition: color 0.3s ease;
}

/* Button-like appearance for interactive elements */
.burger-menu,
.nav-close {
  cursor: pointer;
  user-select: none;
}

/* Prevent body scroll when menu is open (handled by JS, but added as backup) */
body.menu-open {
  overflow: hidden;
}

/* Ensure gradient text works in all browsers */
.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
}

/* Additional responsive adjustments */
@media (max-width: 768px) {
  section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  h2.text-3xl {
    font-size: 1.75rem;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Ensure footer custom element doesn't break layout */
custom-footer {
  display: block;
}

/* Fix for iOS tap highlight */
.burger-menu,
.side-nav a,
.nav-close {
  -webkit-tap-highlight-color: transparent;
}

/* Animation for content fade-in (optional) */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply fade-in animation to sections (subtle) */
section {
  animation: fadeInUp 0.6s ease-out;
}

/* But keep hero section without animation to avoid flash */
#hero-top {
  animation: none;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #1a365d 0%, #0f2a44 100%);
  color: #d4af37;
  border: 2px solid #d4af37;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 997;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: #d4af37;
  color: #1a365d;
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.scroll-to-top:active {
  transform: translateY(0);
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }
}
