/* 
   Domain - Accounting Services in Spain
   Main Stylesheet - Minimalist Design
*/

/* Color Palette */
:root {
  --primary: #212529;     /* Deep charcoal */
  --secondary: #f8f9fa;   /* Off white */
  --accent: #4263eb;      /* Modern blue */
  --text-dark: #343a40;   /* Dark gray for text */
  --text-light: #f8f9fa;  /* Light color for text on dark bg */
  --border: #dee2e6;      /* Light gray border */
  --success: #40c057;     /* Green */
  --warning: #fd7e14;     /* Orange */
  --error: #fa5252;       /* Red */
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
}

/* Reset and Base Styles */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 10px = 1rem */
  scroll-behavior: smooth;
  scroll-padding-top: 8rem;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1.6rem;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--secondary);
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  font-weight: 400;
  position: relative;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  margin-bottom: 2.4rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
}

h1 {
  font-size: 4.2rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 3.2rem;
  letter-spacing: -0.01em;
  position: relative;
  margin-bottom: 4rem;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1.2rem;
  width: 6rem;
  height: 0.4rem;
  background-color: var(--accent);
  border-radius: 0.2rem;
}

h3 {
  font-size: 2.4rem;
}

h4 {
  font-size: 2rem;
}

p {
  margin-bottom: 2.4rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
}

a:hover {
  color: var(--primary);
}

/* Container and Layout */
.container {
  width: 100%;
  max-width: 120rem;
  margin: 0 auto;
  padding: 0 2.4rem;
  overflow-x: hidden;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -1.2rem;
  justify-content: center;
}

/* Grid System */
[class*="col-"] {
  padding: 0 1.2rem;
}

.col-1 { width: 8.33%; }
.col-2 { width: 16.66%; }
.col-3 { width: 25%; }
.col-4 { width: 33.33%; }
.col-5 { width: 41.66%; }
.col-6 { width: 50%; }
.col-7 { width: 58.33%; }
.col-8 { width: 66.66%; }
.col-9 { width: 75%; }
.col-10 { width: 83.33%; }
.col-11 { width: 91.66%; }
.col-12 { width: 100%; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 1.2rem 2.4rem;
  background-color: var(--accent);
  color: var(--text-light);
  border: none;
  border-radius: 0.4rem;
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 4px rgba(66, 99, 235, 0.2);
}

.btn:hover {
  background-color: #3b5bdb; /* Darker blue */
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(66, 99, 235, 0.3);
}

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

.btn-outline:hover {
  background-color: var(--accent);
  color: var(--text-light);
}

.btn-secondary {
  background-color: var(--gray-200);
  color: var(--text-dark);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background-color: var(--gray-300);
  color: var(--text-dark);
}

