/* ============================================
   Portera — Custom Styles
   Modern, polished enhancements
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --portera-primary: #405189;
  --portera-accent: #2ee6d6;
  --portera-accent-blue: #7ec8f0;
  --portera-dark: #0f1724;
  --portera-gradient: linear-gradient(135deg, #2ee6d6 0%, #7ec8f0 50%, #405189 100%);
  --portera-gradient-reverse: linear-gradient(135deg, #405189 0%, #7ec8f0 50%, #2ee6d6 100%);
  --portera-card-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --portera-card-shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.14);
  --portera-transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Smooth Scroll ---------- */
html {
  scroll-behavior: smooth;
}

/* ---------- Global Typography ---------- */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.02em;
}

/* ---------- Navbar Enhancements ---------- */
.navbar-landing {
  transition: var(--portera-transition);
  padding: 16px 0;
  border-bottom: 1px solid transparent;
}

.navbar-landing.is-sticky,
.navbar-landing.navbar-sticky {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 10px 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.navbar-landing .nav-link {
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  padding: 8px 16px !important;
  border-radius: 8px;
  transition: var(--portera-transition);
  position: relative;
}

.navbar-landing .nav-link:hover,
.navbar-landing .nav-link.active {
  color: var(--portera-primary) !important;
  background: rgba(64, 81, 137, 0.06);
}

.navbar-landing .btn-primary {
  border-radius: 50px;
  padding: 8px 24px;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  transition: var(--portera-transition);
  box-shadow: 0 4px 14px rgba(64, 81, 137, 0.3);
}

.navbar-landing .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(64, 81, 137, 0.4);
}

/* ---------- Hero Section ---------- */
.hero-section {
  display: flex;
  align-items: center;
}

.hero-section .display-6 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero-section .lead {
  font-size: 1.15rem;
  line-height: 1.7;
  opacity: 0.9;
}

/* Hero stat boxes */
.hero-section .bg-white.bg-opacity-10 {
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px !important;
  padding: 20px 28px !important;
  transition: var(--portera-transition);
}

.hero-section .bg-white.bg-opacity-10:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  transform: translateY(-2px);
  border-color: rgba(46, 230, 214, 0.3);
}

.hero-section .fs-4.fw-bold {
  font-size: 1.75rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}

/* Hero CTA Buttons */
.hero-section .btn-primary.btn-lg {
  border-radius: 50px;
  padding: 14px 32px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  background: var(--portera-gradient);
  border: none;
  box-shadow: 0 6px 24px rgba(46, 230, 214, 0.3);
  transition: var(--portera-transition);
}

.hero-section .btn-primary.btn-lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(46, 230, 214, 0.4);
}

.hero-section .btn-outline-light.btn-lg {
  border-radius: 50px;
  padding: 14px 32px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.4);
  transition: var(--portera-transition);
}

.hero-section .btn-outline-light.btn-lg:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

/* ---------- Section Styling ---------- */
.section {
  padding: 80px 0;
  position: relative;
}

/* Accent underline for section headings */
.section-heading-accent {
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}

.section-heading-accent::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--portera-gradient);
  border-radius: 2px;
}

/* ---------- Equal Height Cards ---------- */
#philosophy .row.g-4,
#benefits .row.g-4,
#science .row.g-4 {
  display: flex;
  flex-wrap: wrap;
}

#philosophy .row.g-4 > [class*="col-"],
#benefits .row.g-4 > [class*="col-"],
#science .row.g-4 > [class*="col-"] {
  display: flex;
}

#philosophy .d-flex.p-3,
#benefits .d-flex.p-3,
#science .d-flex.p-3 {
  width: 100%;
}

/* ---------- Problem Cards ---------- */
#philosophy .d-flex.p-3 {
  background: #fff;
  border-radius: 16px;
  padding: 24px !important;
  transition: var(--portera-transition);
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

