:root {
  --primary-color: #b01f1f;
  --primary-hover: #670d0d;
  --secondary-color: #003049;
  --text-color: #333;
  --bg-color: #f9f9f9;
  --white: #ffffff;
  --gray-light: #e0e0e0;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

html {
  font-size: 20px;
}

body {
  font-family: "Montserrat", sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

.container.wider {
  max-width: 1920px;
}

/* Header */
.main-header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 15px 0;
}

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

.logo img {
  height: 100px;
  width: auto;
}

.nav-list {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: center;
}

.nav-list li {
  line-height: 1.1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-list a {
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--primary-color);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  height: 100vh;
  background-color: var(--white);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  transition: var(--transition);
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
}

.mobile-menu.active {
  right: 0;
}

.close-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-link {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-color);
}

.backgrounds {
  width: 100vw;
  height: 80vh;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.backgrounds img {
  height: 100%;
  width: auto;
  transition: all 0.6s ease-in-out;
  filter: blur(0) brightness(0.9) grayscale(0.1);
}

.backgrounds.active img {
  filter: blur(7px) brightness(0.5) grayscale(0.3);
}

/* Hero Form Section */
.hero-form-section {
  min-height: 80vh; /* Almost full screen */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #111;
  padding: 40px 0;
  position: relative;
}

.form-wrapper {
  background: var(--white);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 700px;
  position: relative;
  overflow: hidden;
  border-radius: 2rem;
}
.form-wrapper.active {
  border: 5px solid #b01f1f;
}

/* Progress Bar */
.progress-container {
  width: 100%;
  height: 6px;
  background-color: var(--gray-light);
  border-radius: 3px;
  margin-bottom: 30px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%; /* JS will update this */
  background-color: var(--primary-color);
  transition: width 0.4s ease;
}

/* Form Stages */
.form-stage {
  display: none;
  animation: fadeIn 0.5s ease;
}

.form-stage.active {
  display: block;
}

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

.stage-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
  font-weight: 800;
}

.subtitle {
  margin-bottom: 20px;
  color: #666;
}

.form-stage {
  font-size: 1.1rem;
}

.form-stage p {
  margin-bottom: 0.9rem;
}

/* Inputs */
.input-group {
  margin-bottom: 20px;
  text-align: left;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
  font-size: 1rem;
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 15px;
  font-size: 1.1rem;
  border: 2px solid var(--gray-light);
  border-radius: 10px;
  transition: var(--transition);
  font-family: inherit;
}

.input-group textarea {
  resize: vertical;
  min-height: 100px;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 4px rgba(214, 40, 40, 0.1);
}

.input-group .char-counter {
  display: block;
  margin-top: 5px;
  font-size: 0.85rem;
  color: #888;
  text-align: right;
}

/* Conditional Fields */
.conditional-field {
  margin-top: 10px;
  padding-left: 15px;
  border-left: 3px solid var(--primary-color);
}

.hidden {
  display: none !important;
}

/* Radio Cards (Contact Pref) */
.radio-group-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.radio-card {
  cursor: pointer;
  position: relative;
}

.radio-card input {
  position: absolute;
  opacity: 0;
}

.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 2px solid var(--gray-light);
  border-radius: 10px;
  transition: var(--transition);
  text-align: center;
  height: 100%;
}

.card-content i {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.radio-card input:checked + .card-content {
  border-color: var(--primary-color);
  background-color: rgba(214, 40, 40, 0.05);
}

.radio-card input:checked + .card-content i {
  color: var(--primary-color);
}

/* Checkbox Pills (Interests) */
.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
}

.checkbox-pill {
  cursor: pointer;
}

.checkbox-pill input {
  display: none;
}

.checkbox-pill {
  padding: 10px 20px;
  background-color: var(--gray-light);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  user-select: none;
}

.checkbox-pill:hover {
  background-color: #d1d1d1;
}

