@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap");

:root {
  /* Branding 2D Formazione */
  --primary: #e30613;
  /* Official Logo Red */
  --primary-dark: #b8050f;
  --primary-light-bg: rgba(227, 6, 19, 0.08);
  --secondary: #1a202c;
  /* Dark Slate */
  --accent: #ffd700;
  /* Gold/Yellow for highlights */
  --bg-color: #f8f9fa;
  --text-color: #2d3748;
  --text-light: #718096;
  --white: #ffffff;
  --radius: 16px;
  --shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --glass-border: 1px solid rgba(255, 255, 255, 0.3);
}

textarea#message {
  font-family: "Montserrat";
  width: 100%;
  border-radius: 10px;
  padding: 19px;
  font-size: 16px;
}

tr td button.btn-icon {
  border: 0px !important;
  background-color: transparent;
  padding: 5px;
  font-size: 14px !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Montserrat", sans-serif;
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  color: var(--text-color);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 0;
}
footer.main-footer {
  width: 48%;
}

/* Container Styles for Mobile & Desktop */
.container {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow);
  border: var(--glass-border);
  transition: all 0.3s ease;
}

/* Mobile First (Default) */
@media (max-width: 767px) {
  .logo-area {
    width: 100%;
    margin: 0px;
    padding-left: 26px;
    padding-top: 20px;
  }
  body {
    padding: 0;
    align-items: flex-start;
  }

  .container {
    min-height: 100vh;
    border-radius: 0;
    max-width: 100%;
  }
  footer.main-footer {
    width: 100% !important;
  }
}

.main-footer .container {
  text-align: center;
  margin-top: 0px;
}

.main-footer p {
  margin-bottom: 0;
}

/* Desktop / Tablet Extension */
@media (min-width: 768px) {
  .container {
    max-width: 900px;
    /* Extended View */
    border-radius: var(--radius);
    margin: 2rem auto;
    min-height: auto;
  }

  .main-footer .container {
    max-width: 100%;
    text-align: center;
    margin-top: 0px;
  }

  /* Center form content inside the wider container */
  form,
  .logo-area,
  .progress-bar-container,
  #loginForm,
  .step {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Make the title area span full if needed or centered */
  h1,
  h2,
  h3 {
    text-align: center;
  }
}

h1,
h2,
h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

h1 {
  font-weight: 700;
  font-size: 2.2rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--secondary);
  /* Darker heading for sections looks cleaner */
}

h2 i {
  color: var(--primary);
  /* Icon keeps branding */
  margin-left: 0.5rem;
}

p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

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

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
  font-size: 0.95rem;
}

input[type="email"],
input[type="text"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  background-color: var(--white);
  color: var(--text-color);
}

textarea {
  min-height: 200px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.1);
}

.btn {
  display: block;
  width: 100%;
  padding: 1rem;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 6px rgba(227, 6, 19, 0.2);
}

.btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(227, 6, 19, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  background-color: var(--text-light);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  box-shadow: none;
}

.btn-secondary:hover {
  background-color: var(--primary-light-bg);
  color: var(--primary-dark);
  box-shadow: none;
}

.logo-area {
  text-align: center;
  margin-bottom: 0rem;
}

/* Wizard Steps */
.step {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.39, 0.575, 0.565, 1);
}

.step.active {
  display: block;
}

.progress-bar-container {
  background-color: #edf2f7;
  border-radius: 100px;
  height: 6px;
  margin-bottom: 2.5rem;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #ff4b59 100%);
  width: 0%;
  transition: width 0.4s ease;
  border-radius: 100px;
}

/* Selection Cards (Years, etc) */
.card-selection {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  /* allow wrapping on very small screens */
}

.selection-option {
  flex: 1;
  min-width: 80px;
  padding: 1.5rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  color: var(--text-color);
}

.selection-option:hover {
  border-color: #cbd5e0;
  transform: translateY(-2px);
}

.selection-option.selected {
  border-color: var(--primary);
  background-color: var(--primary-light-bg);
  /* Use the soft pink/red tint */
  color: var(--primary);
  /* Red text on light pink background - good contrast */
  font-weight: 700;
  transform: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e0;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
  background-color: var(--primary);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Modal CSS */
.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);
  align-items: center;
  justify-content: center;
}

.modal.flex {
  display: flex;
}

.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 2rem;
  border: 1px solid #888;
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 1.5rem;
  top: 1rem;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.modal-body {
  margin-bottom: 2rem;
  line-height: 1.6;
}
