:root {
  --color-primary: #9D174D;
  --color-accent: #E53207;
  --color-secondary-accent: #BB222A;
  --color-background: #F8F8FB;
  --color-text: #222222;
  --color-light-text: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* HEADER */
header {
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo-container {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-left: -1cm;
}

.header-logo {
  height: 91px;
  width: auto;
  vertical-align: middle;
}

nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* BUTTONS */
.btn-principal,
.btn-secundario {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
  text-align: center;
  border: none;
  cursor: pointer;
}

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

.btn-principal:hover {
  background-color: #f7552a;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(229, 50, 7, 0.4);
}

.btn-secundario {
  background-color: var(--color-secondary-accent);
  color: var(--color-light-text);
}

.btn-secundario:hover {
  background-color: #8f1f25;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(187, 34, 42, 0.4);
}

/* HERO SECTION */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-image: url('../img/oficinareal.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--color-light-text);
  padding: 6rem 2rem;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.15),
      rgba(255, 255, 255, 0.05)
    ),
    linear-gradient(
      140deg,
      rgba(157, 23, 77, 0.55),
      rgba(187, 34, 42, 0.4),
      rgba(0, 0, 0, 0.25)
    );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 2.5rem;
  opacity: 0.95;
}

/* SERVICES SECTION */
.services {
  padding: 5rem 2rem;
  background-color: var(--color-background);
}

.services h2 {
  text-align: center;
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 3rem;
  font-weight: 700;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.service-item {
  background-color: var(--color-light-text);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  border-top: 4px solid var(--color-accent);
}

.service-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.service-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  display: block;
}

.service-item h3 {
  color: var(--color-primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.service-item p {
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.6;
}

/* WHY CHOOSE SECTION */
.why-choose {
  padding: 5rem 2rem;
  background-color: var(--color-light-text);
}

.why-choose h2 {
  text-align: center;
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 3rem;
  font-weight: 700;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.why-item {
  text-align: center;
  padding: 2rem;
}

.why-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: block;
}

.why-item h3 {
  color: var(--color-primary);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.why-item p {
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.6;
}

/* PARTNERS SECTION */
.partners {
  padding: 4rem 2rem;
  background-color: var(--color-background);
}

.partners h2 {
  text-align: center;
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 3rem;
  font-weight: 700;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.partner-item {
  background-color: var(--color-light-text);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* CTA SECTION */
.cta-section {
  padding: 5rem 2rem;
  background-color: var(--color-secondary-accent);
  color: var(--color-light-text);
  text-align: center;
}

.cta-section h2 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.cta-section p {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  opacity: 0.95;
}

/* CONTACT SECTION */
.contact {
  padding: 4rem 2rem;
  background-color: var(--color-light-text);
}

.contact h2 {
  text-align: center;
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 3rem;
  font-weight: 700;
}

.contact-info {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}

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

.contact-item strong {
  display: block;
  color: var(--color-primary);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.contact-item a {
  color: var(--color-accent);
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.2s;
}

.contact-item a:hover {
  color: var(--color-secondary-accent);
  text-decoration: underline;
}

/* FOOTER */
footer {
  background-color: #1a1a1a;
  color: var(--color-light-text);
  padding: 3rem 2rem 1.5rem;
}

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

.footer-logo-img {
  height: 60px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-section h4,
.footer-social h4 {
  color: var(--color-light-text);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-section a {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: var(--color-accent);
}

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

.social-links a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s;
}

.social-links a:hover {
  color: var(--color-light-text);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    padding: 1rem;
  }

  .logo-container {
    margin-left: 0;
    margin-bottom: 1rem;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .btn-secundario {
    margin-left: 0;
  }

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

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

  .services-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }

  .contact-info {
    flex-direction: column;
    gap: 2rem;
  }

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