:root {
  --ink: #122331;
  --ink-soft: #3d4d58;
  --surface: #ffffff;
  --surface-soft: #f4f7f8;
  --line: #d7e0e4;
  --teal: #087a8c;
  --teal-dark: #075365;
  --red: #c92332;
  --gold: #b8872f;
  --shadow: 0 18px 48px rgba(18, 35, 49, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
}

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

a {
  color: inherit;
}

p {
  margin: 0 0 1rem;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: 0;
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.1rem;
}

h3 {
  font-size: 1.15rem;
}

input,
textarea,
button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  padding: .75rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: rgba(255, 255, 255, .95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand,
.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  min-width: 0;
}

.brand img,
.admin-brand img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.brand strong,
.admin-brand span {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.1;
}

.brand small {
  display: block;
  color: var(--ink-soft);
  font-size: .78rem;
  line-height: 1.25;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: .2rem;
}

.primary-nav a {
  padding: .65rem .8rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .95rem;
  border-radius: 6px;
}

.primary-nav a:hover,
.primary-nav a.is-active {
  color: var(--teal-dark);
  background: #eaf5f7;
}

.primary-nav .nav-cta {
  margin-left: .3rem;
  color: #fff;
  background: var(--teal-dark);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--ink);
}

.hero {
  min-height: 620px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 5rem 4rem;
}

.hero-inner {
  width: min(760px, 100%);
}

.hero h1 {
  max-width: 700px;
  margin-bottom: 1rem;
  font-size: 3.4rem;
}

.hero p {
  max-width: 620px;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, .88);
}

.hero-actions,
.form-actions,
.table-actions,
.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .75rem 1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  white-space: normal;
  text-align: center;
}

.button-primary {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.button-primary:hover {
  background: var(--teal-dark);
}

.button-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .08);
}

.button-outline.dark {
  color: var(--teal-dark);
  border-color: var(--teal);
  background: transparent;
}

.button-light {
  color: var(--teal-dark);
  border-color: var(--line);
  background: #f8fbfc;
}

.button-danger {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.text-link {
  color: var(--teal-dark);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
}

.eyebrow {
  display: inline-block;
  margin-bottom: .7rem;
  color: var(--teal);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero .eyebrow,
.page-hero .eyebrow {
  color: #8de2ed;
}

.stat-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--ink);
  color: #fff;
}

.stat-band div {
  min-height: 118px;
  padding: 1.4rem;
  border-right: 1px solid rgba(255, 255, 255, .12);
}

.stat-band strong,
.stat-band span {
  display: block;
}

.stat-band strong {
  font-size: 1.6rem;
  line-height: 1.1;
}

.stat-band span {
  color: rgba(255, 255, 255, .74);
  font-size: .95rem;
}

.split-section,
.content-section,
.section-panel,
.contact-layout,
.cta-band {
  padding: 5rem 4rem;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr);
  gap: 4rem;
  align-items: center;
}

.split-section.reverse {
  grid-template-columns: minmax(320px, 1.1fr) minmax(280px, .9fr);
}

.split-section.reverse .split-media {
  order: 2;
}

.split-media img,
.division-card img,
.service-card img,
.feature-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split-media {
  min-height: 380px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-soft);
  box-shadow: var(--shadow);
}

.split-copy,
.narrow-copy {
  max-width: 740px;
}

