/* =========================================================
   AUSTROPIG — Estilos principales
   Centro de Capacitación y Consultoría en Porcicultura
   ========================================================= */

:root {
  --ink: #12261f;
  --ink-soft: #3d5249;
  --paper: #f3f7f4;
  --paper-deep: #e4eee8;
  --primary: #0b4d3c;
  --primary-deep: #073528;
  --primary-bright: #147a5c;
  --accent: #d4a017;
  --accent-deep: #a67c0d;
  --line: rgba(18, 38, 31, 0.12);
  --white: #ffffff;
  --danger: #b42318;
  --ok: #067647;
  --shadow: 0 18px 50px rgba(7, 53, 40, 0.12);
  --radius: 4px;
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --container: 1160px;
  --header-offset: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 90% -10%, rgba(212, 160, 23, 0.12), transparent 55%),
    linear-gradient(180deg, #eef5f1 0%, var(--paper) 28%, #f7faf8 100%);
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-bright);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.65em;
  color: var(--ink);
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--primary);
  color: var(--white);
  padding: 0.6rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn--sm {
  padding: 0.55rem 0.95rem;
  font-size: 0.82rem;
}

.btn--primary {
  background: var(--primary);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--primary-bright);
  color: var(--white);
}

.btn--accent {
  background: var(--accent);
  color: var(--ink);
}

.btn--accent:hover {
  background: #e0b12a;
  color: var(--ink);
}

.btn--outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn--outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.btn--light {
  background: var(--white);
  color: var(--primary-deep);
}

.link-quiet {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
}

.link-quiet:hover {
  color: var(--white);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 0 0 0.75rem;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-bar {
  background: var(--primary-deep);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.86rem;
}

.header-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 40px;
  padding-block: 0.35rem;
}

.header-bar__tag {
  margin: 0;
  opacity: 0.9;
}

.header-bar__actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.navbar {
  background: rgb(255, 255, 225544);
  border-bottom: 1px solid var(--line);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 88px;
  padding-block: 0.45rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary);
  text-decoration: none;
}

.brand:hover {
  color: var(--primary);
}

.brand__logo {
  display: block;
  height: 86px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  background: #fff;
}

.brand__logo--footer {
  height: 150px;
  max-width: 220px;
  padding: 0.65rem;
  border-radius: 6px;
}

.brand__logo--admin {
  height: 92px;
  max-width: 180px;
  width: 100%;
  margin: 0 auto 1.1rem;
  padding: 0.4rem;
  border-radius: 6px;
}

.brand--admin {
  display: block;
  margin-bottom: 0.5rem;
}