#philosophy .d-flex.p-3:hover {
  transform: translateY(-4px);
  box-shadow: var(--portera-card-shadow-hover);
  border-color: rgba(46, 230, 214, 0.2);
}

#philosophy .avatar-title {
  transition: var(--portera-transition);
}

#philosophy .d-flex.p-3:hover .avatar-title {
  transform: scale(1.1);
}

#philosophy .fs-18 {
  font-weight: 700;
  color: var(--portera-dark);
}

/* ---------- How It Works Cards ---------- */
#how-it-works .row.justify-content-center.mb-5 {
  display: flex;
  flex-wrap: wrap;
}

#how-it-works .row.justify-content-center.mb-5 > [class*="col-"] {
  display: flex;
}

#how-it-works .card {
  border-radius: 20px;
  border-width: 2px;
  overflow: hidden;
  transition: var(--portera-transition);
  box-shadow: var(--portera-card-shadow);
}

#how-it-works .card:hover {
  transform: translateY(-6px);
  box-shadow: var(--portera-card-shadow-hover);
}

#how-it-works .card.border-primary {
  border-color: rgba(64, 81, 137, 0.2) !important;
}

#how-it-works .card.border-primary:hover {
  border-color: var(--portera-primary) !important;
}

#how-it-works .card.border-success {
  border-color: rgba(46, 230, 214, 0.3) !important;
}

#how-it-works .card.border-success:hover {
  border-color: var(--portera-accent) !important;
}

#how-it-works .card-body {
  padding: 32px !important;
}

#how-it-works .avatar-title {
  width: 64px;
  height: 64px;
  font-size: 28px;
}

#how-it-works .avatar-lg {
  width: 64px;
  height: 64px;
}

#how-it-works .list-unstyled li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: var(--portera-transition);
}

#how-it-works .list-unstyled li:last-child {
  border-bottom: none;
}

#how-it-works .list-unstyled li:hover {
  padding-left: 4px;
}

/* ---------- Benefits Section ---------- */
#benefits .d-flex.p-3 {
  background: #fff;
  border-radius: 16px;
  padding: 28px !important;
  transition: var(--portera-transition);
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

#benefits .d-flex.p-3:hover {
  transform: translateY(-4px);
  box-shadow: var(--portera-card-shadow-hover);
  border-color: rgba(46, 230, 214, 0.2);
}

#benefits .d-flex.p-3:hover .avatar-title {
  transform: scale(1.1);
}

#benefits .avatar-title {
  transition: var(--portera-transition);
}

#benefits .fs-18 {
  font-weight: 700;
  color: var(--portera-dark);
}

#benefits .list-unstyled li {
  padding: 6px 0;
  transition: var(--portera-transition);
}

#benefits .list-unstyled li:hover {
  padding-left: 4px;
  color: var(--portera-dark) !important;
}

/* ---------- Technology Section ---------- */
#science .d-flex.p-3 {
  background: #fff;
  border-radius: 16px;
  padding: 24px !important;
  transition: var(--portera-transition);
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  height: 100%;
}

#science .d-flex.p-3:hover {
  transform: translateY(-4px);
  box-shadow: var(--portera-card-shadow-hover);
  border-color: rgba(46, 230, 214, 0.2);
}

#science .d-flex.p-3:hover .avatar-title {
  transform: scale(1.1);
}

#science .avatar-title {
  transition: var(--portera-transition);
}

#science .fs-16 {
  font-weight: 700;
  color: var(--portera-dark);
}

/* ---------- Getting Started Section ---------- */
#getting-started .row.text-center {
  display: flex;
  flex-wrap: wrap;
}

#getting-started .row.text-center > [class*="col-"] {
  display: flex;
}

#getting-started .process-card {
  width: 100%;
  transition: var(--portera-transition);
  padding: 24px 16px;
  border-radius: 16px;
}

#getting-started {
  background: linear-gradient(135deg, var(--portera-primary) 0%, #2c3a6e 50%, #1e2a54 100%) !important;
  overflow: hidden;
}

