:root {
  --color-bg: #ffffff;
  --color-primary: #006da3;
  --color-primary-dark: #004f77;
  --color-text: #222222;
  --color-muted: #666666;
  --color-border: #e0e0e0;
  --color-section-bg: #f5f5f7;
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.08);
  --radius-card: 10px;
  --max-width: 1120px;
  --transition-fast: 0.2s ease-in-out;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

/* HEADER */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  height: 40px;
  width: auto;
}

.brand {
  font-weight: 600;
  font-size: 1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-phone {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.header-phone:hover {
  text-decoration: underline;
}

.menu-toggle {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

/* NAV */

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px 8px;
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
}

.nav a {
  text-decoration: none;
  color: var(--color-muted);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
}

.nav a:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* HERO */

.hero {
  max-width: var(--max-width);
  margin: 24px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 2fr);
  gap: 24px;
}

.hero-image img {
  width: 100%;
  display: block;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.hero-text {
  text-align: center;
  margin-top: 16px;
}

.hero-tagline {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.hero h1 {
  font-size: 1.8rem;
  margin: 0 0 16px;
}

/* BOTONES */

.btn-primary,
.btn-secondary,
.btn-whatsapp-contact {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

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

.btn-secondary {
  background: #ffffff;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: #ffffff;
}

.btn-whatsapp-contact {
  background: #25D366;
  color: #fff;
}

.btn-whatsapp-contact:hover {
  background: #1da955;
}

/* INFO GRID */

.info-grid {
  max-width: var(--max-width);
  margin: 24px auto 32px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.info-card {
  background: var(--color-section-bg);
  border-radius: var(--radius-card);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.info-card img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 10px;
}

.info-card h3 {
  margin-top: 0;
}

/* COURSES */

.courses {
  background: var(--color-section-bg);
  padding: 32px 16px;
}

.courses h2 {
  max-width: var(--max-width);
  margin: 0 auto 20px;
  text-align: center;
}

.courses-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.course-card {
  background: #ffffff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.course-card img {
  width: 100%;
  border-radius: 6px;
}

.course-card h3 {
  margin: 0;
  font-size: 1rem;
}

.course-meta {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* MATTERPORT CAROUSEL */

.matterport-section {
  max-width: var(--max-width);
  margin: 32px auto;
  padding: 0 16px 16px;
}

.matterport-section h2 {
  text-align: center;
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--color-muted);
  margin-bottom: 20px;
}

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel-track {
  overflow-x: auto;
  scroll-behavior: smooth;
  display: flex;
  gap: 16px;
  padding: 8px 4px;
}

.carousel-item {
  flex: 0 0 180px;
  background: #ffffff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  text-align: center;
  text-decoration: none;
  color: var(--color-text);
  padding: 10px;
}

.carousel-item img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 8px;
}

.carousel-item span {
  font-size: 0.9rem;
}

.carousel-btn {
  border: none;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.matterport-cta {
  text-align: center;
  margin-top: 16px;
}

/* CONTACTO */

.contact {
  background: var(--color-section-bg);
  padding: 32px 16px;
}

.contact h2 {
  text-align: center;
  margin: 0 0 24px;
}

.contact-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.contact-info {
  font-size: 0.95rem;
}

.contact-details h3 {
  margin-bottom: 4px;
}

.contact-details p {
  margin: 4px 0;
}

.contact-form-wrapper {
  background: #ffffff;
  border-radius: var(--radius-card);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.contact-form label {
  display: block;
  font-size: 0.85rem;
  margin-top: 10px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  font-family: inherit;
}

.contact-form button {
  margin-top: 14px;
  width: 100%;
}

.social-footer {
  max-width: var(--max-width);
  margin: 24px auto 0;
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.social-links a {
  text-decoration: none;
  color: var(--color-primary);
}

/* FOOTER */

.footer {
  background: #101010;
  color: #f1f1f1;
  padding: 16px;
  text-align: center;
  font-size: 0.85rem;
}

.footer-links a {
  color: #f1f1f1;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* WHATSAPP FLOTANTE */

.btn-whatsapp {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: #25D366;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-soft);
  z-index: 100;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

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

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .nav {
    display: none;
    flex-direction: column;
    padding-bottom: 10px;
  }

  .nav.open {
    display: flex;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }
}

