/* 
* braxolentyvia - Stylesheet
* Современный адаптивный дизайн для сайта auditoría financiera
*/

/* === Variables === */
:root {
  --color-dark: #092532;
  --color-accent: #FF835C;
  --color-light: #F2F4F8;
  --color-mint: #15C3B5;
  --color-yellow: #FFE06D;
  --font-main: 'Inter', sans-serif;
  --transition: 0.3s ease;
  --border-radius: 8px;
  --box-shadow: 0 5px 20px rgba(9, 37, 50, 0.1);
}

/* === Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  font-family: var(--font-main);
  font-weight: 300;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  position: relative;
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: var(--color-accent);
  transition: var(--transition);
}

a:hover {
  color: var(--color-mint);
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--color-dark);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-mint));
}

.gradient-text {
  background: linear-gradient(90deg, var(--color-accent), var(--color-mint));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* === Layout === */
.section {
  padding: 80px 0;
}

.section-alt {
  background-color: var(--color-light);
}

/* === Animations === */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fade-up 0.6s ease forwards;
}

/* Add animation delays for cascade effect */
.fade-up:nth-child(1) { animation-delay: 0.1s; }
.fade-up:nth-child(2) { animation-delay: 0.2s; }
.fade-up:nth-child(3) { animation-delay: 0.3s; }
.fade-up:nth-child(4) { animation-delay: 0.4s; }
.fade-up:nth-child(5) { animation-delay: 0.5s; }
.fade-up:nth-child(6) { animation-delay: 0.6s; }

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 12px 30px;
  font-weight: 500;
  text-align: center;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: var(--color-accent);
  color: white;
}

.btn-primary:hover {
  background-color: #e87651;
  color: white;
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
}

.btn-outline:hover {
  background-color: var(--color-accent);
  color: white;
}

.btn-gradient {
  background: linear-gradient(90deg, var(--color-accent), var(--color-mint));
  color: white;
  border: none;
}

.btn-gradient:hover {
  transform: scale(1.05);
  color: white;
}

/* === Cookie Banner === */
.cookie-banner {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  background-color: white;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 15px 0;
  transition: bottom 0.5s ease;
}

.cookie-banner.show {
  bottom: 0;
}

.cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.cookie-content p {
  margin: 0 20px;
  font-size: 0.9rem;
}

.cookie-icon {
  flex-shrink: 0;
}

/* === Header === */
.site-header {
  background-color: var(--color-dark);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo h1 {
  font-size: 1.8rem;
  margin: 0;
  background: linear-gradient(90deg, var(--color-accent), var(--color-mint));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.main-nav ul {
  display: flex;
}

.main-nav ul li {
  margin-left: 30px;
}

.main-nav ul li a {
  color: white;
  font-weight: 500;
  position: relative;
}

.main-nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--color-mint);
  transition: var(--transition);
}

.main-nav ul li a:hover::after {
  width: 100%;
}

.nav-cta {
  padding: 8px 20px;
  background-color: var(--color-accent);
  border-radius: var(--border-radius);
}

.nav-cta:hover {
  background-color: var(--color-mint);
}

.nav-cta::after {
  display: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: white;
  margin: 5px 0;
  transition: var(--transition);
}

.menu-toggle-form {
  display: none;
}

/* === Hero Section === */
.hero-section {
  background-image: url('./img/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: calc(100vh - 80px);
  min-height: 500px;
  color: white;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: 80px;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(9, 37, 50, 0.7);
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-section h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: white;
}

.hero-subtitle {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 2rem;
}

/* === About Section === */
.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.about-text {
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.advantage-item {
  text-align: center;
  padding: 30px 20px;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.advantage-item:hover {
  transform: translateY(-10px);
}

.advantage-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-light);
  border-radius: 50%;
}

.advantage-icon img {
  width: 30px;
  height: 30px;
}

/* === Services Section === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 100%;
  max-width: 100%;
}

.service-card {
  background-color: white;
  padding: 40px 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
  transition: var(--transition);
  width: 100%;
  box-sizing: border-box;
}

.service-card:hover {
  transform: translateY(-10px);
}

.service-image {
  width: 100%;
  height: 200px;
  margin: 0 auto 25px;
  overflow: hidden;
  border-radius: var(--border-radius);
}

.service-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .service-img {
  transform: scale(1.05);
}

.service-card p {
  margin-bottom: 25px;
}

/* === Process Section === */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.process-step {
  text-align: center;
  position: relative;
}

.process-step::after {
  content: '';
  position: absolute;
  top: 40px;
  right: -15px;
  width: 30px;
  height: 2px;
  background-color: var(--color-yellow);
}

.process-step:last-child::after {
  display: none;
}

.step-number {
  width: 30px;
  height: 30px;
  background-color: var(--color-accent);
  color: white;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.step-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  border-radius: 50%;
  box-shadow: var(--box-shadow);
}

.step-icon img {
  width: 35px;
  height: 35px;
}

/* === Benefits Section === */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.benefit-item {
  background-color: white;
  padding: 25px 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
  transition: var(--transition);
}

.benefit-item:hover {
  transform: translateY(-5px);
}

.benefit-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-light);
  border-radius: 50%;
}

