/* Global Styles */
html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  font-family: var(--font-family-main);
  background-color: var(--color-background);
  color: var(--color-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--navbar-height);
}

/* Fixed Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background-color: var(--color-background);
  z-index: 1000;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
}

.navbar .container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  position: relative;
  z-index: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: var(--font-size-5xl);
}

h2 {
  font-size: var(--font-size-4xl);
}

h3 {
  font-size: var(--font-size-3xl);
}

h4 {
  font-size: var(--font-size-2xl);
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--color-text-secondary);
}

.text-highlight {
  color: var(--color-primary);
}

.section {
  min-height: 90vh;
  padding: var(--spacing-4xl) 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  scroll-snap-align: start;
  margin-bottom: var(--spacing-2xl);
}

.section:last-of-type {
  margin-bottom: 0;
}

/* Hero section with navbar offset */
.hero {
  padding-top: calc(var(--spacing-4xl) + var(--navbar-height));
  min-height: calc(100vh - var(--navbar-height));
}

/* Section Content Wrappers */
.section-content-wrapper {
  max-width: 600px;
}

.section-content-right {
  margin-left: auto;
  text-align: right;
}

.section-content-left {
  margin-right: auto;
  text-align: left;
}

/* Background Image Handling - Proportional, Never Cut or Expanded */
.bg-image-container {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--container-width);
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: flex;
  overflow: visible;
}

/* Alignment variations for bg-image-container */
.bg-align-left {
  justify-content: flex-start;
}

.bg-align-right {
  justify-content: flex-end;
}

.bg-align-center {
  justify-content: center;
  align-items: center;
}

.bg-image {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  position: relative;
  flex-shrink: 0;
}

/* About section: respect container and limit image to left half */
#about-reginaldo .bg-image-container {
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--container-width);
  justify-content: flex-end;
  top: var(--spacing-4xl);
  height: auto;
}

#about-reginaldo .bg-image { display: none !important; }

#about-reginaldo .about-photo-wrap {
  float: right;
  width: 50%;
  max-width: 600px;
  margin-left: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
  position: relative;
}

#about-reginaldo .about-photo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to left, transparent 72%, var(--color-background) 100%),
    linear-gradient(to bottom, transparent 68%, var(--color-background) 100%);
}

#about-reginaldo .about-photo {
  display: block;
  width: 100%;
  height: auto;
}

#about-reginaldo .section-content p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}

/* #about-reginaldo .gradient-overlay-left {
  background: linear-gradient(
      to right,
      transparent 0%,
      transparent 62%,
      rgba(15, 15, 15, 0.3) 76%,
      rgba(15, 15, 15, 0.6) 86%,
      rgba(15, 15, 15, 0.9) 94%,
      var(--color-background) 100%
    );
}

#about-reginaldo .gradient-overlay-right {
  background: linear-gradient(
      to right,
      transparent 0%,
      transparent 62%,
      rgba(15, 15, 15, 0.3) 76%,
      rgba(15, 15, 15, 0.6) 86%,
      rgba(15, 15, 15, 0.9) 94%,
      var(--color-background) 100%
    );
} */

