/* Base design system - neutral, themeable via CSS variables */
/* Do NOT put brand colors here. Only consume variables. */

:root {
  /* Defaults in case a theme is missing */
  --pb-bg: #ffffff;
  --pb-surface: #f8f8f8;
  --pb-text: #1d1d1d;
  --pb-text-muted: #575757;
  --pb-border: #e2e2e2;
  --pb-primary: #0d6efd;
  --pb-accent: #6610f2;
  --pb-success: #198754;
  --pb-font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Typography */
body {
  background: var(--pb-bg);
  color: var(--pb-text);
  font-family: var(--pb-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* Reusable Typography Classes */
.text-primary {
  color: var(--pb-primary);
}

.text-muted {
  color: var(--pb-text-muted);
}

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

.text-uppercase {
  text-transform: uppercase;
}

/* Spacing Utilities */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

html, body {
  overflow-x: hidden;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
  width: 100%;
}

footer {
  flex-shrink: 0;
  width: 100%;
}

/* Base input styles */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea,
.form-control,
.form-select {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #ced4da !important;
}

.form-logo {
  display: flex;
  justify-content: start;
  margin-bottom: 1.5rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-logo .accent {
  color: var(--pb-primary);
  margin-left: 0.5rem;
}

/* Form Components */

/* Form Header */
.form-header {
  background-color: var(--pb-bg);
  color: var(--pb-text);
  padding: 1rem 0 0;
  position: relative;
}

.form-header .header-content {
  padding: 1rem;
  margin: 0 auto;
  padding: 0.1rem 2rem;
}

.form-header .header-bar {
  background-color: var(--pb-primary);
  color: white;
  padding: 0.75rem 0;
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.3rem;
}

/* Form Footer */
.form-footer {
  background-color: var(--pb-bg);
  color: var(--pb-text);
  padding: 3rem 0 1.5rem;
}

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

.form-footer .footer-slogan {
  color: var(--pb-text-muted);
  font-size: 0.95rem;
}

.form-footer .footer-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.form-footer .footer-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background-color: var(--pb-primary);
}

.form-footer .footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.form-footer .footer-menu a {
  color: var(--pb-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.form-footer .footer-menu a:hover {
  color: var(--pb-primary);
  text-decoration: none;
}

.form-footer .footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--pb-border);
  text-align: center;
  color: var(--pb-text-muted);
  font-size: 0.9rem;
}

.formulario-main {
  flex: 1 0 auto;
  width: 100%;
  background-color: var(--pb-bg);
  padding: 2rem 0;
}

/* Form Container */
.form-container {
  background-color: var(--pb-surface);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin-bottom: 2rem;
}

/* Form Sections */
.form-section {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--pb-border);
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-title {
  color: var(--pb-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--pb-primary);
}

.section-subtitle {
  color: var(--pb-text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

/* Form Controls */
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--pb-text);
  font-size: 0.95rem;
}

.form-control,
.form-select {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--form-text);
  background-color: var(--form-bg);
  border: 1px solid var(--form-border);
  border-radius: 0.375rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--form-focus);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Checkboxes and Radios */
.form-check {
  display: block;
  min-height: 1.5rem;
  padding-left: 1.5em;
  margin-bottom: 0.5rem;
}

.form-check-input {
  float: left;
  margin-left: -1.5em;
  width: 1em;
  height: 1em;
  margin-top: 0.25em;
  vertical-align: top;
  background-color: var(--form-bg);
  border: 1px solid var(--form-border);
  border-radius: 0.25em;
}

.form-check-input:checked {
  background-color: var(--pb-primary);
  border-color: var(--pb-primary);
}

.form-check-label {
  cursor: pointer;
  color: var(--pb-text);
  font-size: 0.95rem;
  margin-left: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  border-radius: 0.375rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, 
              border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .form-container {
    padding: 1.5rem;
  }
  
  .section-title {
    font-size: 1.3rem;
  }
  
  .form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
  }
}
.form-container {
  background-color: var(--form-bg);
  border-radius: var(--form-radius);
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  padding: var(--form-padding);
  margin-bottom: var(--form-spacing);
}

.form-section {
  margin-bottom: var(--form-spacing);
  padding-bottom: var(--form-spacing);
  border-bottom: 1px solid var(--form-border);
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-title {
  color: var(--pb-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 3px;
  background-color: var(--pb-primary);
}

/* Form Controls */
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--pb-text);
}

.form-control,
.form-select {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--form-text);
  background-color: var(--form-bg);
  background-clip: padding-box;
  border: 1px solid var(--form-border);
  border-radius: var(--form-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--form-focus);
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Checkboxes and Radios */
.form-check {
  display: block;
  min-height: 1.5rem;
  padding-left: 1.5em;
  margin-bottom: 0.5rem;
}

.form-check-input {
  float: left;
  margin-left: -1.5em;
  width: 1em;
  height: 1em;
  margin-top: 0.25em;
  vertical-align: top;
  background-color: var(--form-bg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 1px solid var(--form-border);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.form-check-input[type=checkbox] {
  border-radius: 0.25em;
}

.form-check-input:checked {
  background-color: var(--pb-primary);
  border-color: var(--pb-primary);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.form-check-label {
  cursor: pointer;
  color: var(--pb-text);
}

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  border-radius: var(--form-radius);
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Header Components */
.page-header {
  background-color: var(--pb-bg);
  color: var(--pb-text);
  padding: 3rem 0 1rem;
  position: relative;
}

.header-content {
  margin: 0 auto;
  padding: 1rem;
}

.logo-text {
  font-weight: 700;
  line-height: 1;
  color: var(--pb-text);
  font-size: 1.2rem;
}

.header-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
}

.header-subtitle {
  font-size: 1.1rem;
  color: var(--pb-text-muted);
  max-width: 700px;
}

.header-bar {
  background-color: var(--pb-primary);
  color: white;
  padding: 0.75rem 0;
  text-align: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.3rem;
}

/* Footer Components */
.page-footer {
  background-color: var(--pb-bg);
  color: var(--pb-text);
  padding: 3rem 0 1.5rem;
}

.footer-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background-color: var(--pb-primary);
}

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

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

.footer-menu a {
  color: var(--pb-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-menu a:hover {
  color: var(--pb-primary);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--pb-border);
  text-align: center;
  color: var(--pb-text-muted);
  font-size: 0.9rem;
}

/* Responsive Utilities */
@media (max-width: 768px) {
  .header-title {
    font-size: 2rem;
  }
  
  .form-container {
    padding: 1.5rem;
  }
  
  .section-title {
    font-size: 1.3rem;
  }
}

.title-comunidad {
  font-size: 35px;
  font-weight: 700;
  color: var(--pb-text);
}

.desc-comunidad,
.rules-comunidad,
.price-inscipcion,
.monthly,
.followers-comunidad {
  color: var(--pb-text-muted);
}

.info-footer-comunidad {
  margin-top: 20px;
  font-weight: 700;
  color: var(--pb-text-muted);
}

.divider {
  width: 100%;
  height: 2px;
  background: var(--pb-primary);
  border-radius: 2px;
  margin: 10px 0;
}

/* Forms */
.form-label {
  color: var(--pb-text);
  font-weight: 600;
}

.form-control,
.form-select {
  background: var(--pb-surface);
  color: var(--pb-text);
  border-color: var(--pb-border);
}

/* Improve select appearance to match inputs */
.form-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: 1px solid var(--pb-border);
  border-radius: 0;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  height: calc(2.25rem + 2px);
  background-color: var(--pb-surface);
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
}

.form-control[readonly],
.form-control:read-only {
  background: var(--pb-surface);
  color: var(--pb-text);
  opacity: 1;
}

.form-control::placeholder {
  color: color-mix(in srgb, var(--pb-text-muted) 60%, transparent);
}

.is-invalid {
  border-color: var(--pb-accent) !important;
}

/* Success state styling */
.is-valid {
  border-color: var(--pb-success) !important;
}

.invalid-feedback {
  display: block;
}

/* Remove Bootstrap invalid warning icon on selects while keeping the arrow */
.form-select.is-invalid,
.was-validated .form-select:invalid {
  --bs-form-select-bg-icon: none;
  background-image: var(--bs-form-select-bg-img) !important;
  border-color: var(--pb-accent);
  box-shadow: none;
}

/* Remove Bootstrap valid check icon on selects while keeping the arrow */
.form-select.is-valid,
.was-validated .form-select:valid {
  --bs-form-select-bg-icon: none;
  background-image: var(--bs-form-select-bg-img) !important;
  border-color: var(--pb-success);
  box-shadow: none;
}

/* Buttons */
.btn-custom {
  background: var(--pb-primary);
  color: var(--pb-text);
  border: none;
  padding: 10px 28px;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
}

.btn-custom:disabled {
  cursor: not-allowed;
}

.btn-custom:hover {
  filter: brightness(0.9);
  color: var(--pb-text);
}

/* Signup panel */
.signup-card {
  background: var(--pb-surface);
  border: 1px solid var(--pb-border);
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.signup-card .card-inner {
  padding: 18px 20px;
}
.signup-title {
  margin: 0 0 8px 0;
  font-weight: 700;
  color: var(--pb-text);
}
.signup-meta {
  font-size: 12px;
  color: var(--pb-text-muted);
}
.signup-terms {
  font-size: 12px;
  color: var(--pb-text-muted);
  margin-bottom: 0;
}

/* Brand header next to image */
.brand-head .brand-figure {
  width: 200px;
  height: auto;
  object-fit: cover;
  border-radius: 2px;
}

.brand-copy .brand-title {
  margin: 0;
  font-size: 35px;
  font-weight: 800;
  color: var(--pb-text);
  line-height: 1.1;
}

.brand-copy .brand-sub {
  margin: 0;
  color: var(--pb-text);
  font-weight: 600;
  opacity: .9;
}

/* Modals */
.modal-content {
  background: var(--pb-surface);
  border: 0;
  border-radius: 0;
  color: var(--pb-text);
}
.modal .btn.btn-primary {
  background: var(--pb-primary);
  border: none;
}
.modal .btn.btn-secondary {
  background: var(--pb-accent);
  border: none;
}

body.theme-form .modal .modal-content {
  height: 320px;
  max-width: 100%;
  overflow-y: auto;
}

body.theme-form .modal .modal-content .modal-body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

body.theme-form .modal {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--bs-modal-margin, 1rem) 0;
}

body.theme-form .modal .modal-dialog {
  margin: 0 1rem;
  max-width: 450px;
  width: 100%;
}

@media (max-width: 575.98px) {
  body.theme-form .modal {
    align-items: center;
  }
}

/* Ensure confirm modal overlays above any other modal */
#confirmCloseModal.modal {
  z-index: 2000;
}
.modal-backdrop.show.confirm-backdrop {
  z-index: 1990;
}

/* Lower the underlying OTP modal when confirm is visible */
.modal.under-modal {
  z-index: 1980;
}

/* Navbar */
.site-topbar { 
  width: 100%;
  height: 40px;
  background: var(--pb-primary);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 10px;
}

.modal-header .btn-close.modal-close {
  background-image: none !important;
  width: 34px;
  height: 34px;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: var(--pb-text);
  background-color: color-mix(in srgb, var(--pb-surface) 80%, transparent);
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
  transition: all .18s ease;
  opacity: 1;
  cursor: pointer;
}

.modal-header .btn-close.modal-close:hover {
  background-color: var(--pb-primary);
  color: var(--pb-bg);
  transform: translateY(-1px);
}

.modal-header .btn-close.modal-close:active {
  transform: translateY(0) scale(0.98);
}
.modal-header .btn-close.modal-close:focus {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pb-primary) 35%, transparent);
}

