/* Custom CSS for complex styles that can't be done with Tailwind utilities */

/* About Dropdown Menu */
.dropdown-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #e5e7eb;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.group:hover .dropdown-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0);
}

.dropdown-menu li {
  margin: 0;
  padding: 0;
}

.dropdown-menu li:first-child a {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.dropdown-menu li:last-child a {
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

/* Ensure dropdown arrow icon rotates smoothly */
.group .fa-chevron-down {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

/* Mobile dropdown menu styles */
.mobile-dropdown-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  border-top: 1px solid #e5e7eb;
}

.mobile-dropdown-item.active .mobile-dropdown-menu {
  max-height: 500px;
  opacity: 1;
  visibility: visible;
}

.mobile-dropdown-item.active .fa-chevron-down {
  transform: rotate(180deg);
}

.mobile-dropdown-menu li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-dropdown-menu li:last-child {
  border-bottom: none;
}

/* Mobile dropdown styles for desktop nav on mobile screens */
@media (max-width: 1023px) {
  /* Desktop navigation dropdown - keep hidden on mobile */
  nav.lg\\:flex .dropdown-menu {
    display: none;
  }

  nav.lg\\:flex .group .fa-chevron-down {
    display: none;
  }
}

/* Mobile Menu Toggle Animation */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation Menu */
.top-bar-links {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.top-bar-links.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav-list {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 85%;
  height: 100vh;
  background: #ffffff;
  flex-direction: column;
  gap: 0;
  padding: 80px 0 20px 0;
  margin: 0;
  list-style: none;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.top-bar-links.active .mobile-nav-list {
  transform: translateX(0);
}

.mobile-nav-list li {
  width: 100%;
  border-bottom: 1px solid #f0f0f0;
  margin: 0;
}

.mobile-nav-list li:last-child {
  border-bottom: none;
}

.mobile-nav-list li a {
  display: block;
  padding: 15px 25px;
  font-size: 16px;
  width: 100%;
  color: #1f2b6c;
  font-weight: 500;
  text-decoration: none;
}

.mobile-nav-list li.mobile-auth-buttons {
  padding: 20px 25px;
  border-top: 2px solid #f0f0f0;
  margin-top: 10px;
}

.mobile-nav-list li.mobile-auth-buttons button {
  width: 100%;
}

.mobile-nav-list li.mobile-auth-buttons .btn-register {
  color: #ffffff !important;
}

.mobile-nav-list li.mobile-auth-buttons .btn-download {
  color: #1f2b6c !important;
}

/* Chat widget base */
.bena-chat {
  width: min(90vw, 420px) !important;
  max-width: 420px;
  right: 20px !important;
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
  nav {
    gap: 4px;
  }

  nav ul {
    gap: 4px;
  }

  nav a {
    font-size: 14px;
    padding: 0 8px;
  }

  .btn-register,
  .btn-download {
    padding: 6px 10px;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  /* Hero section mobile adjustments */
  .hero-section {
    min-height: 60vh !important;
    max-height: none !important;
    padding: 40px 0 !important;
  }

  .hero-background {
    height: 100% !important;
  }

  .hero-bg-image {
    object-fit: cover;
    object-position: center;
  }

  .hero-content {
    text-align: center !important;
    width: 100%;
    padding: 0 10px;
  }

  .hero-title {
    font-size: 28px !important;
    line-height: 1.3 !important;
    margin-bottom: 20px !important;
  }

  .hero-title a {
    font-size: 32px !important;
    line-height: 1.3 !important;
  }

  .hero-subtitle {
    font-size: 16px !important;
    line-height: 1.5 !important;
    margin-bottom: 30px !important;
  }

  .hero-button {
    width: auto !important;
    max-width: 100% !important;
    padding: 12px 28px !important;
    font-size: 16px !important;
    height: auto !important;
  }

  .hero-link {
    font-size: 14px !important;
    margin-top: 15px !important;
  }

  .hero-link a {
    font-size: 16px !important;
    line-height: 1.4 !important;
  }

  /* Services grid mobile */
  .services-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* App section mobile */
  .phone {
    width: 100%;
    max-width: 250px;
    height: auto;
    margin: 0 auto;
  }

  /* Chat widget mobile */
  .bena-chat {
    right: 12px !important;
    left: 12px !important;
    bottom: 80px;
    width: auto !important;
    max-width: none;
    height: 65vh;
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  /* Hero section small mobile */
  .hero-section {
    min-height: 50vh !important;
    padding: 30px 0 !important;
  }

  .hero-content {
    padding: 0 5px;
  }

  .hero-title {
    font-size: 22px !important;
    line-height: 1.2 !important;
    margin-bottom: 15px !important;
  }

  .hero-title a {
    font-size: 26px !important;
    line-height: 1.2 !important;
  }

  .hero-subtitle {
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
  }

  .hero-button {
    font-size: 14px !important;
    padding: 10px 24px !important;
    width: auto !important;
    max-width: 100% !important;
  }

  .hero-link {
    font-size: 13px !important;
    margin-top: 12px !important;
  }

  .hero-link a {
    font-size: 14px !important;
  }

  .mobile-nav-list {
    width: 280px;
    max-width: 80%;
    padding: 70px 0 20px 0;
  }

  .mobile-nav-list li a {
    font-size: 15px;
    padding: 12px 20px;
  }

  .mobile-nav-list li.mobile-auth-buttons {
    padding: 15px 20px;
  }

  .btn-register,
  .btn-download {
    padding: 10px 15px;
    font-size: 12px;
  }

  .hamburger-line {
    width: 22px;
    height: 2.5px;
  }

  .services-grid {
    grid-template-columns: 1fr !important;
  }

  .phone {
    max-width: 200px;
  }

  /* How it works section small mobile */
  .how-it-works-section {
    padding: 50px 0 40px 0 !important;
  }

  .how-it-works-content {
    gap: 30px;
    padding: 0 10px;
    max-width: 100% !important;
    box-sizing: border-box;
    width: 100%;
  }

  .how-it-works-image {
    max-width: 100%;
    width: 100%;
  }

  .how-it-works-right {
    padding: 0 !important;
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  .how-it-works-title {
    font-size: 22px !important;
    line-height: 1.3 !important;
    margin-bottom: 15px !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    word-break: break-word;
    max-width: 100% !important;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
  }

  .how-it-works-text {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    word-break: break-word;
    padding: 0;
    max-width: 100% !important;
    width: 100%;
    box-sizing: border-box;
  }

  .how-it-works-button {
    max-width: 100%;
    padding: 12px 24px !important;
    font-size: 14px !important;
    width: auto !important;
  }

  .bena-chat {
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
    max-width: none;
    height: 60vh;
    bottom: 72px;
  }
}

/* Newsletter Form Gradient Border */
.newsletter-form::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(91.28deg, #0f9918 -4.84%, #0066cc 79.51%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  z-index: -1;
}

@media (max-width: 480px) {
  .newsletter-form::before {
    display: none;
  }
}

/* Chat Widget Open State */
.bena-chat.open {
  display: flex;
}

/* Footer Links Bullet Points */
.footer-links-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #131313;
  font-size: 16px;
  line-height: 20px;
}

@media (max-width: 768px) {
  .footer-links-list li::before {
    display: none;
  }
}

/* Responsive adjustments for specific viewport sizes - removed as background is now in hero section */

/* Ripple Animation */
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Intersection Observer Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Service Card Hover Enhancement (for JS interactions) */
.service-card {
  transition: transform 0.3s ease;
}

/* News Card Hover Enhancement (for JS interactions) */
.news-card {
  transition: transform 0.3s ease;
}

/* Phone Mockup 3D Transform (for JS interactions) */
.phone {
  transition: transform 0.3s ease;
}

/* Button Ripple Effect Container */
.btn-primary,
.btn-view-more,
.btn-login,
.btn-register {
  position: relative;
  overflow: hidden;
}

/* Image fade-in animation */
img {
  transition: opacity 0.3s ease;
}

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* How it works section - Desktop adjustments */
.how-it-works-section {
  position: relative;
}

.how-it-works-img {
  max-width: 100%;
  width: 100%;
  height: auto;
}

@media (min-width: 1025px) {
  .how-it-works-content {
    grid-template-columns: 1fr 1.8fr !important;
    max-width: 1200px !important;
  }

  .how-it-works-img {
    max-width: 100%;
    width: 100%;
  }

  .how-it-works-left {
    width: 100%;
  }

  .how-it-works-image {
    width: 100%;
  }

  .how-it-works-text {
    margin-bottom: 30px !important;
  }

  .how-it-works-right {
    max-width: 100% !important;
  }
}

/* How it works section responsive adjustments */
@media (max-width: 1024px) {
  .how-it-works-section {
    height: auto !important;
    min-height: auto !important;
    overflow: visible;
  }

  .how-it-works-content {
    grid-template-columns: 1fr 1.6fr !important;
    gap: 40px;
    max-height: none;
    max-width: 100%;
    margin: 40px auto;
    padding: 0 20px;
  }

  .how-it-works-img {
    max-width: 100%;
    width: 100%;
  }

  .how-it-works-right {
    padding-left: 40px;
    max-width: 100%;
    margin-top: 0;
  }

  .how-it-works-text {
    margin-bottom: 25px !important;
  }
}

@media (max-width: 768px) {
  .how-it-works-section {
    margin-top: 0;
    padding: 60px 0 50px 0;
    height: auto !important;
    min-height: auto !important;
  }

  .how-it-works-content {
    grid-template-columns: 1fr !important;
    gap: 35px;
    max-height: none;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 15px;
    box-sizing: border-box;
    width: 100%;
  }

  .how-it-works-left {
    order: 1;
    max-height: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .how-it-works-image {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
  }

  .how-it-works-img {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 10px;
  }

  .how-it-works-right {
    order: 2;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 0;
    max-width: 100% !important;
    width: 100% !important;
    text-align: center;
    align-self: auto;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }

  .how-it-works-title {
    text-align: center;
    font-size: 28px !important;
    line-height: 1.3 !important;
    margin-bottom: 20px !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    word-break: break-word;
    max-width: 100% !important;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .how-it-works-text {
    text-align: center;
    font-size: 16px !important;
    line-height: 1.6 !important;
    margin-bottom: 25px !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    word-break: break-word;
    padding: 0;
    max-width: 100% !important;
    width: 100%;
    box-sizing: border-box;
  }

  .how-it-works-button {
    margin: 0 auto;
    display: block;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0;
    padding: 12px 24px !important;
    font-size: 16px !important;
    height: auto !important;
    box-sizing: border-box;
  }

  .how-it-works-background {
    display: none;
  }
}

/* App section responsive */
@media (max-width: 768px) {
  .app-content {
    grid-template-columns: 1fr !important;
    gap: 30px;
    max-height: none;
    padding: 0 15px;
  }

  .app-left {
    order: 2;
    text-align: center;
  }

  .app-right {
    order: 1;
    display: flex;
    justify-content: center;
    margin-left: 0;
  }

  .phone-mockups {
    justify-content: center;
  }
}

/* Vector decorations - hide on mobile */
@media (max-width: 768px) {
  .vector-9,
  .vector-7 {
    display: none !important;
  }
}

/* News section responsive */
@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
    margin-bottom: 30px;
    padding: 0 15px;
  }

  .news-card p br {
    display: none;
  }

  .news-ellipse {
    display: block;
    height: 120px;
    width: auto;
    max-width: 250px;
    opacity: 0.4;
  }
}

/* Newsletter responsive */
@media (max-width: 768px) {
  .newsletter-content {
    flex-direction: column;
    gap: 30px;
    padding: 0 15px;
    margin-left: 0;
    margin-right: 0;
  }

  .newsletter-left {
    text-align: center;
    width: 100%;
  }

  .newsletter-content .section-title {
    text-align: center;
  }

  .newsletter-content .section-subtitle {
    text-align: center;
  }

  .newsletter-content .section-subtitle br {
    display: none;
  }

  .newsletter-right {
    width: 100%;
  }

  .newsletter-form {
    flex-direction: row;
    width: 100%;
    max-width: 100%;
    padding: 6px 6px 6px 12px;
  }
}

@media (max-width: 480px) {
  .newsletter-form {
    flex-direction: column;
    gap: 10px;
    padding: 0;
    border: none;
    background: transparent;
  }

  .newsletter-form .fa-envelope {
    display: none;
  }

  .newsletter-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    border: 1px solid #0f9918;
    border-radius: 99px;
    background: white;
  }

  .btn-subscribe {
    width: 100%;
    padding: 12px 20px;
    font-size: 13px;
    border-radius: 99px;
  }

  .newsletter-mask {
    display: block;
    height: 100px;
    width: auto;
    max-width: 200px;
    left: -30px;
    top: auto;
    bottom: -80px;
    opacity: 0.3;
  }
}

/* Footer responsive */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr !important;
    gap: 35px;
    text-align: center;
    padding: 50px 15px 40px;
    max-width: 100%;
  }

  .footer-column-company {
    align-items: center;
  }

  .footer-logo {
    justify-content: center;
  }

  .footer-logo img {
    width: 100px;
  }

  .company-description {
    text-align: center;
    max-width: 100%;
  }

  .app-store-badges {
    justify-content: center;
  }

  .footer-column {
    text-align: center;
  }

  .footer-links-list {
    align-items: center;
  }

  .footer-links-list li {
    text-align: center;
    margin-bottom: 10px;
    padding-left: 0;
  }

  .contact-info {
    align-items: center;
    gap: 15px;
  }

  .contact-item {
    text-align: center;
  }

  .social-intro {
    text-align: center;
  }

  .social-links-list {
    align-items: center;
  }

  .social-links-list li {
    justify-content: center;
  }

  .footer-bottom-content {
    flex-direction: column;
    gap: 15px;
    text-align: center;
    padding: 0 15px;
  }

  .powered-by {
    justify-content: center;
    gap: 10px;
    font-size: 14px;
  }

  .blue-noble-logo {
    justify-content: center;
  }
}

/* Ask Bena Button responsive */
@media (max-width: 768px) {
  .ask-bena-button {
    bottom: 15px;
    right: 15px;
    padding: 10px 16px;
    border-radius: 20px;
    gap: 6px;
    font-size: 12px;
  }

  .ask-bena-button img {
    width: 18px;
    height: 18px;
  }

  .ask-bena-button span {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .ask-bena-button {
    bottom: 12px;
    right: 12px;
    padding: 8px 12px;
    border-radius: 18px;
    gap: 4px;
    font-size: 11px;
  }

  .ask-bena-button img {
    width: 16px;
    height: 16px;
  }

  .ask-bena-button span {
    font-size: 11px;
  }
}