.benefit-icon img {
  width: 30px;
  height: 30px;
}

/* === Testimonials Section === */
.testimonials-carousel {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.testimonials-container {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 30px;
  padding: 20px 0;
  /* Hide scrollbar */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
  width: 100%;
  box-sizing: border-box;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.testimonials-container::-webkit-scrollbar {
  display: none;
}

.testimonial-item {
  flex: 0 0 100%;
  scroll-snap-align: start;
  padding: 0 10px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0; /* Важно для предотвращения переполнения flexbox */
}

.testimonial-content {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 40px;
  box-shadow: var(--box-shadow);
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.testimonial-quote {
  position: absolute;
  top: 20px;
  left: 20px;
}

.testimonial-content p {
  font-style: italic;
  margin: 30px 0 25px;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.author-avatar {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  margin-right: 15px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-accent);
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-info h4 {
  margin: 0;
  font-size: 1.1rem;
}

.author-info p {
  margin: 0;
  font-style: normal;
  font-size: 0.9rem;
  color: #777;
}

.testimonial-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.testimonial-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ddd;
  cursor: pointer;
  transition: var(--transition);
}

.testimonial-dot:hover,
.testimonial-dot.active {
  background-color: var(--color-accent);
}

/* === FAQ Section === */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.faq-item {
  margin-bottom: 15px;
  border-radius: var(--border-radius);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.faq-toggle {
  display: none;
}

.faq-question {
  display: block;
  padding: 20px;
  background-color: white;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 20px;
  font-size: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-accent);
  transition: var(--transition);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  background-color: white;
  transition: max-height 0.3s ease;
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
}

.faq-answer p {
  padding: 20px;
  margin: 0;
}

.faq-toggle:checked + .faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.faq-toggle:checked + .faq-question::after {
  content: '−';
}

.faq-toggle:checked ~ .faq-answer {
  max-height: 500px;
}

/* === Form Section === */
.form-container {
  max-width: 600px;
  margin: 0 auto;
  background-color: white;
  border-radius: var(--border-radius);
  padding: 40px;
  box-shadow: var(--box-shadow);
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.contact-form input,
.contact-form select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-family: var(--font-main);
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--color-mint);
  box-shadow: 0 0 0 3px rgba(21, 195, 181, 0.2);
}

.form-checkboxes {
  margin-bottom: 25px;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  margin-bottom: 10px;
}

.form-checkbox input {
  width: auto;
  margin-right: 10px;
  margin-top: 5px;
}

.form-checkbox label {
  font-weight: 300;
  font-size: 0.9rem;
}

.contact-form button {
  width: 100%;
  font-size: 1.1rem;
  padding: 15px;
}

/* === Footer === */
.site-footer {
  background-color: var(--color-dark);
  color: white;
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  margin-bottom: 40px;
  width: 100%;
  box-sizing: border-box;
}

.footer-logo h2 {
  font-size: 1.8rem;
  color: white;
  margin-bottom: 15px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-mint));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-logo p {
  font-size: 0.9rem;
  opacity: 0.8;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.footer-column h3 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-column h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--color-mint);
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column a {
  color: #eee;
  transition: var(--transition);
}

.footer-column a:hover {
  color: var(--color-mint);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* === Policy Pages === */
.policy-wrap {
  max-width: 800px;
  margin: 40px auto;
  padding: 40px;
  background-color: white;
  border: 2px dashed var(--color-mint);
  border-radius: var(--border-radius);
  width: 100%;
  box-sizing: border-box;
}

.policy-wrap h2 {
  margin-top: 2rem;
}

.policy-wrap h3 {
  margin-top: 1.5rem;
}

.policy-wrap ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 1.5rem;
}

/* === Responsive Design === */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 30px;
  }
  
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .process-step:nth-child(2)::after {
    display: none;
  }
  
  /* Улучшение отображения карточек услуг на планшетах */
  .service-card {
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0 30px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.7rem;
  }
  
  .advantages-grid,
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .services-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 25px;
  }
  
  .service-card {
    max-width: 100%;
    margin: 0 auto;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .menu-toggle-form {
    display: block;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .main-nav {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 70%;
    height: calc(100vh - 80px);
    background-color: var(--color-dark);
    transition: var(--transition);
    padding: 20px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  }
  
  .main-nav.menu-open {
    right: 0;
  }
  
  .main-nav ul {
    flex-direction: column;
  }
  
  .main-nav ul li {
    margin: 0 0 20px 0;
  }
  
  .main-nav ul li:last-child {
    margin-bottom: 0;
  }
  
  .main-nav ul li a {
    display: block;
    padding: 10px 0;
    font-size: 1.1rem;
  }
  
  .nav-cta {
    text-align: center;
    margin-top: 10px;
  }
  
  .form-container {
    padding: 30px 20px;
  }
  
  .hero-section {
    padding-top: 40px;
    margin-top: 70px;
    height: calc(100vh - 70px);
  }
  
  /* Улучшение отображения для контактной формы */
  .form-container {
    margin-top: 20px;
  }
  
  /* Улучшение отображения для FAQ */
  .faq-question {
    padding: 15px;
    font-size: 0.95rem;
  }
  
  .faq-answer p {
    padding: 15px;
    font-size: 0.9rem;
  }
  
  /* Улучшение для секции testimonials */
  .testimonial-content {
    padding: 30px 20px;
  }
  
  /* Компактнее шапку для мобильной версии */
  .header-content {
    height: 70px;
  }
  
  .logo h1 {
    font-size: 1.6rem;
  }
}
}