.checkbox-pill input:checked + span, /* If I wrapped text in span, but I didn't in HTML, so targeting label directly via :has or just style based on input state if possible. CSS :has is new. Let's use simple approach: input inside label affects label? No, input is hidden. */
/* Actually, standard way: input:checked + span. I put text directly in label. Let's adjust HTML or use :has if supported, or just simple JS class toggle. 
   Wait, standard CSS way: label { ... } input:checked { ... } doesn't work if input is inside.
   I will use the :has selector which is widely supported now, or just simple background change on the label itself if I can target it.
   Actually, better approach for compatibility: 
   <label> <input> <span>Text</span> </label> 
   I'll stick to what I wrote in HTML: <label><input> Text</label>. 
   I will use :has() selector as it is supported in modern browsers (Chrome 105+, Safari 15.4+, Firefox 121+).
*/
.checkbox-pill:has(input:checked) {
  background-color: var(--primary-color);
  color: var(--white);
  box-shadow: 0 4px 10px rgba(214, 40, 40, 0.3);
}

/* Fallback for older browsers if needed, but :has is good for "modern landing page". */

/* Buttons */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  outline: none;
}

.btn-next,
.btn-submit {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto; /* Push to right if alone */
}

.btn-next:hover,
.btn-submit:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(214, 40, 40, 0.3);
}

.btn-prev {
  background-color: transparent;
  color: #777;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 1rem;
}

.btn-prev:hover {
  color: var(--text-color);
}

/* Success Message */
.form-success {
  text-align: center;
  padding: 40px 20px;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-icon {
  font-size: 5rem;
  color: #2a9d8f;
  margin-bottom: 20px;
}

.form-success h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* Video Section */
.video-section {
  padding: 80px 0;
  background-color: var(--white);
  text-align: center;
}

.video-section .container {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.video-wrapper {
  flex-grow: 1;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 40px;
  font-weight: 800;
  color: var(--secondary-color);
}

.video-wrapper {
  max-width: 1920px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.video-wrapper video {
  width: 100%;
  display: block;
}

/* Info Section */
.info-section {
  padding: 80px 0;
  background-color: #f4f4f4;
}
.info-section.reverse {
  padding: 80px 0;
  background-color: #cccccc;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.info-image {
  overflow: hidden;
  border-radius: 1rem;
}

.info-image img {
  width: 100%;
  box-shadow: var(--shadow);
}

.info-image img#chipi {
  height: 30vh;
  width: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.3);
}

.info-text h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--secondary-color);
  font-weight: 800;
  line-height: 1.2;
}

.info-text p {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #555;
}

