@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Roboto:wght@400;900&display=swap");

:root {
  --color-primary: #f19960;
  --color-accent: #fbbc34;
  --color-blue-dark: #1a237e;
  --color-navy: #11182a;
  --color-text: #767676;
  --color-title: #242424;
  --color-white: #ffffff;
  --color-bg-light: #f7f7f7;
  --max-width: 1222px;
  --header-height: 104px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-white);
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.container-wide {
  width: min(100% - 1rem, var(--max-width));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: relative;
  z-index: 20;
  background-color: var(--color-bg-light);
  background-image: url("../images/hero-background.jpg");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  border-bottom: 1px solid rgba(129, 129, 129, 0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-height);
}

.brand img {
  height: 40px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav > a,
.nav-has-submenu > button {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-white);
  letter-spacing: 0.02em;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.site-nav > a:hover,
.site-nav > a[aria-current="page"],
.nav-has-submenu > button:hover {
  color: var(--color-accent);
}

.nav-has-submenu {
  position: relative;
}

.nav-submenu {
  display: none;
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0;
  min-width: 220px;
  padding: 0.75rem 0;
  background: #1f1f1f;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 30;
}

.nav-has-submenu.is-open .nav-submenu,
.nav-has-submenu:hover .nav-submenu {
  display: block;
}

.nav-submenu a {
  display: block;
  padding: 0.55rem 1.25rem;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  color: var(--color-white);
}

.nav-submenu a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-accent);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--color-white);
}

.menu-toggle svg {
  width: 28px;
  height: 28px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1rem 1.75rem;
  border: 2px solid var(--color-white);
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

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

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.92);
}

.btn-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Backgrounds */
.section-bg-fondo1 {
  background-image: url("../images/fondo1.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--color-white);
}

.section-bg-fondo2 {
  background-image: url("../images/fondof2.png");
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
}

.section-bg-fondo3 {
  background-image: url("../images/fondof3.png");
  background-position: bottom center;
  background-repeat: no-repeat;
  background-size: cover;
}

.section-bg-footer {
  background-color: var(--color-bg-light);
  background-image: url("../images/hero-background.jpg");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--color-white);
}

.section-on-dark {
  color: var(--color-white);
}

.section-on-dark h2,
.section-on-dark h3 {
  color: var(--color-white);
}

.section-on-light h2,
.section-on-light h3,
.section-on-light p {
  color: var(--color-navy);
}

/* Hero */
.hero {
  padding: 0 0 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 37% 63%;
  gap: 0;
  align-items: start;
}

.hero-content {
  padding: 2.5rem 0 0 4.5rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 3vw, 30px);
  font-weight: 600;
  line-height: 1.27;
  text-align: center;
}

.hero-lead {
  margin: 0 0 1.5rem;
  font-size: 18px;
  line-height: 1.33;
  text-align: center;
}

.hero-cta {
  text-align: center;
  margin-top: 5.5rem;
}

.hero-image {
  width: 100%;
}

/* Sections */
.section {
  padding: 2.5rem 0;
}

.section-tight-top {
  padding-top: 0;
}

.section-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 2rem;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 35px);
  font-weight: 600;
  line-height: 1.2;
}

.section-header p {
  margin: 0.5rem 0 0;
  font-size: 25px;
  font-weight: 400;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 1rem;
}

.service-card {
  padding: 0 7%;
  text-align: center;
}

.service-card img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  margin: 0 auto 1rem;
}

.service-card h3 {
  margin: 0 0 0.75rem;
  font-size: 25px;
  font-weight: 600;
}

.service-card p {
  margin: 0;
  font-size: 19px;
  line-height: 1.45;
}

/* Sectors */
.sectors-title {
  padding: 1.5rem 0 0.5rem;
}

.sectors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: start;
}

.sector-block {
  padding: 2.5rem 2rem 3rem 4.5rem;
}

.sector-block h3 {
  margin: 0 0 1rem;
  font-size: 25px;
  font-weight: 600;
}