.reload-container {
  padding: 2px;
}

.reload-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
}

.reload-btn:hover {
  color: var(--pb-bg);
}

/* Footer */
footer {
  height: 40px;
  background: var(--pb-primary);
  color: #fff;
}
footer div {
  color: #fff;
}

/* Header Banner */
.header-banner {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), 
                url('/static/assets/communion/header-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
    margin-bottom: 2rem;
    font-family: 'Montserrat', sans-serif;
}

.header-banner h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.header-banner p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.9;
}

/* Form Sections */
.form-section {
    background: var(--pb-surface);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.section-title {
    color: var(--pb-text);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--pb-border);
}

/* Form Controls */
.form-control,
.form-select {
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--pb-border);
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: var(--pb-primary);
    outline: none;
}

/* Checkboxes and Radios */
.form-check {
    margin-bottom: 0.8rem;
}

.form-check-input {
    margin-top: 0.2rem;
}

.form-check-label {
    margin-left: 0.5rem;
    color: var(--pb-text);
}

/* Buttons */
.btn-primary {
    background-color: var(--pb-primary);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--pb-accent);
    color: var(--pb-text-muted);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Footer */
.footer {
    background-color: #1a1a1a;
    color: #fff;
    padding: 3rem 0;
    margin-top: 3rem;
}