.brand__logo--login {
  height: 140px;
  width: auto;
  margin: 0 auto 1rem;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand__text strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.brand__text small {
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.brand--footer .brand__text strong {
  color: var(--white);
}

.brand--footer .brand__text small {
  color: rgba(255, 255, 255, 0.7);
  max-width: 28ch;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.2rem 1.1rem;
}

.nav-list a {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.nav-list a:hover,
.nav-list a.is-active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

.nav-cta {
  display: flex;
  gap: 0.5rem;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  position: relative;
  transition: 0.2s ease;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  /* Personaliza la imagen de portada reemplazando images/hero-farm.svg. */
  background:
    linear-gradient(115deg, rgba(7, 53, 40, 0.92) 8%, rgba(7, 53, 40, 0.55) 48%, rgba(11, 77, 60, 0.35) 100%),
    radial-gradient(circle at 70% 40%, rgba(212, 160, 23, 0.28), transparent 40%),
    url("../images/hero-farm.jpeg") center/cover no-repeat,
    linear-gradient(135deg, #0b4d3c, #1a6b4f 45%, #0a3a2d);
}

.hero__pattern {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.hero__content {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
  padding: 7rem 0 4.5rem;
  max-width: 760px;
  margin-left: max(1rem, calc((100% - var(--container)) / 2));
}

.hero__logo {
  display: block;
  width: auto;
  height: clamp(160px, 32vw, 260px);
  max-width: min(92vw, 340px);
  object-fit: contain;
  background: #fff;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  margin: 0 0 1.35rem;
  animation: rise 0.8s ease both;
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 0.4rem;
  line-height: 0.95;
  animation: rise 0.8s ease both;
}

.hero__headline {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 500;
  max-width: 22ch;
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.95);
  animation: rise 0.8s ease 0.1s both;
}

.hero__lead {
  font-size: 1.12rem;
  max-width: 42ch;
  color: rgba(255, 255, 255, 0.84);
  margin-bottom: 1.75rem;
  animation: rise 0.8s ease 0.18s both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.8s ease 0.26s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Sections ---------- */
.section {
  padding: 5rem 0;
}

.section--tight {
  padding: 3.5rem 0;
}

.section--deep {
  background: linear-gradient(180deg, rgba(11, 77, 60, 0.06), transparent 70%);
}

.section--ink {
  background:
    linear-gradient(160deg, #073528 0%, #0b4d3c 55%, #0f5d48 100%);
  color: rgba(255, 255, 255, 0.9);
}

.section--ink h2,
.section--ink h3 {
  color: var(--white);
}

.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.section-head p {
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.section--ink .section-head p {
  color: rgba(255, 255, 255, 0.78);
}

.page-hero {
  padding: 4.5rem 0 2.5rem;
  background:
    linear-gradient(180deg, rgba(11, 77, 60, 0.1), transparent),
    radial-gradient(600px 220px at 0% 0%, rgba(212, 160, 23, 0.15), transparent 60%);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  max-width: 16ch;
}

.page-hero p {
  max-width: 54ch;
  color: var(--ink-soft);
  font-size: 1.12rem;
}

/* ---------- Grids / lists (no card clutter) ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2rem;
}

.service-item {
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}

.service-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.service-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.service-item__icon {
  width: 36px;
  height: 36px;
  margin-bottom: 0.85rem;
  color: var(--primary);
}

.course-list {
  display: grid;
  gap: 0;
}

.course-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.course-row:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.course-row h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.course-row p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.split__visual {
  min-height: 360px;
  /* Personaliza la imagen del panel reemplazando images/about-panel.svg. */
  background:
    linear-gradient(145deg, rgba(11, 77, 60, 0.85), rgba(7, 53, 40, 0.55)),
    url("../images/about-panel.svg") center/cover no-repeat;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.split__visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to top, rgba(7, 53, 40, 0.7), transparent);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.stat-strip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-strip span {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- Testimonials / events / blog ---------- */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.quote-item {
  padding-top: 1.25rem;
  border-top: 3px solid var(--accent);
}

.quote-item blockquote {
  margin: 0 0 1.25rem;
  font-size: 1.08rem;
  color: var(--ink);
}

.quote-item cite {
  font-style: normal;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.quote-item cite strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.event-list,
.blog-list,
.cap-list {
  display: grid;
  gap: 0;
}

.event-item,
.blog-item,
.cap-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 1.5rem;
  align-items: start;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}

.event-item:last-child,
.blog-item:last-child,
.cap-item:last-child {
  border-bottom: 1px solid var(--line);
}

.date-block {
  font-family: var(--font-display);
}

.date-block strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--primary);
}

.date-block span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.meta-line {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.article-body {
  max-width: 720px;
}

.article-body h2 {
  margin-top: 1.8rem;
}

.values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.values span {
  border: 1px solid var(--line);
  padding: 0.45rem 0.8rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.55);
}

/* ---------- Forms ---------- */
.form {
  display: grid;
  gap: 1rem;
  max-width: 640px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form label {
  display: grid;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  font: inherit;
  color: var(--ink);
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: 2px solid rgba(11, 77, 60, 0.25);
  border-color: var(--primary);
}

.alert {
  padding: 0.9rem 1rem;
  border-left: 4px solid;
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.7);
}

.alert--ok {
  border-color: var(--ok);
  color: var(--ok);
}

.alert--error {
  border-color: var(--danger);
  color: var(--danger);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 2rem;
  background: var(--primary-deep);
}

.footer-moodle {
  background: linear-gradient(120deg, #0b4d3c, #147a5c 60%, #0b4d3c);
  color: var(--white);
  padding: 3rem 0;
}

.footer-moodle__inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
}

.footer-moodle h2 {
  color: var(--white);
  margin-bottom: 0.4rem;
}

.footer-moodle p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  max-width: 46ch;
}

.footer-moodle .eyebrow {
  color: var(--accent);
}

.footer-moodle__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.footer-main {
  padding: 3.5rem 0 2rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-main h3 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.footer-links,
.footer-contact {
  display: grid;
  gap: 0.55rem;
}

.footer-links a,
.footer-contact a {
  color: rgba(255, 255, 255, 0.78);
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  font-size: 0.88rem;
}

.footer-seo {
  opacity: 0.65;
}

.whatsapp-float {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  z-index: 90;
  transition: transform 0.2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.06);
  color: var(--white);
}

/* ---------- Reveal motion ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Admin (shared light styles) ---------- */
.admin-body {
  background: #edf2ef;
}

.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.admin-side {
  background: var(--primary-deep);
  color: rgba(255, 255, 255, 0.85);
  padding: 1.5rem 1rem;
}

.admin-side a {
  color: rgba(255, 255, 255, 0.85);
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
}

.admin-side a:hover,
.admin-side a.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.admin-main {
  padding: 1.5rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

.admin-table th,
.admin-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.95rem;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.login-box {
  width: min(100%, 420px);
  background: var(--white);
  padding: 2rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
}

.login-box .form {
  text-align: left;
  margin-inline: auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .service-grid,
  .quote-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .split,
  .course-row,
  .event-item,
  .blog-item,
  .cap-item,
  .footer-moodle__inner {
    grid-template-columns: 1fr;
    display: grid;
  }

  .course-row,
  .event-item,
  .blog-item,
  .cap-item {
    gap: 0.75rem;
  }

  .stat-strip {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .header-bar__tag {
    display: none;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .brand__logo {
    height: 64px;
    max-width: 160px;
  }

  .nav-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .site-header {
    position: relative;
  }

  .navbar {
    position: relative;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
  }

  .service-grid,
  .quote-grid,
  .footer-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .hero__content {
    padding-top: 5.5rem;
  }

  .footer-moodle__actions {
    width: 100%;
  }

  .footer-moodle__actions .btn {
    flex: 1 1 auto;
  }
}