.lead {
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.section-panel.muted,
.muted {
  background: var(--surface-soft);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.feature-grid,
.service-grid,
.admin-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.service-grid.wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.service-card,
.division-card,
.text-block,
.admin-card,
.admin-action,
.message-item,
.login-panel,
.admin-panel,
.contact-form,
.contact-info {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.feature-card,
.service-card {
  overflow: hidden;
  min-height: 100%;
}

.feature-card img,
.service-card img {
  height: 155px;
  background: #edf2f4;
}

.feature-card div,
.service-card div,
.division-card div,
.text-block {
  padding: 1.25rem;
}

.service-card span {
  display: block;
  margin-bottom: .45rem;
  color: var(--red);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.service-card h3 a {
  text-decoration: none;
}

.service-card.small {
  padding: 1.1rem;
}

.service-card.small div {
  padding: 0;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.division-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  overflow: hidden;
}

.page-hero {
  min-height: 430px;
  display: flex;
  align-items: flex-end;
  padding: 5rem 4rem;
  color: #fff;
  background-size: cover;
  background-position: center;
}

.page-hero.compact {
  min-height: 360px;
}

.page-hero div {
  max-width: 800px;
}

.page-hero h1 {
  font-size: 2.8rem;
}

.narrow-copy {
  margin: 0 auto;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: #fff;
  background: var(--teal-dark);
}

.cta-band h2 {
  max-width: 680px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(320px, 1.2fr);
  gap: 2rem;
  background: var(--surface-soft);
}

.contact-info,
.contact-form {
  padding: 2rem;
}

.contact-form,
.form-stack,
.admin-form {
  display: grid;
  gap: 1rem;
}

label span {
  display: block;
  margin-bottom: .35rem;
  color: var(--ink-soft);
  font-size: .9rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .8rem .9rem;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(8, 122, 140, .18);
  border-color: var(--teal);
}

.notice {
  padding: .9rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}

.notice-success {
  color: #15523c;
  background: #eaf8f2;
  border-color: #b9e5d4;
}

.notice-error {
  color: #7c1f2a;
  background: #fff0f2;
  border-color: #f2c2c9;
}

.site-footer {
  padding: 3rem 4rem 1.5rem;
  color: rgba(255, 255, 255, .78);
  background: #101b24;
}

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

.footer-logo {
  width: 70px;
  margin-bottom: 1rem;
  background: #fff;
  border-radius: 6px;
}

.site-footer h2 {
  color: #fff;
  font-size: 1rem;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: var(--surface-soft);
}

.auth-shell {
  width: min(440px, 100%);
}

.login-panel {
  padding: 2rem;
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.login-brand img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.admin-page {
  background: var(--surface-soft);
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.admin-sidebar {
  padding: 1.25rem;
  background: #102331;
  color: #fff;
}

.admin-brand {
  color: #fff;
  margin-bottom: 2rem;
}

.admin-brand img {
  background: #fff;
  border-radius: 6px;
}

.admin-brand span {
  color: #fff;
}

.admin-nav {
  display: grid;
  gap: .3rem;
}

.admin-nav a {
  padding: .75rem .85rem;
  border-radius: 6px;
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
}

.admin-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.admin-main {
  min-width: 0;
  padding: 1.5rem;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-topbar h1 {
  font-size: 2rem;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.admin-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-card {
  padding: 1.25rem;
}

.admin-card span {
  display: block;
  color: var(--ink-soft);
  font-size: .9rem;
}

.admin-card strong {
  display: block;
  margin-top: .5rem;
  font-size: 2rem;
  line-height: 1;
}

.admin-panel {
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 24px rgba(18, 35, 49, .06);
}

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-panel-header h2 {
  font-size: 1.35rem;
}

.admin-panel-header p {
  color: var(--ink-soft);
  margin-bottom: 0;
}

.admin-action {
  padding: 1.2rem;
  text-decoration: none;
}

.admin-action strong,
.admin-action span {
  display: block;
}

.admin-action span {
  margin-top: .4rem;
  color: var(--ink-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.check-row input {
  width: auto;
}

.inline-check {
  align-self: end;
  min-height: 44px;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-table th,
.admin-table td {
  padding: .85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--ink-soft);
  font-size: .85rem;
  text-transform: uppercase;
}

.table-actions form {
  display: inline-flex;
}

.message-list {
  display: grid;
  gap: 1rem;
}

.message-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 1rem;
}

.message-item.unread {
  border-left: 4px solid var(--teal);
}

.message-actions {
  align-content: start;
}

.empty-state {
  color: var(--ink-soft);
}

@media (max-width: 1080px) {
  .site-header {
    padding: .75rem 1.25rem;
  }

  .hero,
  .split-section,
  .content-section,
  .section-panel,
  .contact-layout,
  .cta-band,
  .page-hero,
  .site-footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .service-grid.wide,
  .feature-grid,
  .service-grid,
  .admin-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-shell {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 820px) {
  h1,
  .hero h1,
  .page-hero h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.65rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: .8rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

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

  .primary-nav .nav-cta {
    margin-left: 0;
  }

  .hero {
    min-height: 560px;
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .stat-band {
    grid-template-columns: repeat(2, 1fr);
  }

  .split-section,
  .split-section.reverse,
  .contact-layout,
  .two-column,
  .footer-grid,
  .admin-shell,
  .message-item {
    grid-template-columns: 1fr;
  }

  .split-section.reverse .split-media {
    order: 0;
  }

  .division-card {
    grid-template-columns: 1fr;
  }

  .division-card img {
    height: 180px;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-topbar,
  .admin-panel-header,
  .cta-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand small {
    display: none;
  }

  .hero,
  .split-section,
  .content-section,
  .section-panel,
  .contact-layout,
  .cta-band,
  .page-hero,
  .site-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .feature-grid,
  .service-grid,
  .service-grid.wide,
  .admin-actions-grid {
    grid-template-columns: 1fr;
  }

  .stat-band {
    grid-template-columns: 1fr;
  }

  .admin-main,
  .admin-sidebar {
    padding: 1rem;
  }

  .admin-nav {
    grid-template-columns: 1fr;
  }
}

/* WhatsApp Integrations */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4), 0 8px 32px rgba(18, 35, 49, 0.15);
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-float::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #25d366;
  opacity: 0.8;
  animation: pulse-ring 2s infinite;
  box-sizing: border-box;
}

.whatsapp-float:hover {
  background-color: #128c7e;
  transform: scale(1.1) translateY(-4px);
  color: #fff;
  box-shadow: 0 6px 20px rgba(18, 140, 126, 0.5), 0 12px 40px rgba(18, 35, 49, 0.2);
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.button-whatsapp {
  background-color: #25d366;
  color: #fff;
  border: 1px solid #25d366;
}

.button-whatsapp:hover {
  background-color: #128c7e;
  color: #fff;
  border-color: #128c7e;
}

.whatsapp-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: bold;
}

.whatsapp-link-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

@media (max-width: 820px) {
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }
  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }
}

.whatsapp-float:hover svg {
  animation: whatsapp-wiggle 0.8s ease-in-out;
}

@keyframes whatsapp-wiggle {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(-15deg); }
  30% { transform: rotate(15deg); }
  45% { transform: rotate(-10deg); }
  60% { transform: rotate(10deg); }
  75% { transform: rotate(-5deg); }
  85% { transform: rotate(5deg); }
}

/* Hero Slider Styles */
.hero-slider {
  position: relative;
  height: 600px;
  background: var(--ink);
  overflow: hidden;
}

.slider-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  padding: 0 4rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
  z-index: 1;
}

.slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.slide .hero-inner {
  max-width: 680px;
  color: #fff;
  transform: translateY(20px);
  transition: transform 0.8s ease-in-out;
}

.slide.is-active .hero-inner {
  transform: translateY(0);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(13, 34, 45, 0.4);
  color: #fff;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

.slider-arrow:hover {
  background: var(--teal);
  transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev {
  left: 20px;
}

.slider-arrow.next {
  right: 20px;
}

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-dot:hover,
.slider-dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

@media (max-width: 820px) {
  .hero-slider {
    height: 560px;
  }
  .slide {
    padding: 0 1.5rem;
  }
  .slider-arrow {
    display: none;
  }
}
