@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --text-color: #2d3748;
  --text-muted: #718096;
  --card-bg: rgba(255, 255, 255, 0.95);
  --input-bg: #f7fafc;
  --input-border: #e2e8f0;
  --input-focus: #667eea;
  --error-color: #e53e3e;
  --success-color: #38a169;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

body {
  background: var(--bg-gradient);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  color: var(--text-color);
  padding: 0;
}

.header {
  width: 100%;
  padding: 40px 20px;
  text-align: center;
  color: white;
}

.header h1 {
  color: white;
  margin-bottom: 8px;
  font-size: 2.5rem;
}

.header p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
}

.nav {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 15px;
  display: flex;
  justify-content: center;
  gap: 30px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav a {
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav a:hover {
  color: var(--primary-color);
  background: white;
  padding: 5px 15px;
  border-radius: 20px;
}

.container {
  width: 100%;
  max-width: 1200px;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  justify-items: center;
}

.card {
  background: var(--card-bg);
  width: 100%;
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.card h2 {
  text-align: left;
  font-size: 1.5rem;
}

.card p {
  text-align: left;
  margin-bottom: 25px;
  flex-grow: 1;
}

/* Vertical centering for pages without a header (Login, Register, Contact) */
body:not(:has(.header)) {
  justify-content: center;
}

.login-card,
body:not(:has(.header))>.card {
  background: var(--card-bg);
  width: 95%;
  max-width: 450px;
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin: 20px;
  backdrop-filter: blur(10px);
}

.footer {
  width: 100%;
  padding: 40px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  margin-top: auto;
}

.footer p {
  color: inherit;
}

h1,
h2,
h3 {
  text-align: center;
  margin-bottom: 24px;
  color: var(--secondary-color);
  font-weight: 700;
}

label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: var(--border-radius);
  border: 2px solid var(--input-border);
  background: var(--input-bg);
  font-size: 15px;
  transition: var(--transition);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--input-focus);
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button,
input[type="submit"] {
  width: 100%;
  padding: 14px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition);
}

button:hover,
input[type="submit"]:hover {
  background: var(--secondary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button:active,
input[type="submit"]:active {
  transform: translateY(0);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

.telefono-group {
  display: flex;
  gap: 12px;
  margin-bottom: 0px;
}

.telefono-group select {
  width: 120px;
}

.error {
  color: var(--error-color);
  font-size: 12px;
  margin-top: -15px;
  margin-bottom: 15px;
  font-weight: 500;
}

.success {
  color: var(--success-color);
  text-align: center;
  margin-top: 20px;
  font-weight: 600;
}

.hidden {
  display: none;
}

#msg {
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
  color: var(--primary-color);
}

p {
  line-height: 1.6;
  color: var(--text-color);
  text-align: center;
}