/*
  DPA Site – Mobile-friendly Stylesheet

  This stylesheet defines the colour palette, typography and responsive layout
  for the one-page website of DPA.  It follows the official brand colours
  (DPA Amber, Gris Petróleo, Gris Técnico and Negro Técnico) and uses
  flexbox/grid for layouts that adapt gracefully from desktop to mobile.

  The hero section supports a looping video background with a semi-opaque
  overlay to ensure text legibility.  Buttons, cards and metrics animate on
  hover for desktop, and the layout stacks into a single column on narrow
  screens.  Additional media queries adjust typography and layout for
  devices under 768px wide.
*/

/* Reset and base variables */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #FFB300; /* DPA Amber */
  --primary-light: #FFCF66;
  --primary-dark: #CC8F00;
  --dark: #383130;    /* Gris Petróleo */
  --light: #F4F4F4;   /* Gris Técnico */
  --text: #111111;    /* Negro Técnico */
  --white: #ffffff;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', 'Open Sans', sans-serif;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--light);
  line-height: 1.6;
}

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

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

/* Header and navigation */
header {
  background-color: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

/* Logo now uses an image; limit width for consistency */
.logo img {
  width: 150px;
  height: auto;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--dark);
  padding: 0.5rem 0;
  transition: color 0.3s;
}

nav a.active,
nav a:hover {
  color: var(--primary);
}

/* Hero section with video background */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Overlay to improve contrast */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.6));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.4rem;
  margin-bottom: 1rem;
  color: var(--white);
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--white);
}

/* Buttons */
.btn {
  display: inline-block;
  background-color: var(--primary);
  color: var(--text);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-weight: 600;
  transition: background-color 0.3s, transform 0.2s, color 0.3s;
}

.btn:hover {
  background-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
}

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

.btn.secondary:hover {
  background-color: var(--primary-light);
  color: var(--text);
}

/* Sections */
section {
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--dark);
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--dark);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Pillars / Enfoque */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.pillar {
  background-color: var(--white);
  border-top: 4px solid var(--primary);
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}

.pillar:hover {
  transform: translateY(-4px);
}

.pillar h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.pillar p {
  font-size: 0.95rem;
  color: var(--dark);
}

/* Metrics */
.metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* ← CORREGIDO: antes estaba 'justify-center' */
  gap: 1.5rem;
  margin-top: 2rem;
}

.metric {
  background-color: var(--white);
  border-top: 4px solid var(--primary);
  border-radius: 4px;
  flex: 1 1 200px;
  max-width: 240px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.metric h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 0.25rem;
  color: var(--primary);
}

.metric p {
  font-size: 0.9rem;
  color: var(--dark);
}

/* Services */
.services-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 2rem;
}

.service-card {
  background-color: var(--white);
  border-top: 4px solid var(--primary);
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
}

.service-card h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.service-card p {
  font-size: 0.95rem;
  color: var(--dark);
}

/* Two column sections (Security & Digital) */
.two-col {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 2rem;
}

.two-col .col h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.two-col .col ul {
  list-style: none;
  padding-left: 0;
}

.two-col .col li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--dark);
}

.two-col .col li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* Career teaser and contact */
.career-teaser {
  text-align: center;
  margin-top: 3rem;
}

.career-teaser p {
  margin-bottom: 1rem;
}

.contact {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 2rem;
}

.contact-form {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.contact-form label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--dark);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
}

.contact-form button {
  background-color: var(--primary);
  color: var(--text);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s, color 0.3s;
}

.contact-form button:hover {
  background-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
}

/* Footer */
footer {
  background-color: var(--dark);
  color: var(--white);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}

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

.footer-col h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.footer-col ul {
  list-style: none;
  padding-left: 0;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: var(--white);
  transition: color 0.3s;
}

.footer-col ul li a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
}

/* Careers page styles (reused) */
.page-padding {
  padding-top: 6rem;
}

.hero-small {
  height: 40vh;
  position: relative;
  overflow: hidden;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-small::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(to bottom, rgba(3,31,76,0.85), rgba(0,0,0,0.65));
}

.hero-small .hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
}

.bullet-list {
  margin-left: 1rem;
  margin-bottom: 1.5rem;
}

.bullet-list li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.25rem;
}

.bullet-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
}

.career-form {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.career-form .form-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.career-form .form-group {
  display: flex;
  flex-direction: column;
}

.career-form label {
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--dark);
}

.career-form input,
.career-form textarea,
.career-form select {
  padding: 0.5rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.career-form button {
  background-color: var(--primary);
  color: var(--text);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s, color 0.3s;
}

.career-form button:hover {
  background-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  nav ul {
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }
  .hero {
    min-height: 60vh;
  }
  .hero-content h1 {
    font-size: 1.8rem;
  }
  .hero-content p {
    font-size: 0.95rem;
  }
  .services-grid,
  .two-col {
    grid-template-columns: 1fr;
  }
  .metrics {
    flex-direction: column;
    align-items: center;
  }
  /* Aquí se reduce el tamaño del logo en móvil */
  .logo img {
    width: 80px;
  }
}
