/* CSS Custom Properties */
:root {
  /* Serasa Brand Colors */
  --primary-color: #3368AC;
  --primary-dark: #2857B2;
  --primary-darker: #004390;
  --secondary-color: #FF6B35;
  --accent-color: #00C4B4;
  
  /* Neutral Colors */
  --white: #FFFFFF;
  --light-gray: #F8F9FA;
  --gray: #E9ECEF;
  --dark-gray: #6C757D;
  --darker-gray: #495057;
  --black: #212529;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --h1-size: clamp(2.5rem, 4vw, 3.5rem);
  --h2-size: clamp(2rem, 3.5vw, 2.75rem);
  --h3-size: clamp(1.5rem, 2.5vw, 2rem);
  --h4-size: 1.25rem;
  --normal-size: 1rem;
  --small-size: 0.875rem;
  --smaller-size: 0.75rem;
  
  /* Spacing */
  --header-height: 4rem;
  --container-padding: 1rem;
  --section-padding: 5rem 0;
  --border-radius: 0.5rem;
  --border-radius-lg: 1rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.1);
  
  /* Transitions */
  --transition: all 0.3s ease;
  --transition-fast: all 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--normal-size);
  line-height: 1.6;
  color: var(--black);
  background-color: var(--white);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: var(--h1-size); }
h2 { font-size: var(--h2-size); }
h3 { font-size: var(--h3-size); }
h4 { font-size: var(--h4-size); }

p {
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  font-size: var(--normal-size);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn--primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn--outline:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn--full {
  width: 100%;
  justify-content: center;
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  color: var(--primary-darker);
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--dark-gray);
  max-width: 600px;
  margin: 0 auto;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--white);
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: var(--transition);
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo-img {
  height: 4rem;
}

.nav__list {
  display: flex;
  gap: 2rem;
}

.nav__link {
  color: var(--black);
  font-weight: 500;
  position: relative;
}