/* Gradient Overlays - Multi-directional with extended fade */
.gradient-overlay-left,
.gradient-overlay-right,
.gradient-overlay-bottom,
.gradient-overlay-center {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Left gradient - Image on right, content on left */
.gradient-overlay-left {
  /* Variáveis CSS para customização por section */
  --gradient-start: var(--image-width-offset, 270px);
  --gradient-end: calc(var(--gradient-start) + 400px);
  background: linear-gradient(to right,
      var(--color-background) 0,
      var(--color-background) var(--gradient-start),
      rgba(15, 15, 15, 0.98) calc(var(--gradient-start) + 50px),
      rgba(15, 15, 15, 0.9) calc(var(--gradient-start) + 100px),
      rgba(15, 15, 15, 0.7) calc(var(--gradient-start) + 150px),
      rgba(15, 15, 15, 0.4) calc(var(--gradient-start) + 200px),
      rgba(15, 15, 15, 0.15) calc(var(--gradient-start) + 250px),
      transparent calc(var(--gradient-start) + 300px),
      transparent 100%);
}

/* Right gradient - Image on left, content on right */
.gradient-overlay-right {
  /* Variáveis CSS para customização por section */
  --gradient-start: var(--image-width-offset, 270px);
  --gradient-end: calc(var(--gradient-start) + 400px);
  background: linear-gradient(to left,
      var(--color-background) 0,
      var(--color-background) var(--gradient-start),
      rgba(15, 15, 15, 0.98) calc(var(--gradient-start) + 50px),
      rgba(15, 15, 15, 0.9) calc(var(--gradient-start) + 100px),
      rgba(15, 15, 15, 0.7) calc(var(--gradient-start) + 150px),
      rgba(15, 15, 15, 0.4) calc(var(--gradient-start) + 200px),
      rgba(15, 15, 15, 0.15) calc(var(--gradient-start) + 250px),
      transparent calc(var(--gradient-start) + 300px),
      transparent 100%);
}

/* Bottom gradient - for CTA section */
.gradient-overlay-bottom {
  background: linear-gradient(to top,
      var(--color-background) 0%,
      var(--color-background) 5%,
      rgba(15, 15, 15, 0.9) 15%,
      rgba(15, 15, 15, 0.6) 30%,
      transparent 50%),
    linear-gradient(to bottom,
      var(--color-background) 0%,
      rgba(15, 15, 15, 0.5) 10%,
      transparent 25%),
    linear-gradient(to right,
      var(--color-background) 0%,
      rgba(15, 15, 15, 0.3) 10%,
      transparent 25%),
    linear-gradient(to left,
      var(--color-background) 0%,
      rgba(15, 15, 15, 0.3) 10%,
      transparent 25%);
}

/* Center gradient - for centered images (CTA section) */
.gradient-overlay-center {
  background: radial-gradient(ellipse at center,
      transparent 0%,
      transparent 20%,
      rgba(15, 15, 15, 0.3) 40%,
      rgba(15, 15, 15, 0.7) 60%,
      var(--color-background) 80%),
    linear-gradient(to bottom,
      var(--color-background) 0%,
      rgba(15, 15, 15, 0.7) 8%,
      transparent 20%),
    linear-gradient(to top,
      var(--color-background) 0%,
      rgba(15, 15, 15, 0.7) 8%,
      transparent 20%),
    linear-gradient(to right,
      var(--color-background) 0%,
      rgba(15, 15, 15, 0.5) 5%,
      transparent 15%),
    linear-gradient(to left,
      var(--color-background) 0%,
      rgba(15, 15, 15, 0.5) 5%,
      transparent 15%);
}

/* CTA Content Wrapper with background overlay - aligned to right */
.cta-content-wrapper {
  max-width: 600px;
  margin-left: auto;
  position: relative;
  z-index: 2;
  padding: var(--spacing-2xl);
  text-align: center;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.fade-in {
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

/* Glassmorphism */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Utility Classes */
.skip-link:focus {
  position: static !important;
  left: auto !important;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-md {
  gap: var(--spacing-md);
}

.gap-lg {
  gap: var(--spacing-lg);
}

.text-center {
  text-align: center;
}

.w-full {
  width: 100%;
}

.hidden {
  display: none;
}

.about-subtitle {
  display: block;
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

/* Keyboard Navigation Focus States */
.keyboard-nav :focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.keyboard-nav .btn:focus {
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3);
}

/* ========================================
   Responsive Image Width Offset Adjustments
   Base: 1280px width
   ======================================== */

/* Extra Large Screens - 1920px+ (200% da base) */
@media (min-width: 1920px) {
  #hero {
    --image-width-offset: 1160px;
    /* 580px * 2 */
  }

  #nr-01 {
    --image-width-offset: 1000px;
    /* 500px * 2 */
  }

  #digital-evaluation {
    --image-width-offset: 1000px;
    /* 500px * 2 */
  }

  #be-a-reference {
    --image-width-offset: 1000px;
    /* 500px * 2 */
  }

  #ai-dashboards {
    --image-width-offset: 1260px;
    /* 630px * 2 */
  }

  #cta {
    --image-width-offset: 1200px;
    /* 600px * 2 */
  }
}