#getting-started .process-card:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-4px);
}

#getting-started .process-card .avatar-title {
  transition: var(--portera-transition);
}

#getting-started .process-card:hover .avatar-title {
  transform: scale(1.15);
}

#getting-started .bg-white.p-4 {
  border-radius: 20px !important;
  padding: 40px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#getting-started blockquote {
  font-style: italic;
  position: relative;
  padding: 0 20px;
}

#getting-started blockquote::before {
  content: '\201C';
  position: absolute;
  left: -10px;
  top: -15px;
  font-size: 4rem;
  color: rgba(64, 81, 137, 0.15);
  font-family: Georgia, serif;
  line-height: 1;
}

/* ---------- Icon Effects ---------- */
.icon-effect {
  transition: var(--portera-transition);
}

.avatar-title.bg-transparent.text-success {
  color: var(--portera-accent) !important;
}

.ri-check-line.text-success {
  color: var(--portera-accent) !important;
}

/* ---------- Footer Enhancements ---------- */
.custom-footer {
  background: var(--portera-dark) !important;
}

.custom-footer .footer-list li {
  padding: 6px 0;
}

.custom-footer .footer-list a {
  transition: var(--portera-transition);
  position: relative;
}

.custom-footer .footer-list a:hover {
  color: var(--portera-accent) !important;
  padding-left: 6px;
}

.custom-footer h5.text-white {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Back to Top Button ---------- */
#back-to-top {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--portera-gradient) !important;
  border: none !important;
  box-shadow: 0 4px 16px rgba(46, 230, 214, 0.3);
  transition: var(--portera-transition);
}

#back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(46, 230, 214, 0.4);
}

/* ---------- Scroll Animations ---------- */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* ---------- Gradient Text Utility ---------- */
.gradient-text {
  background: var(--portera-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Decorative Blobs ---------- */
.section-decoration {
  position: absolute;
  border-radius: 50%;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

.decoration-1 {
  width: 400px;
  height: 400px;
  background: var(--portera-accent);
  top: -100px;
  right: -100px;
  filter: blur(80px);
}

.decoration-2 {
  width: 300px;
  height: 300px;
  background: var(--portera-primary);
  bottom: -80px;
  left: -80px;
  filter: blur(60px);
}

/* ---------- Contact Page ---------- */
#contact .form-control {
  border-radius: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: var(--portera-transition);
  font-size: 0.95rem;
}

#contact .form-control:focus {
  border-color: var(--portera-accent);
  box-shadow: 0 0 0 3px rgba(46, 230, 214, 0.12);
}

#contact .btn-primary {
  border-radius: 50px;
  padding: 12px 32px;
  font-weight: 600;
  background: var(--portera-gradient);
  border: none;
  box-shadow: 0 4px 16px rgba(46, 230, 214, 0.25);
  transition: var(--portera-transition);
}

#contact .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(46, 230, 214, 0.35);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .hero-section .display-6 {
    font-size: 2.2rem;
  }

  .hero-section .lead {
    font-size: 1rem;
  }

  .section {
    padding: 60px 0;
  }

  .navbar-landing .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 16px;
    margin-top: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
  }
}

@media (max-width: 575.98px) {
  .hero-section .display-6 {
    font-size: 1.75rem;
  }

  .hero-section .bg-white.bg-opacity-10 {
    padding: 14px 18px !important;
  }

  .hero-section .fs-4.fw-bold {
    font-size: 1.4rem !important;
  }

  #getting-started .bg-white.p-4 {
    padding: 24px !important;
  }

  #getting-started blockquote {
    font-size: 1rem !important;
  }
}

/* ---------- Selection Color ---------- */
::selection {
  background: rgba(46, 230, 214, 0.2);
  color: var(--portera-dark);
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: rgba(64, 81, 137, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(64, 81, 137, 0.5);
}