/* Header */
header {
  background-color: var(--secondary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 2rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

header.scrolled {
  padding: 1.2rem 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--accent);
}

/* Navigation */
nav ul {
  display: flex;
  list-style: none;
  gap: 3.2rem;
}

nav ul li a {
  color: var(--gray-700);
  font-weight: 500;
  position: relative;
  font-size: 1.6rem;
  padding-bottom: 0.4rem;
}

nav ul li a:hover {
  color: var(--accent);
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -0.2rem;
  left: 0;
  width: 0;
  height: 0.2rem;
  background: var(--accent);
  transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
}

/* Hero Section */
.hero {
  padding: 16rem 0 12rem;
  background-color: var(--secondary);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero h1 {
  margin-bottom: 2.4rem;
  color: var(--primary);
  max-width: 80rem;
  text-align: center;
}

.hero p {
  font-size: 1.8rem;
  margin-bottom: 3.2rem;
  max-width: 60rem;
  text-align: center;
  color: var(--gray-700);
}

.hero .btn {
  margin-top: 1.6rem;
}

/* Section Styling */
section {
  padding: 5rem 0;
}

section:nth-child(even) {
  background-color: var(--gray-100);
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
}

.section-title h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 1.6rem;
}

.section-title h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.section-title p {
  color: var(--gray-600);
  font-size: 1.8rem;
}

/* Card Styling */
.card {
  background: #fff;
  border-radius: 0.8rem;
  padding: 3.2rem;
  margin-bottom: 3.2rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-color: var(--gray-300);
}

.card-icon {
  font-size: 3.2rem;
  color: var(--accent);
  margin-bottom: 2.4rem;
}

.card h3 {
  margin-bottom: 1.6rem;
}

/* About Section */
.about {
  overflow-x: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  border-radius: 0.8rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  object-fit: cover;
  max-height: 350px;
}

.about-image {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Keep text and image aligned horizontally even on smaller screens */
.about .row {
  display: flex;
  flex-wrap: nowrap;
}

@media (max-width: 768px) {
  .about .row {
    flex-direction: row;
  }
  
  .about .col-md-6 {
    width: 50%;
    flex: 0 0 50%;
  }

  .about-image img {
    max-height: 250px;
  }
}

@media (max-width: 576px) {
  .about .row {
    flex-direction: column !important;
    flex-wrap: wrap;
  }
  
  .about .col-md-6 {
    width: 100% !important;
    flex: 0 0 100% !important;
  }

  .about .col-md-6:first-child {
    order: 1;
  }

  .about .col-md-6:last-child {
    order: 2;
    margin-top: 2.4rem;
  }

  .about-image img {
    max-height: 200px;
    width: 100%;
  }
}

/* Services Section */
.service-card {
  text-align: center;
  padding: 3.2rem;
  height: 100%;
}

.services .row {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 2.4rem;
}

.services .col-md-4 {
  width: 30rem;
  margin: 0;
  flex: none;
}

/* Testimonials */
.testimonials .row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 2rem;
}

.testimonials .col-md-4 {
  width: 31%;
  flex: none;
  min-width: 280px;
}

.testimonial {
  text-align: center;
  padding: 2.4rem;
}

.testimonial-content {
  position: relative;
  padding: 3.2rem;
  background: #fff;
  border-radius: 0.8rem;
  margin-bottom: 4.8rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--gray-200);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.testimonial-content::after {
  content: '';
  position: absolute;
  bottom: -2rem;
  left: 50%;
  transform: translateX(-50%);
  border: 1rem solid transparent;
  border-top-color: #fff;
}

.client-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.client-info img {
  width: 6.4rem;
  height: 6.4rem;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.6rem;
  border: 2px solid var(--accent);
}

.client-info strong {
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.client-info span {
  color: var(--gray-600);
  font-size: 1.4rem;
}

/* Benefits Section */
.benefits .row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 1.6rem;
}

.benefits .col-md-3 {
  width: 25rem;
  flex: none;
  margin-bottom: 3rem;
}

/* News Cards */
.news .row {
  display: flex;
  justify-content: center;
  gap: 2.4rem;
  flex-wrap: nowrap;
}

.news .col-md-4 {
  width: 30rem;
  margin: 0;
  flex: none;
}

.news .card {
  width: 30rem;
  height: auto;
}

.news .card img {
  width: 100%;
  height: 20rem;
  object-fit: cover;
  border-radius: 0.4rem;
  margin-bottom: 2.4rem;
}

.news .card h3 {
  font-size: 2rem;
  margin-bottom: 1.6rem;
}

.news .card p {
  color: var(--gray-700);
  margin-bottom: 2.4rem;
}

/* Form Styling */
.form-container {
  max-width: 60rem;
  margin: 0 auto;
  border: 1px solid var(--gray-300);
  border-radius: 0.8rem;
  padding: 4rem;
  background-color: #fff;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

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

label {
  display: block;
  margin-bottom: 0.8rem;
  font-weight: 500;
  color: var(--gray-800);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 1.2rem 1.6rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.4rem;
  background-color: #fff;
  color: var(--text-dark);
  font-size: 1.6rem;
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(66, 99, 235, 0.1);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-5.5-5.5h11z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.6rem center;
  padding-right: 4rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

select option {
  background-color: #fff;
  color: var(--text-dark);
}

textarea {
  resize: vertical;
  min-height: 12rem;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.6rem;
}

.checkbox-group input[type="checkbox"] {
  margin-right: 1rem;
  margin-top: 0.4rem;
  width: 1.8rem;
  height: 1.8rem;
  accent-color: var(--accent);
}

.form-group button[type="submit"] {
  width: 100%;
}

/* FAQ Section */
.faq .col-12 {
  max-width: 80rem;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 1.6rem;
  border-radius: 0.8rem;
  overflow: hidden;
  width: 100%;
  background-color: #fff;
  border: 1px solid var(--gray-200);
}

.faq-question {
  background-color: #fff;
  padding: 2rem 2.4rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  border-radius: 0.8rem;
  display: block;
  color: var(--primary);
  text-decoration: none;
  border-left: 3px solid var(--accent);
  transition: all 0.3s ease;
}

.faq-question:hover {
  background-color: var(--gray-100);
  color: var(--accent);
  text-decoration: none;
}

.faq-question:after {
  content: '+';
  position: absolute;
  right: 2.4rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.4rem;
  transition: all 0.3s ease;
  color: var(--gray-500);
}

.faq-answer {
  background-color: #fff;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-answer-content {
  padding: 0 2.4rem;
  color: var(--gray-700);
}

.faq-item:target .faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.faq-item:target .faq-question:after {
  content: '−';
  color: var(--accent);
}

.faq-item:target .faq-answer {
  padding: 2rem 0;
  max-height: 100rem;
}

/* Footer */
footer {
  background-color: var(--primary);
  padding: 8rem 0 4rem;
  color: var(--text-light);
}

.footer-logo {
  margin-bottom: 2.4rem;
}

.footer-logo a {
  color: #fff;
  font-size: 2.4rem;
  font-weight: 700;
}

.footer-logo a span {
  color: var(--accent);
}

.footer-column {
  width: 25%;
  padding: 0 1.2rem;
}

.footer-nav {
  margin-bottom: 3.2rem;
}

.footer-nav h4 {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 2.4rem;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.footer-nav ul li a {
  color: var(--gray-400);
  font-size: 1.5rem;
}

.footer-nav ul li a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 3.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  width: 100%;
  color: var(--gray-500);
  font-size: 1.4rem;
}

/* Contact info */
.contact-info {
  margin-bottom: 3.2rem;
}

.contact-info-item {
  display: flex;
  margin-bottom: 1.6rem;
  align-items: flex-start;
  color: var(--gray-400);
}

.contact-icon {
  margin-right: 1.6rem;
  font-size: 1.8rem;
  color: var(--accent);
}

.contact-info-item p {
  margin-bottom: 0;
}

/* Cookie Consent */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--gray-900);
  padding: 2.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 9999;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
}

.cookie-text {
  margin-right: 2.4rem;
  margin-bottom: 0;
  color: var(--gray-300);
}

.cookie-text a {
  color: var(--accent);
}

.cookie-buttons {
  display: flex;
  gap: 1.2rem;
}

.cookie-btn {
  padding: 0.8rem 1.6rem;
  white-space: nowrap;
}

/* Map */
.map-container {
  border-radius: 0.8rem;
  overflow: hidden;
  height: 40rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Policy Pages */
.policy-container {
  background-color: #fff;
  border-radius: 0.8rem;
  padding: 4.8rem;
  margin: 12rem auto 6.4rem;
  max-width: 90rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.policy-container h1 {
  text-align: center;
  margin-bottom: 3.2rem;
}

.policy-container h2 {
  margin-top: 4rem;
  font-size: 2.4rem;
}

.policy-container ul, 
.policy-container ol {
  margin-left: 2rem;
  margin-bottom: 2.4rem;
  color: var(--gray-700);
}

.thank-you .policy-container {
  text-align: center;
}

/* Mobile Menu */
.mobile-menu-wrapper {
  display: none;
}

/* Utilities */
.text-center {
  text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.8rem; }
.mt-2 { margin-top: 1.6rem; }
.mt-3 { margin-top: 2.4rem; }
.mt-4 { margin-top: 3.2rem; }
.mt-5 { margin-top: 4.8rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.8rem; }
.mb-2 { margin-bottom: 1.6rem; }
.mb-3 { margin-bottom: 2.4rem; }
.mb-4 { margin-bottom: 3.2rem; }
.mb-5 { margin-bottom: 4.8rem; }

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Design */
@media (max-width: 992px) {
  html {
    font-size: 56.25%; /* 9px = 1rem */
  }

  .services .row,
  .news .row {
    flex-wrap: wrap;
  }

  .services .col-md-4,
  .news .col-md-4 {
    width: calc(50% - 2.4rem);
    margin-bottom: 2.4rem;
  }

  .services .card,
  .news .card {
    width: 100%;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 50%; /* 8px = 1rem */
  }
  
  .testimonials .row {
    flex-wrap: wrap;
  }
  
  .testimonials .col-md-4 {
    width: 100%;
    margin-bottom: 3.2rem;
  }
  
  .testimonial-content {
    padding: 2.4rem;
    max-width: 100%;
  }
  
  .testimonial-content p {
    font-size: 1.4rem;
  }

  nav ul {
    display: none;
  }

  .mobile-menu-wrapper {
    display: block;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.8rem;
    height: 4.8rem;
    cursor: pointer;
    z-index: 1001;
    position: relative;
  }

  .menu-toggle span,
  .menu-toggle span::before,
  .menu-toggle span::after {
    display: block;
    width: 2.4rem;
    height: 0.2rem;
    background-color: var(--primary);
    position: absolute;
    transition: all 0.3s ease;
  }

  .menu-toggle span {
    top: 50%;
    transform: translateY(-50%);
  }

  .menu-toggle span::before {
    content: '';
    top: -0.8rem;
  }

  .menu-toggle span::after {
    content: '';
    bottom: -0.8rem;
  }

  .mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: #fff;
    padding: 10rem 3.2rem 3.2rem;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  }

  .mobile-menu ul {
    list-style: none;
  }

  .mobile-menu ul li {
    margin-bottom: 2.4rem;
  }

  .mobile-menu ul li a {
    color: var(--text-dark);
    font-size: 1.8rem;
    font-weight: 600;
    display: block;
    padding: 0.8rem 0;
  }

  .mobile-menu.active {
    right: 0;
  }

  .hero {
    padding: 14rem 0 10rem;
  }

  .hero h1 {
    font-size: 3.6rem;
  }

  .footer-column {
    width: 50%;
    margin-bottom: 3.2rem;
  }

  .cookie-consent {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-text {
    margin-right: 0;
    margin-bottom: 2.4rem;
  }
}

@media (max-width: 576px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
  }
  
  .testimonial {
    padding: 1.6rem;
  }
  
  .testimonial-content {
    padding: 1.6rem;
  }
  
  .testimonial-content p {
    font-size: 1.3rem;
    line-height: 1.5;
  }

  .container {
    padding: 0 1.6rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .row {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }

  section {
    padding: 4rem 0;
  }
  
  p {
    font-size: 1.5rem;
  }

  h1 {
    font-size: 3.2rem;
  }

  h2 {
    font-size: 2.8rem;
  }

  .hero {
    padding: 12rem 0 8rem;
  }

  .hero-content {
    padding: 0 1.6rem;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero p {
    font-size: 1.6rem;
  }

  .services .col-md-4,
  .news .col-md-4 {
    width: 100%;
  }

  .form-container {
    padding: 3.2rem 2.4rem;
  }

  .policy-container {
    padding: 3.2rem 2.4rem;
  }

  .footer-column {
    width: 100%;
  }
}