/* Large Screens - 1600px to 1919px (160% da base) */
@media (min-width: 1600px) and (max-width: 1919px) {
  #hero {
    --image-width-offset: 928px;
    /* 580px * 1.6 */
  }

  #nr-01 {
    --image-width-offset: 800px;
    /* 500px * 1.6 */
  }

  #digital-evaluation {
    --image-width-offset: 800px;
    /* 500px * 1.6 */
  }

  #be-a-reference {
    --image-width-offset: 800px;
    /* 500px * 1.6 */
  }

  #ai-dashboards {
    --image-width-offset: 1008px;
    /* 630px * 1.6 */
  }

  #cta {
    --image-width-offset: 960px;
    /* 600px * 1.6 */
  }
}

/* Base Reference - 1280px to 1599px (100% - valores inline no HTML) */
/* Valores já definidos inline no HTML para esta resolução */

/* Medium Screens - 1025px to 1279px (80% da base) */
@media (min-width: 1025px) and (max-width: 1279px) {
  #hero {
    --image-width-offset: 464px;
    /* 580px * 0.8 */
  }

  #nr-01 {
    --image-width-offset: 400px;
    /* 500px * 0.8 */
  }

  #digital-evaluation {
    --image-width-offset: 400px;
    /* 500px * 0.8 */
  }

  #be-a-reference {
    --image-width-offset: 400px;
    /* 500px * 0.8 */
  }

  #ai-dashboards {
    --image-width-offset: 504px;
    /* 630px * 0.8 */
  }

  #cta {
    --image-width-offset: 480px;
    /* 600px * 0.8 */
  }
}

/* ========================================
   Mobile Menu & Drawer Styles
   ======================================== */

/* Hide mobile menu by default */
.mobile-menu-btn {
  display: none;
}

.mobile-drawer {
  display: none;
}

/* Mobile Drawer Styles */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.mobile-drawer.active {
  pointer-events: all;
  opacity: 1;
}

.mobile-drawer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.mobile-drawer-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 80%;
  max-width: 300px;
  height: 100%;
  background-color: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateX(-100%);
  transition: transform var(--transition-normal);
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
}

.mobile-drawer.active .mobile-drawer-content {
  transform: translateX(0);
}

.mobile-drawer-close {
  align-self: flex-end;
  background: transparent;
  border: none;
  color: var(--color-text-main);
  font-size: var(--font-size-2xl);
  cursor: pointer;
  padding: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  transition: color var(--transition-fast);
}

.mobile-drawer-close:hover {
  color: var(--color-primary);
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-lg);
  color: var(--color-text-main);
  text-decoration: none;
  font-size: var(--font-size-lg);
  font-weight: 600;
  border-bottom: 1px solid rgba(128, 128, 128, 0.3);
  transition: all var(--transition-fast);
}

.mobile-drawer-link:last-child {
  border-bottom: none;
}

.mobile-drawer-link:hover {
  background-color: rgba(255, 193, 7, 0.1);
  color: var(--color-primary);
  padding-left: calc(var(--spacing-lg) + 8px);
}

.mobile-drawer-link i {
  color: var(--color-primary);
  font-size: var(--font-size-xl);
}

/* ========================================
   Responsive Adjustments
   ======================================== */

/* Large Desktop - 1200px+ */
@media (min-width: 1200px) {
  .navbar .container {
    padding: 0;
  }
}

