:root {
  --azul: #1C2A3A;
  --blanco: #ffffff;
  --gris: #B4B4B4;
  --dorado: #C1A875;
  --beige: #f5f1ec;
  --error: #e63946;
  --exito: #2a9d8f;
  --fuente-serif: 'Playfair Display', serif;
  --fuente-sans: 'Open Sans', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--fuente-sans);
  background-color: var(--beige);
  color: var(--azul);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
header {
  background-color: var(--azul);
  color: var(--blanco);
  padding: 1rem 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--blanco);
}

.logo-header {
  height: 95px;
  margin-right: 1rem;
}

.nombre h1 {
  font-family: var(--fuente-serif);
  font-size: 1.5rem;
  margin: 0;
}

.nombre p {
  font-size: 0.9rem;
  margin: 0;
}

/* Navegación */
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--blanco);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--dorado);
}

/* Formulario de contacto */
.formulario-contacto {
  background-color: var(--blanco);
  padding: 4rem 0;
  color: var(--azul);
}

.formulario-contacto h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1rem;
  font-family: var(--fuente-serif);
}

form {
  max-width: 600px;
  margin: 0 auto;
}

fieldset {
  border: none;
  padding: 0;
}

legend {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
}

.campo {
  margin-bottom: 1.5rem;
}

.campo label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.campo input,
.campo textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gris);
  border-radius: 4px;
  font-family: var(--fuente-sans);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.campo input:focus-visible,
.campo textarea:focus-visible {
  outline: 2px solid var(--dorado);
  outline-offset: 2px;
}

.campo input:invalid,
.campo textarea:invalid {
  border-color: var(--error);
}

.campo input:valid,
.campo textarea:valid {
  border-color: var(--exito);
}

form .btn {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 1rem;
  background-color: var(--dorado);
  color: var(--azul);
  padding: 0.75rem;
  font-weight: bold;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

form .btn:hover {
  background-color: #a88c5c;
}

#form-feedback {
  font-weight: bold;
  text-align: center;
  font-size: 1rem;
}

/* Footer */
footer {
  background-color: var(--azul);
  color: var(--blanco);
  padding: 2rem 0;
  font-size: 0.95rem;
}

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

.footer-links,
.footer-contacto,
.footer-logo {
  flex: 1 1 200px;
}

.footer-links h4,
.footer-contacto h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-family: var(--fuente-serif);
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-links a,
.footer-contacto a,
.footer-creditos a,
.redes a {
  color: var(--blanco);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-contacto a:hover,
.footer-creditos a:hover,
.redes a:hover {
  color: var(--dorado);
  text-decoration: underline;
}

.footer-contacto p {
  margin: 0.3rem 0;
}

.redes {
  margin-top: 1rem;
}

.redes a {
  font-size: 1.4rem;
  margin-right: 1rem;
}

.footer-logo {
  text-align: center;
}

.logo-footer {
  height: 120px;
  max-width: 100%;
}

.footer-creditos {
  width: 100%;
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--gris);
}

.footer-creditos a {
  color: #0077cc;
}

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

/* Modo oscuro */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #f0f0f0;
  }

  .formulario-contacto {
    background-color: #1e1e1e;
  }

  .campo input,
  .campo textarea {
    background-color: #2a2a2a;
    color: #ffffff;
    border-color: #444;
  }

  form .btn {
    background-color: var(--dorado);
    color: #1e1e1e;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .footer-logo {
    order: -1;
    margin-bottom: 1rem;
  }

  .redes a {
    margin: 0 0.5rem;
  }
}