.nav__link:hover {
  color: var(--primary-color);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__login-btn {
  font-size: var(--small-size);
  padding: 0.5rem 1rem;
}

.nav__toggle,
.nav__close {
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}

/* Hero Section */
.hero {
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 5rem;
  background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero__title {
  color: var(--primary-darker);
  margin-bottom: 1.5rem;
}

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

.hero__description {
  color: var(--dark-gray);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

.hero__buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__img {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

/* Services Section */
.services {
  padding: var(--section-padding);
  background-color: var(--white);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  border: 1px solid var(--gray);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.service-card--featured {
  border: 2px solid var(--primary-color);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
}

.service-card__badge {
  position: absolute;
  top: -10px;
  right: 1rem;
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: var(--small-size);
  font-weight: 600;
}

.service-card__icon {
  width: 4rem;
  height: 4rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
  background-color: var(--light-gray);
}

.service-card--featured .service-card__icon {
  background-color: rgba(255, 255, 255, 0.2);
}

.service-card__icon img {
  width: 2rem;
  height: 2rem;
}

.service-card__title {
  margin-bottom: 1rem;
}

.service-card--featured .service-card__title {
  color: var(--white);
}

.service-card__description {
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.service-card__features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.service-card__features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-card__features i {
  color: var(--accent-color);
  font-size: var(--small-size);
}

.service-card--featured .service-card__features i {
  color: var(--white);
}

/* About Section */
.about {
  padding: var(--section-padding);
  background-color: var(--light-gray);
}

.about__title {
  color: var(--primary-darker);
  text-align: center;
  margin-bottom: 1.5rem;
}

.about__description {
  text-align: center;
  color: var(--dark-gray);
  font-size: 1.125rem;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.stat {
  text-align: center;
  padding: 1.5rem;
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
}

.stat__number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat__label {
  color: var(--dark-gray);
  font-weight: 500;
}

.about__benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.benefit {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
}

.benefit__icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.benefit__title {
  color: var(--primary-darker);
  margin-bottom: 0.5rem;
}

.benefit__text {
  color: var(--dark-gray);
  margin: 0;
}

/* Contact Section */
.contact {
  padding: var(--section-padding);
  background-color: var(--white);
}

.contact__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

.contact__info-title {
  color: var(--primary-darker);
  margin-bottom: 2rem;
}

.contact__item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact__icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact__item h4 {
  color: var(--primary-darker);
  margin-bottom: 0.25rem;
}

.contact__item p {
  color: var(--dark-gray);
  margin: 0;
}

/* Forms */
.contact__form {
  background-color: var(--light-gray);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary-darker);
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray);
  border-radius: var(--border-radius);
  font-size: var(--normal-size);
  transition: var(--transition);
  background-color: var(--white);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(51, 104, 172, 0.1);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.form-checkbox input[type="checkbox"] {
  margin-top: 0.25rem;
  accent-color: var(--primary-color);
}

.form-checkbox label {
  font-size: var(--small-size);
  color: var(--dark-gray);
}

.link {
  color: var(--primary-color);
  text-decoration: underline;
}

.link:hover {
  color: var(--primary-dark);
}

.form-message {
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  font-weight: 500;
}

.form-message--success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message--error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.form-message--info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Footer */
.footer {
  background-color: var(--primary-darker);
  color: var(--white);
  padding: 3rem 0 1rem;
}

.footer__content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer__logo-img {
  height: 2.5rem;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
}

.footer__description {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
}

.footer__social {
  display: flex;
  gap: 1rem;
}

.footer__social-link {
  width: 2.5rem;
  height: 2.5rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.footer__social-link:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
}

.footer__title {
  margin-bottom: 1rem;
  color: var(--white);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__link {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.footer__link:hover {
  color: var(--white);
  padding-left: 0.5rem;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__copyright {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.footer__legal {
  display: flex;
  gap: 1.5rem;
}

.footer__legal-link {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--small-size);
  transition: var(--transition);
}

.footer__legal-link:hover {
  color: var(--white);
}

/* Login Modal */
.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: none;
}

.login-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.login-modal__content {
  position: relative;
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem 1rem;
  border-bottom: 1px solid var(--gray);
}

.login-modal__title {
  color: var(--primary-darker);
  margin: 0;
  font-size: var(--h4-size);
}

.login-modal__close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--dark-gray);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
}

.login-modal__close:hover {
  background-color: var(--gray);
  color: var(--primary-color);
}

.login-form {
  padding: 1rem 2rem 2rem;
}

.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--dark-gray);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1rem;
  transition: var(--transition);
}

.password-toggle:hover {
  color: var(--primary-color);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

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

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 1rem;
  margin: -0.5rem 0 0 -0.5rem;
  border: 2px solid transparent;
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media screen and (max-width: 968px) {
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background-color: var(--white);
    padding: 6rem 2rem 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 1001;
  }

  .nav__menu.show-menu {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    gap: 1.5rem;
  }

  .nav__close,
  .nav__toggle {
    display: block;
  }

  .nav__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
  }

  .nav__login-btn {
    display: none;
  }

  .hero__container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero__buttons {
    justify-content: center;
  }

  .contact__content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .about__stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  :root {
    --section-padding: 3rem 0;
    --container-padding: 1rem;
  }

  .hero__buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 300px;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  .about__stats {
    grid-template-columns: 1fr;
  }

  .about__benefits {
    grid-template-columns: 1fr;
  }

  .footer__content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media screen and (max-width: 480px) {
  .nav__menu {
    width: 100%;
  }

  .hero {
    padding-top: calc(var(--header-height) + 1rem);
    padding-bottom: 3rem;
  }

  .service-card,
  .benefit,
  .contact__form {
    padding: 1.5rem;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
  }

  .login-modal__content {
    width: 95%;
    margin: 1rem;
  }

  .login-modal__header {
    padding: 1rem 1.5rem 0.75rem;
  }

  .login-form {
    padding: 0.75rem 1.5rem 1.5rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
.nav__link:focus,
.btn:focus,
.form-input:focus,
.footer__link:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .header,
  .nav__toggle,
  .back-to-top {
    display: none !important;
  }

  .hero {
    padding-top: 0;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
  }

  .section-title,
  .hero__title {
    break-after: avoid;
  }

  .g-recaptcha {
    transform: scale(0.8);
    transform-origin: 0 0;
    height: auto;
    text-align: right;
    margin-top: 3%;
    margin-bottom: auto;
    margin-right: 0%;
}
}