/* CTA Section - 1030px or less */
@media (max-width: 1030px) {
  .cta-content-wrapper {
    max-width: 90%;
    margin: var(--spacing-md) auto;
    background-color: rgba(15, 15, 15, 0.85);
    padding: var(--spacing-2xl);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

/* Tablet - 1024px or less */
@media (max-width: 1024px) {

  /* Background images expand to fill screen, centered */
  .bg-image-container {
    justify-content: center;
    align-items: center;
  }

  .bg-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
  }

  #about-reginaldo .about-photo-wrap {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 var(--spacing-lg) 0;
  }

  #about-reginaldo .about-photo {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 var(--spacing-lg) 0;
    shape-outside: none;
  }

  /* About section: image becomes full width on tablet/mobile */
  #about-reginaldo .bg-image-container {
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
  }

  /* Remove all directional gradients */
  .gradient-overlay-left,
  .gradient-overlay-right,
  .gradient-overlay-bottom,
  .gradient-overlay-center {
    background: none;
    display: none;
  }

  /* Add spacing between sections */
  .section {
    margin-bottom: 0;
    padding-bottom: 0;
    position: relative;
  }

  /* Create visible gap between sections */
  .section:not(:last-of-type) {
    margin-bottom: 60px;
  }

  /* Add spacing and gradient at top of main (after hero) */
  main {
    position: relative;
    margin-top: 0;
    padding-top: 0;
  }

  main::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to top,
        var(--color-background) 0%,
        rgba(15, 15, 15, 0.9) 25%,
        rgba(15, 15, 15, 0.6) 50%,
        rgba(15, 15, 15, 0.3) 75%,
        transparent 100%);
  }

  /* Add top and bottom gradients to sections inside main */
  .section::before,
  .section::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 1;
    pointer-events: none;
  }

  /* Top gradient - from background to transparent */
  .section::before {
    top: 0;
    background: linear-gradient(to bottom,
        var(--color-background) 0%,
        rgba(15, 15, 15, 0.9) 25%,
        rgba(15, 15, 15, 0.6) 50%,
        rgba(15, 15, 15, 0.3) 75%,
        transparent 100%);
  }

  /* Bottom gradient - from transparent to background */
  .section::after {
    bottom: 0;
    background: linear-gradient(to top,
        var(--color-background) 0%,
        rgba(15, 15, 15, 0.9) 25%,
        rgba(15, 15, 15, 0.6) 50%,
        rgba(15, 15, 15, 0.3) 75%,
        transparent 100%);
  }

  /* Remove bottom gradient from last section */
  .section:last-of-type::after {
    display: none;
  }

  /* Ensure container content is above gradients */
  .section .container {
    position: relative;
    z-index: 2;
  }

  /* Content wrapper with background surface for contrast */
  .section-content-wrapper {
    max-width: 100%;
    margin: 1rem;
    padding: var(--spacing-xl);
    background-color: rgba(15, 15, 15, 0.85);
    border-radius: var(--border-radius-default);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .section-content-right,
  .section-content-left {
    margin: 0;
    text-align: left;
  }

  .section-content-right .icon-list,
  .section-content-left .icon-list {
    text-align: left;
  }
}

/* Mobile - 768px or less */
@media (max-width: 768px) {

  /* Disable scroll snap on mobile for better UX */
  html {
    scroll-snap-type: none;
  }

  h1 {
    font-size: var(--font-size-3xl);
  }

  h2 {
    font-size: var(--font-size-2xl);
  }

  .section {
    padding: var(--spacing-3xl) 0;
    min-height: auto;
    scroll-snap-align: none;
  }

  .hero {
    padding-top: var(--spacing-3xl);
    min-height: auto;
  }

  .flex-col-mobile {
    flex-direction: column;
  }

  /* Navbar mobile adjustments */
  .navbar-actions .btn {
    padding: 8px 16px;
    font-size: var(--font-size-sm);
  }

  .navbar .logo span {
    font-size: var(--font-size-base) !important;
  }

  .navbar .logo img {
    height: 32px !important;
  }

  /* Content wrapper margin adjustments for mobile */
  .section-content-wrapper {
    margin: var(--spacing-md);
    padding: var(--spacing-lg);
    background-color: rgba(15, 15, 15, 0.88);
  }

  .cta-content-wrapper {
    text-align: center;
    margin: var(--spacing-md);
    padding: var(--spacing-lg);
  }

  #about-reginaldo .section-content-wrapper {
    margin-top: 32px;
  }
}

/* Hero Section - 436px or less */
@media (max-width: 436px) {
  .hero .flex {
    flex-direction: column;
  }

  .hero .btn {
    width: 100%;
  }
}

/* Mobile Menu - 440px or less */
@media (max-width: 440px) {
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--font-size-lg);
  }

  .mobile-menu-btn:hover {
    background-color: rgba(255, 193, 7, 0.1);
  }

  .mobile-drawer {
    display: block;
  }

  /* Hide navbar actions on small screens */
  .navbar-actions {
    display: none !important;
  }
}