.footer h5 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

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

.footer ul li {
    margin-bottom: 0.75rem;
}

.footer a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #fff;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
    text-align: center;
    color: #777;
    font-size: 0.9rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .header-banner {
        padding: 60px 0;
    }
    
    .header-banner h1 {
        font-size: 2.2rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .footer {
        text-align: center;
    }
    
    .footer .col-md-3 {
        margin-bottom: 2rem;
    }
}

.password-requirements {
  font-size: 0.875rem;
}
.requirement {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
  transition: color 0.3s ease;
}
.requirement i {
  margin-right: 0.5rem;
  font-size: 0.75rem;
}
.requirement.met {
  color: #28a745;
}
.requirement.not-met {
  color: #6c757d;
}
.requirement.met i.bi-circle::before {
  content: "\f268"; /* bi-check-circle-fill */
}

/* Password Toggle Button */
#togglePassword {
  background-color: var(--pb-surface) !important;
  border-left: none !important;
  color: var(--pb-text-muted) !important;
  padding: 0.375rem 0.75rem !important;
  transition: color 0.15s ease-in-out !important;
}

#togglePassword:hover {
  color: var(--pb-primary) !important;
}

#togglePassword:focus {
  outline: none !important;
  box-shadow: none !important;
}

#togglePassword i {
  font-size: 1.2rem !important;
}