/* styles.css - Estilos centralizados para Armin Achtmann Website */
:root {
  --primary-color: #0c3c7e;
  --secondary-color: #e67e22;
  --accent-color: #f39c12;
  --text-color: #333;
  --light-color: #fff;
  --border-color: #eee;
  --max-width: 1400px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #ffffff;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-size: 1.1rem;
  line-height: 1.7;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  text-decoration: underline;
  color: #cf6d11;
}

.topbar {
  background-color: var(--primary-color);
  color: var(--light-color);
  padding: 1.2rem 0;
  position: relative;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.2rem;
}

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

.logo {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: bold;
}

.logo span {
  color: var(--accent-color);
}

.subtitle {
  font-size: clamp(0.9rem, 2.5vw, 1.2rem);
}

/* Menú principal para desktop */
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.main-nav a {
  color: var(--light-color);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  white-space: nowrap;
}

.main-nav a.active {
  text-decoration: underline;
  font-weight: bold;
}

/* Botón de menú hamburguesa (oculto en desktop) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--light-color);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Menú móvil (oculto por defecto) */
.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: var(--primary-color);
  z-index: 1000;
  box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.mobile-nav.active {
  display: block;
}

.mobile-nav a {
  display: block;
  color: var(--light-color);
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 1.1rem;
}

.mobile-nav a.active {
  background-color: rgba(255,255,255,0.1);
  font-weight: bold;
}

.content-wrapper {
  flex: 1 0 auto;
  padding: 2.5rem 0;
}

.content {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
}

.sidebar-left {
  width: 22%;
  min-width: 220px;
}

.portrait-box {
  text-align: center;
  margin-bottom: 1.2rem;
}

.portrait-box img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  transform: scaleX(-1);
}

.sidebar-text {
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.sidebar-text a {
  font-weight: bold;
}

.sidebar-menu h3,
.sidebar-social h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.sidebar-menu ul,
.sidebar-social ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0;
  margin-bottom: 1.8rem;
}

.sidebar-menu li,
.sidebar-social li {
  margin-bottom: 0.7rem;
}

.sidebar-menu a,
.sidebar-social a {
  font-size: 1.05rem;
}

.main-content {
  width: 50%;
  flex-grow: 1;
  min-width: 320px;
}

.article {
  font-size: 1.15rem;
  line-height: 1.7;
}

.article h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.article img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1rem 0;
}

.welcome-text {
  font-size: 1.15rem;
  margin-bottom: 1.8rem;
  line-height: 1.7;
}