.sector-block p {
  margin: 0 0 1rem;
  font-size: 18px;
  line-height: 1.33;
}

.sector-block p:last-child {
  margin-bottom: 0;
}

.sector-image-offset {
  margin-top: -5rem;
  padding-left: 3rem;
}

/* Expandable audience cards */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.expandable-card {
  max-width: 400px;
  margin: 0 auto;
  border-radius: 20px;
  padding: 20px;
  color: var(--color-white);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.expandable-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.expandable-card--blue {
  background: linear-gradient(135deg, #4a7cb8 0%, #2d5aa0 100%);
}

.expandable-card--green {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.expandable-card--glass {
  background: rgba(255, 255, 255, 0.2);
}

.expandable-card .card-title {
  margin: 0 0 0.75rem;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.expandable-text {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
}

.expandable-text.expanded {
  max-height: 220px;
  opacity: 1;
  padding: 10px 0 20px;
}

.expandable-text p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
}

.expandable-card .card-content img {
  width: 100%;
  border-radius: 15px;
}

.toggle-button {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.toggle-button::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 0 auto;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 12px solid white;
  transition: transform 0.3s ease;
}

.toggle-button.expanded::before {
  transform: rotate(180deg);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* News */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto 2.5rem;
}

.news-card {
  display: flex;
  gap: 1rem;
  padding: 2.5rem 2rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50px 120px 50px 50px;
}

.news-card img {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  object-fit: contain;
}

.news-card h3 {
  margin: 0 0 0.5rem;
  font-size: 18px;
  line-height: 1.28;
}

.news-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.38;
}

/* CTA */
.cta-section {
  padding: 5rem 0 4rem;
}

.cta-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  overflow: visible;
}

.cta-content {
  padding: 2.5rem 2rem 2.5rem 4.5rem;
}

.cta-content h2 {
  margin: 0 0 0.5rem;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
}

.cta-content .cta-sub {
  margin: 0 0 1.5rem;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 25px;
  font-weight: 900;
  line-height: 1.2;
}

.cta-image-wrap {
  margin-top: -3rem;
  margin-left: -1rem;
}

/* Footer */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid rgba(129, 129, 129, 0.2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand img {
  height: 32px;
  width: auto;
  margin-bottom: 1rem;
}

.footer-brand p,
.footer-contact p {
  margin: 0 0 0.75rem;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-white);
}

.footer-contact strong {
  display: block;
  font-size: 15px;
  margin-bottom: 0.25rem;
}

.footer-links-col h4 {
  margin: 0 0 1rem;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-white);
}

.footer-links-col a {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

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

/* Contact page */
.page-hero {
  padding: 3rem 0 2rem;
  background-color: var(--color-bg-light);
  background-image: url("../images/hero-background.jpg");
  background-position: center top;
  background-size: cover;
  text-align: center;
  color: var(--color-white);
}

.page-hero h1 {
  margin: 0 0 0.5rem;
  font-size: 30px;
  font-weight: 600;
}

.page-hero p {
  margin: 0;
  font-size: 18px;
}

.contact-content {
  padding: 3rem 0 4rem;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.contact-content p {
  font-size: 16px;
  color: var(--color-text);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid,
  .sectors-grid,
  .cta-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-content,
  .sector-block,
  .cta-content {
    padding: 1.5rem;
  }

  .hero-cta {
    margin-top: 1.5rem;
  }

  .sector-image-offset {
    margin-top: 0;
    padding-left: 0;
  }

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

  .cta-image-wrap {
    margin: 0;
    padding: 0 1rem 1rem;
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    background: rgba(17, 24, 42, 0.97);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav > a,
  .nav-has-submenu > button {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
  }

  .nav-submenu {
    position: static;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0.5rem 1rem;
  }

  .nav-has-submenu.is-open .nav-submenu {
    display: block;
  }

  .header-inner {
    position: relative;
  }
}
