/* 
* domain - Financial Audit Services in Spain
* Main Stylesheet
*/

/* ===== VARIABLES ===== */
:root {
  --color-primary: #3e5c76; /* Ultramarine */
  --color-accent: #f2542d; /* Coral */
  --color-text: #ededed; /* Light gray */
  --color-background: #f5f1ea; /* Beige */
  --color-button: #207b7a; /* Jade */
  --transition: all 0.3s ease;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --radius: 8px;
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 40px;
  font-size: 16px;
}

body {
  font-family: "Poppins", Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-primary);
}

section[id] {
  scroll-margin-top: 40px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  background-color: var(--color-button);
  color: var(--color-text);
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  background-color: #186665;
}

.btn-accent {
  background-color: var(--color-accent);
}

.btn-accent:hover {
  background-color: #e04525;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(62, 92, 118, 0.95);
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-text);
  text-transform: lowercase;
}

.logo span {
  color: var(--color-accent);
}

/* Mobile menu using checkbox hack */
.menu-toggle {
  display: none;
}

.menu-btn {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 2;
}

.menu-btn span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--color-text);
  position: absolute;
  transition: var(--transition);
}

.menu-btn span:nth-child(1) {
  top: 0;
}

.menu-btn span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.menu-btn span:nth-child(3) {
  bottom: 0;
}

.menu-toggle:checked ~ .menu-btn span:nth-child(1) {
  transform: rotate(45deg);
  top: 8px;
}

.menu-toggle:checked ~ .menu-btn span:nth-child(2) {
  opacity: 0;
}

.menu-toggle:checked ~ .menu-btn span:nth-child(3) {
  transform: rotate(-45deg);
  bottom: 9px;
}

.nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  gap: 20px;
}

.nav-link {
  font-weight: 600;
  position: relative;
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--color-accent);
  transition: var(--transition);
}

.nav-link:hover::after {
  width: 100%;
}

/* ===== HERO SECTION ===== */
.hero {
  height: 100vh;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  position: relative;
  display: flex;
  align-items: center;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 20px;
  color: var(--color-text);
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: var(--color-text);
}

/* ===== SECTION STYLES ===== */
.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 50px;
  text-align: center;
  position: relative;
  color: var(--color-text);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.2rem;
}

/* ===== ABOUT SECTION ===== */
.about {
  background-color: var(--color-background);
  color: #333;
}
.about h2,
.why-us h2,
.contact h2,
.faq h2 {
  color: var(--color-primary);
}

.about-content {
  display: flex;
  align-items: center;
  gap: 40px;
}

.about-text {
  flex: 1;
}

.about-image {
  flex: 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ===== SERVICES SECTION ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.service-card {
  background-color: var(--color-background);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-10px);
}

.service-card-image {
  height: 200px;
  overflow: hidden;
}

.service-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.service-card:hover .service-card-image img {
  transform: scale(1.05);
}

.service-card-content {
  padding: 20px;
  color: #333;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.service-card-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--color-primary);
}

.service-card-text {
  margin-bottom: 20px;
  flex-grow: 1;
}

/* ===== BENEFITS SECTION ===== */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.benefit-card {
  background-color: var(--color-background);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
  color: #333;
}

.benefit-card:hover {
  transform: translateY(-5px);
}