.btn-outline {
  display: inline-block;
  padding: 12px 30px;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: 700;
  border-radius: 50px;
  margin-top: 10px;
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Footer */
.main-footer {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 60px 0 20px;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 30px;
}

.footer-content > * {
  margin: 0 2rem;
}

.footer-logo {
  height: 150px;
}

.footer-pts-fitu-logo {
  height: 200px;
}

.footer-lid-logo {
  height: 60px;
}

.footer-content img {
  height: 100%;
  width: auto;
  opacity: 0.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  font-size: 1rem;
}

.footer-links a {
  color: #ccc;
  font-weight: 500;
  line-height: 1;
}

.footer-links a:hover {
  color: var(--white);
}

.social-icons {
  display: flex;
  gap: 20px;
}

.social-icons a {
  font-size: 2.5rem;
  color: var(--white);
  opacity: 0.8;
}

.social-icons a:hover {
  opacity: 1;
  transform: translateY(-3px);
}

.copyright {
  margin: 60px 0;
  font-size: 0.9rem;
  opacity: 0.5;
}

.subfooter {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.subfooter > *:first-child {
  margin-right: 40px;
}

.subfooter.vertical {
  flex-direction: column;
}

.subfooter.vertical > *:first-child {
  margin-right: 0;
  margin-bottom: 20px;
}

.spacer {
  display: block;
  width: 150px;
  height: 100%;
  flex-shrink: 0;
  background-color: #111;
}

.social-icons-mobile {
  display: flex;
  margin-top: 20px;
  justify-content: space-around;
  font-size: 2rem;
}

/* Responsive */
@media (max-width: 1400px) {
  .logo {
    margin-right: 100px;
  }

  .footer-lid-logo {
    height: 50px;
  }

  .footer-pts-fitu-logo {
    height: 150px;
  }

  .footer-logo {
    height: 150px;
  }

  .subfooter {
    flex-direction: column;
  }

  .subfooter > * {
    margin: 20px 0;
  }
}

@media (max-width: 1200px) {
  .hero-form-section {
    padding-top: 0;
    align-items: flex-end;
    background-color: #b01f1f;
  }
  .backgrounds {
    height: 90vh;
    top: 0;
    transform: none;
  }

  .backgrounds {
    flex-direction: column;
  }

  .backgrounds > *:nth-child(3) {
    display: none;
  }

  .spacer {
    display: none;
  }
}

@media (max-width: 1100px) {
  .nav-list a {
    font-size: 0.75rem;
  }

  .logo {
    margin: auto;
  }
  .backgrounds {
    height: 65vh;
  }
  .footer-lid-logo {
    height: 50px;
  }

  .footer-pts-fitu-logo {
    height: 150px;
  }

  .footer-logo {
    height: 100px;
  }

  .nav-list {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .mobile-menu.active {
    max-width: 500px;
  }
}

@media (max-width: 1000px) {
  .backgrounds {
    height: 50vh;
  }

  .split-layout {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
  }
}

@media (min-width: 769px) {
  .img-mobile {
    display: none;
  }
}

@media (max-width: 768px) {
  .logo img {
    height: 75px;
    width: auto;
  }
  .img-mobile {
    width: 100%;
    margin-top: 2rem;
    border-radius: 1rem;
    margin-top: auto;
  }
  .img-mobile:last-of-type{
    margin-top: 1rem;
  }

  .backgrounds {
    display: none;
  }
  .nav-list {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .hero-form-section {
    padding: 20px 0;
    align-items: flex-start; /* Top align on mobile */
  }
  .form-container {
    min-height: calc(100vh - 150px);
  }

  .form-wrapper {
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    height: 100%;
    min-height: calc(100vh - 150px);
    display: flex;
    flex-direction: column;
  }
  .form-wrapper.active {
    border: none;
  }

  .hero-form-section {
    background: var(--white);
  }

  .form-stage {
    margin-bottom: 2rem;
  }

  .split-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .section-title,
  .info-text h2 {
    font-size: 2rem;
    line-height: 1.1;
    text-align: center;
    margin-bottom: 1.5rem;
  }

  .info-text {
    padding: 0 10px;
    text-align: center;
  }

  .info-text p {
    text-align: justify;
  }

  .stage-title {
    font-size: 1.5rem;
    line-height: 1.2;
  }

  .info-image {
    overflow: hidden;
    border-radius: 1rem;
  }

  .info-image img {
    height: 30vh;
    width: 100%;
    object-fit: cover;
    object-position: center top;
    transform: scale(1.2);
  }

  .info-image img#chipi {
    height: 30vh;
    width: 100%;
    object-fit: cover;
    object-position: center top;
    transform: scale(1.5);
  }
  .subfooter {
    margin-top: 1rem;
    gap: 2rem;
  }

  .social-icons{
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
  }

  .social-icons a{
    font-size: 2rem;
  }

  .subfooter div.footer-pts-fitu-logo {
    margin-right: 0;
  }

  .footer-content {
    flex-direction: column;
  }

  .container.split-layout.reverse .info-image {
    order: 1;
  }
  .container.split-layout.reverse .info-text {
    order: 2;
  }
  .container.split-layout.reverse .info-text p {
    color: #000;
  }

  .copyright {
    padding: 1rem;
  }

}
