/* ============================================
   ACERT Consulting — Stylesheet
   Palette: Navy #1e3a5f · Grey #6c757d · White
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  --navy: #1e3a5f;
  --navy-dark: #152c48;
  --navy-light: #2a5080;
  --grey: #6c757d;
  --grey-light: #adb5bd;
  --grey-bg: #f4f6f8;
  --white: #ffffff;
  --accent: #3a8fd4;
  --accent-light: #e8f2fb;
  --gold: #c9a84c;
  --text: #2d3436;
  --text-light: #636e72;
  --shadow-sm: 0 2px 8px rgba(30,58,95,.08);
  --shadow-md: 0 4px 20px rgba(30,58,95,.12);
  --shadow-lg: 0 8px 40px rgba(30,58,95,.16);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--navy); }

h1,h2,h3,h4 { font-family: var(--font-display); color: var(--navy); line-height: 1.25; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Header / Nav --- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(30,58,95,.08);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo img { height: 72px; width: auto; }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-weight: 600;
  font-size: .95rem;
  color: var(--navy);
  letter-spacing: .02em;
  padding: .4rem 0;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
  background: var(--navy);
  color: var(--white) !important;
  padding: .55rem 1.4rem;
  border-radius: var(--radius);
  font-size: .9rem;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--navy-light); color: var(--white) !important; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: var(--transition);
}

/* --- Hero --- */
.hero {
  padding: 140px 0 80px;
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy-dark) 55%, #0f2235 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(58,143,212,.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(201,168,76,.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.hero-tagline {
  display: inline-block;
  background: rgba(58,143,212,.2);
  border: 1px solid rgba(58,143,212,.3);
  padding: .35rem 1rem;
  border-radius: 100px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: rgba(255,255,255,.9);
}
.hero h1 {
  color: var(--white);
  margin-bottom: 1.2rem;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
}
.hero p {
  font-size: 1.15rem;
  line-height: 1.75;
  color: rgba(255,255,255,.8);
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  padding: .75rem 1.8rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: .01em;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: #2e7ec0; color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.4);
}
.btn-outline:hover { border-color: var(--white); color: var(--white); background: rgba(255,255,255,.1); }

.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-light); color: var(--white); transform: translateY(-1px); }

/* --- Sections --- */
section { padding: 80px 0; }

.section-label {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 600px;
  margin-bottom: 3rem;
}

.section-header { margin-bottom: 3rem; }

/* --- Quiénes Somos --- */
.about {
  background: var(--grey-bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1.2rem;
  color: var(--text-light);
  font-size: 1.02rem;
}

.mission-vision {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mv-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--accent);
  transition: box-shadow var(--transition);
}
.mv-card:hover { box-shadow: var(--shadow-md); }
.mv-card h3 { margin-bottom: .75rem; font-size: 1.2rem; }
.mv-card p { color: var(--text-light); font-size: .95rem; }

/* --- Services Grid --- */
.services { background: var(--white); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border: 1px solid rgba(30,58,95,.08);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--navy));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.service-icon {
  width: 52px; height: 52px;
  background: var(--accent-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  color: var(--accent);
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: .6rem;
}
.service-card p {
  color: var(--text-light);
  font-size: .92rem;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.service-link {
  font-weight: 600;
  font-size: .9rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.service-link:hover { gap: .7rem; }
.service-link svg { width: 16px; height: 16px; transition: var(--transition); }

/* --- Contact Section --- */
.contact {
  background: var(--grey-bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info h3 { margin-bottom: 1rem; font-size: 1.3rem; }
.contact-info p { color: var(--text-light); margin-bottom: 2rem; }

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-channel {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid rgba(30,58,95,.06);
  transition: all var(--transition);
  color: var(--text);
}
.contact-channel:hover { box-shadow: var(--shadow-sm); transform: translateX(4px); color: var(--navy); }
.contact-channel svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.contact-channel span { font-weight: 500; font-size: .95rem; }

/* Form */
.contact-form-wrapper {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  color: var(--navy);
  margin-bottom: .4rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid #dfe3e8;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--white);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(58,143,212,.12);
}
.form-group textarea { resize: vertical; min-height: 120px; }

.form-group input.error,
.form-group textarea.error { border-color: #e74c3c; }
.error-msg { font-size: .8rem; color: #e74c3c; margin-top: .3rem; display: none; }

.form-submit { width: 100%; padding: .85rem; font-size: 1rem; margin-top: .5rem; }

.form-status {
  margin-top: 1rem;
  padding: .8rem 1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  display: none;
}
.form-status.success { display: block; background: #d4edda; color: #155724; }
.form-status.error-status { display: block; background: #f8d7da; color: #721c24; }

/* --- Footer --- */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.7);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-logo img { height: 100px; opacity: .85; }

.footer-social {
  display: flex;
  gap: 1rem;
}
.footer-social a {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  transition: all var(--transition);
}
.footer-social a:hover { background: var(--accent); color: var(--white); transform: translateY(-2px); }
.footer-social a svg { width: 18px; height: 18px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 2rem;
  padding-top: 1.5rem;
  text-align: center;
  font-size: .85rem;
}

/* --- Service Detail Pages --- */
.service-hero {
  padding: 130px 0 60px;
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
}
.service-hero h1 { color: var(--white); margin-bottom: .75rem; }
.service-hero p { color: rgba(255,255,255,.75); font-size: 1.1rem; }

.breadcrumb {
  margin-bottom: 1.5rem;
  font-size: .85rem;
  color: rgba(255,255,255,.5);
}
.breadcrumb a { color: rgba(255,255,255,.6); }
.breadcrumb a:hover { color: var(--white); }

.service-detail { padding: 60px 0 80px; }

.service-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
  margin-bottom: 3rem;
}
.service-item {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: 1.2rem 1.4rem;
  background: var(--grey-bg);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  font-size: .95rem;
  color: var(--text);
  transition: all var(--transition);
}
.service-item:hover { background: var(--accent-light); transform: translateX(4px); }
.service-item svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--accent); margin-top: 2px; }

.service-cta-section {
  background: var(--grey-bg);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
}
.service-cta-section h2 { margin-bottom: .75rem; }
.service-cta-section p { color: var(--text-light); margin-bottom: 1.5rem; }

/* --- Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 968px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem 2rem 2rem;
    gap: .5rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    opacity: 0;
    transition: all .35s ease;
    z-index: 999;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
  }
  .nav-links a { padding: .7rem 0; font-size: 1.05rem; }
  .nav-cta { text-align: center; margin-top: .5rem; }

  .hero { padding: 120px 0 60px; }
  .hero h1 { font-size: 2rem; }

  section { padding: 60px 0; }

  .services-grid { grid-template-columns: 1fr; }
  .service-items { grid-template-columns: 1fr; }
}