.btn-orange {
  display: inline-block;
  background-color: var(--secondary-color);
  color: var(--light-color);
  padding: 0.9rem 1.8rem;
  font-weight: bold;
  font-size: 1.05rem;
  border-radius: 3px;
  text-transform: uppercase;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-orange:hover {
  background-color: #cf6d11;
  text-decoration: none;
}

.lesungen-wrapper {
  display: flex;
  margin-top: 2.5rem;
  align-items: flex-start;
  gap: 2rem;
}

.lesungen-text {
  flex: 1;
  font-size: 1.05rem;
  line-height: 1.7;
}

.lesungen-text h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

.lesungen-text p {
  margin-top: 0;
  margin-bottom: 1rem;
}

.lesungen-links {
  margin-top: 1rem;
}

.lesungen-links a {
  display: block;
  margin-bottom: 0.7rem;
  font-size: 1.05rem;
}

.lesungen-image {
  flex: 0 0 40%;
  text-align: center;
}

.lesungen-image img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.sidebar-right {
  width: 28%;
  min-width: 270px;
  padding-left: 1.8rem;
  border-left: 1px solid var(--border-color);
}

.book-buy-box,
.book-cover-box {
  margin-bottom: 2rem;
  text-align: center;
  padding: 1.5rem;
  background-color: #f9f9f9;
  border-radius: 4px;
}

.book-buy-box img,
.book-cover-box img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.book-buy-box h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.book-buy-box p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.book-buy-box a {
  font-weight: bold;
  color: var(--secondary-color);
  font-size: 1.1rem;
}

.buy-link {
  text-align: center;
  font-size: 1.05rem;
  margin-bottom: 1.8rem;
}

.buy-link a {
  font-weight: bold;
  text-transform: uppercase;
  font-size: 1.1rem;
}

.newsletter-box {
  margin-bottom: 1.8rem;
  font-size: 1.05rem;
  line-height: 1.6;
  padding: 1.5rem;
  background-color: #f9f9f9;
  border-radius: 4px;
}

.newsletter-box h3 {
  margin-top: 0;
  font-size: 1.3rem;
  color: var(--primary-color);
}

.newsletter-box input[type="text"],
.newsletter-box input[type="email"],
.newsletter-box input[type="tel"],
.newsletter-box textarea,
.newsletter-box select {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 1.05rem;
  font-family: Arial, sans-serif;
}

.newsletter-box textarea {
  min-height: 120px;
  resize: vertical;
}

.newsletter-box input[type="submit"] {
  background-color: var(--secondary-color);
  color: var(--light-color);
  border: none;
  padding: 0.9rem 1.2rem;
  border-radius: 3px;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

.newsletter-box input[type="submit"]:hover {
  background-color: #cf6d11;
}

.footer {
  background-color: var(--primary-color);
  color: var(--light-color);
  font-size: 1rem;
  padding: 1.2rem 0;
  text-align: center;
  flex-shrink: 0;
}

.footer a {
  color: var(--light-color);
  text-decoration: underline;
}

/* Estilos para formularios */
.contact-form,
.booking-form {
  background-color: #f9f9f9;
  padding: 2rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 1.05rem;
  font-family: Arial, sans-serif;
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.required {
  color: #e74c3c;
}

.form-success {
  background-color: #d4edda;
  color: #155724;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  border: 1px solid #c3e6cb;
}

.form-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  border: 1px solid #f5c6cb;
}

.form-error ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.5rem;
}

/* Estilos para el modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s;
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 8px;
  width: 80%;
  max-width: 600px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: slideIn 0.3s;
}

.close-modal {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
  color: #000;
  text-decoration: none;
}

.modal-title {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.5rem;
}

.termine-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.termine-list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.1rem;
}

.termine-list li:last-child {
  border-bottom: none;
}

.termine-date {
  font-weight: bold;
  color: var(--primary-color);
  display: inline-block;
  min-width: 120px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* =========================== */
/* RESPONSIVE DESIGN - MÓVILES */
/* =========================== */

/* Tablets pequeñas y móviles grandes */
@media (max-width: 992px) {
  .content {
    flex-wrap: wrap;
    gap: 2rem;
  }
  
  .sidebar-left {
    width: 100%;
    order: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
  }
  
  .portrait-box {
    flex: 0 0 180px;
  }
  
  .sidebar-menu, .sidebar-social {
    flex: 1;
    min-width: 180px;
  }
  
  .main-content {
    width: 100%;
    order: 3;
  }
  
  .sidebar-right {
    width: 100%;
    order: 2;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
  }
  
  .newsletter-box, .book-buy-box, .book-cover-box {
    flex: 1;
    min-width: 280px;
  }
  
  .lesungen-wrapper {
    flex-direction: column;
  }
  
  .lesungen-image {
    flex: 0 0 auto;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
  }

  .modal-content {
    width: 90%;
    margin: 10% auto;
    padding: 1.5rem;
  }

  .contact-form,
  .booking-form {
    padding: 1.5rem;
  }
}

/* Móviles (menos de 768px) */
@media (max-width: 768px) {
  /* Menú hamburguesa visible */
  .menu-toggle {
    display: flex;
  }
  
  /* Menú principal oculto en móviles */
  .main-nav {
    display: none;
  }
  
  .topbar-inner {
    flex-wrap: nowrap;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .subtitle {
    font-size: 0.8rem;
  }
  
  .sidebar-left {
    flex-direction: column;
  }
  
  .portrait-box {
    flex: 0 0 auto;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
  
  .sidebar-right {
    flex-direction: column;
  }
  
  .newsletter-box, .book-buy-box, .book-cover-box {
    width: 100%;
  }

  .modal-content {
    width: 95%;
    margin: 15% auto;
    padding: 1.2rem;
  }

  .modal-title {
    font-size: 1.5rem;
  }

  .termine-list li {
    font-size: 1rem;
  }

  .termine-date {
    min-width: 100px;
    display: block;
    margin-bottom: 0.3rem;
  }
  
  /* Ajustes para imágenes en móviles */
  .portrait-box img, 
  .lesungen-image img, 
  .book-cover-box img,
  .book-buy-box img {
    max-width: 85%;
    height: auto;
  }
  
  /* Reducir padding en móviles */
  .content-wrapper {
    padding: 1.5rem 0;
  }
  
  .container {
    padding: 0 1rem;
  }
}

/* Móviles pequeños (menos de 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 0.8rem;
  }
  
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }
  
  .logo {
    font-size: 1.3rem;
  }
  
  .subtitle {
    font-size: 0.7rem;
  }
  
  .menu-toggle {
    position: absolute;
    right: 1rem;
    top: 1.5rem;
  }
  
  .mobile-nav a {
    font-size: 1rem;
    padding: 0.8rem 1rem;
  }
  
  body {
    font-size: 1rem;
  }
  
  .btn-orange {
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
  }
  
  /* Ajustes adicionales para imágenes en móviles pequeños */
  .portrait-box img, 
  .lesungen-image img, 
  .book-cover-box img,
  .book-buy-box img {
    max-width: 100%;
  }
  
  .portrait-box {
    margin-bottom: 1rem;
  }
  
  .book-cover-box,
  .book-buy-box {
    margin-bottom: 1rem;
  }
}

/* Pantallas muy pequeñas (menos de 360px) */
@media (max-width: 360px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .logo {
    font-size: 1.1rem;
  }
  
  .subtitle {
    font-size: 0.65rem;
  }
  
  .content-wrapper {
    padding: 1rem 0;
  }
  
  .btn-orange {
    width: 100%;
    text-align: center;
  }
}