@media (max-width: 576px) {
  .section {
    padding: 40px 0 20px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .container {
    padding: 0 10px;
    overflow-x: hidden;
  }
  
  /* Улучшаем отображение карточек услуг на маленьких экранах */
  .service-card {
    padding: 30px 15px;
    max-width: 100%;
  }
  
  .service-image {
    height: 180px;
  }
  
  /* Фиксим отступы в отзывах */
  .testimonial-content {
    padding: 30px 15px;
  }
  
  .testimonial-quote {
    position: relative;
    top: 0;
    left: 0;
    margin-bottom: 10px;
  }
  
  /* Предотвращаем горизонтальный скролл в мобильных */
  .testimonials-carousel,
  .testimonials-container,
  .testimonial-item {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Лучше адаптируем форму */
  .form-container {
    padding: 25px 15px;
    margin: 0 5px;
    width: calc(100% - 10px);
  }
  
  .hero-section {
    min-height: 400px;
    height: calc(100vh - 70px);
  }
  
  .services-grid,
  .process-steps,
  .advantages-grid,
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .service-card {
    padding: 30px 20px;
  }
  
  .service-image {
    height: 160px;
  }
  
  .process-step::after {
    display: none;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
  }
  
  .testimonial-content {
    padding: 25px 15px;
  }
  
  /* Улучшения для мобильной навигации */
  .main-nav {
    width: 80%;
  }
  
  .hero-section h1 {
    font-size: 1.8rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  /* Более компактные кнопки для мобильной версии */
  .btn {
    padding: 10px 20px;
  }
  
  /* Компактнее секцию преимуществ */
  .advantage-item,
  .benefit-item {
    padding: 20px 15px;
  }
  
  .advantage-icon,
  .benefit-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
  }
  
  /* Улучшение формы на мобильных */
  .form-checkboxes {
    margin-bottom: 20px;
  }
  
  .form-checkbox label {
    font-size: 0.8rem;
  }
  
  /* Уменьшить отступы в footer */
  .site-footer {
    padding: 40px 0 20px;
  }
  
  .footer-column h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
  }
  
  .footer-column ul li {
    margin-bottom: 8px;
    font-size: 0.9rem;
  }
}

/* Apply animations to sections */
.section > .container > * {
  opacity: 0;
  animation: fade-up 0.6s ease forwards;
  animation-delay: 0.1s;
}

.section > .container > :nth-child(2) {
  animation-delay: 0.2s;
}

.section > .container > :nth-child(3) {
  animation-delay: 0.3s;
}

/* JS Fallback for sections visibility */
.section > .container > * {
  opacity: 1;
}

/* Fix mobile scroll issues */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
  }
  
  .section {
    scroll-margin-top: 70px; /* Для правильного позиционирования якорей с учетом фиксированной шапки */
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Предотвращаем выход элементов за границы экрана */
  .container {
    max-width: 100%;
    width: 100%;
    padding: 0 15px;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  
  /* Исправляем отображение изображений */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Запрещаем длинному тексту выходить за границы */
  p, h1, h2, h3, h4, h5, h6, span, div {
    overflow-wrap: break-word;
    word-wrap: break-word;
    -ms-word-break: break-all;
    word-break: break-word;
    -ms-hyphens: auto;
    -moz-hyphens: auto;
    -webkit-hyphens: auto;
    hyphens: auto;
  }
  
  /* Фиксируем ширину таблиц */
  table {
    width: 100% !important;
    max-width: 100%;
    display: block;
    overflow-x: auto;
  }
}