.benefit-icon {
  font-size: 2.5rem;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.benefit-title {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--color-primary);
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials-slider {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}

.testimonials-slider::-webkit-scrollbar {
  display: none;
}

.testimonial-card {
  min-width: 250px;
  background-color: var(--color-background);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: #333;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 20px;
  position: relative;
}

.testimonial-text::before {
  content: "❝";
  position: absolute;
  top: -10px;
  left: -10px;
  font-size: 2rem;
  color: var(--color-accent);
  opacity: 0.3;
}

.testimonial-author {
  font-weight: 600;
  color: var(--color-primary);
}

/* ===== WHY US SECTION ===== */
.why-us {
  background-color: var(--color-background);
  color: #333;
}

.why-us-content {
  display: flex;
  gap: 40px;
  align-items: center;
}

.why-us-text {
  flex: 1;
}

.why-us-list {
  margin-top: 20px;
}

.why-us-item {
  margin-bottom: 15px;
  position: relative;
  padding-left: 30px;
}

.why-us-item::before {
  content: "✓";
  color: var(--color-accent);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.why-us-image {
  flex: 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ===== CONTACT FORM ===== */
.contact {
  background-color: var(--color-background);
  color: #333;
}

.form-container {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form {
  display: grid;
  gap: 20px;
}

.form-group {
  position: relative;
}

.form-input,
.form-select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  background-color: #fff;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%233E5C76' viewBox='0 0 16 16'%3E%3Cpath d='M8 12L2 6h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
}

.form-select option {
  background-color: var(--color-primary);
  color: var(--color-text);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-checkbox-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 10px;
}

.form-checkbox {
  margin-right: 10px;
  margin-top: 5px;
}

.form-checkbox-label {
  font-size: 0.9rem;
  line-height: 1.4;
}

.form-checkbox-label a {
  color: var(--color-primary);
  text-decoration: underline;
}

.form-checkbox-label a:hover {
  color: var(--color-accent);
}

.form-error {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-top: 5px;
}

/* ===== FAQ SECTION ===== */
.faq {
  background-color: var(--color-background);
  color: #333;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 15px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.faq-question {
  position: relative;
  padding: 15px;
  background-color: var(--color-primary);
  color: var(--color-text);
  font-weight: 600;
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  transition: var(--transition);
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 15px;
  transition: var(--transition);
}

.faq-checkbox {
  position: absolute;
  opacity: 0;
  z-index: -1;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  background-color: #fff;
  transition: var(--transition);
  padding: 0 15px;
}

.faq-checkbox:checked ~ .faq-answer {
  max-height: 500px;
  padding: 15px;
}

.faq-checkbox:checked ~ .faq-question::after {
  content: "−";
}

/* ===== FOOTER ===== */
.footer {
  background-color: #2a3f53;
  color: var(--color-text);
  padding: 50px 0 20px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--color-accent);
}

.footer-link {
  margin-bottom: 10px;
  opacity: 0.8;
  transition: var(--transition);
}

.footer-link:hover {
  opacity: 1;
  color: var(--color-accent);
  transform: translateX(5px);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
}

.footer-contact-icon {
  margin-right: 10px;
  min-width: 20px;
}

.footer-bottom {
  padding-top: 20px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ===== COOKIE POPUP ===== */
.cookie-popup {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-primary);
  color: var(--color-text);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 9999;
  max-width: 400px;
  width: 90%;
  display: none;
}

.cookie-popup.show {
  display: block;
  animation: slideUp 0.5s ease forwards;
}

.cookie-text {
  margin-bottom: 15px;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
}

/* ===== POLICY PAGES ===== */
.policy-container {
  background-color: var(--color-background);
  color: #333;
  border-radius: var(--radius);
  padding: 40px;
  margin: 5rem auto;
  max-width: 800px;
  box-shadow: var(--shadow);
}
.policy-container a {
  word-break: break-word;
  overflow-wrap: break-word;
}

.policy-title {
  font-size: 2rem;
  margin-bottom: 30px;
  color: var(--color-primary);
}

.policy-section {
  margin-bottom: 30px;
}

.policy-section-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--color-primary);
}

/* ===== GRACIAS PAGE ===== */
.thanks-container {
  background-color: var(--color-background);
  color: #333;
  border-radius: var(--radius);
  padding: 40px;
  margin: 5rem auto;
  max-width: 600px;
  box-shadow: var(--shadow);
  text-align: center;
}

.thanks-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--color-primary);
}

.thanks-text {
  margin-bottom: 30px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translate(-50%, 100px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
  .about-content,
  .why-us-content {
    flex-direction: column;
  }

  .testimonial-card {
    width: calc(50% - 20px);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .section {
    padding: 60px 0;
  }

  .menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--color-primary);
    overflow: hidden;
    transition: height 0.3s ease;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  }

  .menu-toggle:checked ~ .nav {
    height: auto;
  }

  .nav-list {
    flex-direction: column;
    padding: 20px;
    gap: 0;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-link::after {
    display: none;
  }

  .testimonial-card {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .policy-container,
  .thanks-container {
    padding: 30px 20px;
  }
}
