/* style/register.css */
:root {
    --primary-color: #0A2342;
    --secondary-color: #FFD700;
    --text-dark: #333333;
    --text-light: #ffffff;
    --border-color: #e0e0e0;
    --background-light: #ffffff;
    --background-dark: #0A2342;
}

.page-register {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
}

.page-register__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.page-register__section-title {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-register__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-dark);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.page-register__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    color: var(--text-light);
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1A3A60 100%); /* Adjusted gradient for better contrast */
}

.page-register__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.page-register__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-register__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
}

.page-register__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 0 15px;
}

.page-register__main-title {
    font-size: 3.2em;
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-register__intro-text {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: #f0f0f0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-register__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--secondary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-register__cta-button:hover {
    background: #FFEB80;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Registration Form Section */
.page-register__form-section {
    padding: 80px 0;
    background-color: var(--background-light);
}

.page-register__registration-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.page-register__form-group {
    margin-bottom: 25px;
}

.page-register__form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.05em;
}

.page-register__form-input {
    width: calc(100% - 20px);
    padding: 12px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-register__form-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
    outline: none;
}

.page-register__captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-register__captcha-input {
    flex-grow: 1;
    width: auto; /* Override calc for flex item */
}

.page-register__captcha-image {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    height: 60px;
    width: 200px;
    object-fit: cover;
    flex-shrink: 0;
}

.page-register__form-checkbox {
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
}

.page-register__checkbox-input {
    margin-top: 5px;
    margin-right: 10px;
    flex-shrink: 0;
}

.page-register__checkbox-label {
    font-size: 0.95em;
    color: var(--text-dark);
}

.page-register__text-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.page-register__text-link:hover {
    text-decoration: underline;
    color: var(--secondary-color);
}

.page-register__submit-button {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.page-register__submit-button:hover {
    background: #1A3A60;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-register__login-prompt {
    text-align: center;
    margin-top: 25px;
    font-size: 1em;
    color: var(--text-dark);
}

/* Benefits Section */
.page-register__benefits-section {
    padding: 80px 0;
    background-color: var(--background-dark);
    color: var(--text-light);
}

.page-register__benefits-section .page-register__section-title {
    color: var(--secondary-color);
}

.page-register__benefits-section .page-register__section-description {
    color: #f0f0f0;
}

.page-register__benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.page-register__benefit-card {
    background: #1A3A60;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.page-register__benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.page-register__benefit-image {
    width: 100%;
    max-width: 250px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid var(--secondary-color);
}

.page-register__benefit-title {
    font-size: 1.5em;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.page-register__benefit-text {
    font-size: 1em;
    color: #e0e0e0;
}

.page-register__cta-bottom {
    text-align: center;
    margin-top: 60px;
}

/* Security Section */
.page-register__security-section {
    padding: 80px 0;
    background-color: var(--background-light);
}

.page-register__security-content {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 50px;
}

.page-register__security-text {
    flex: 1;
    font-size: 1.05em;
    color: var(--text-dark);
}

.page-register__security-text p {
    margin-bottom: 15px;
}

.page-register__security-image-wrapper {
    flex: 1;
    text-align: center;
}

.page-register__security-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* FAQ Section */
.page-register__faq-section {
    padding: 80px 0;
    background-color: var(--background-dark);
    color: var(--text-light);
}

.page-register__faq-section .page-register__section-title {
    color: var(--secondary-color);
}

.page-register__faq-section .page-register__section-description {
    color: #f0f0f0;
}

.page-register__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background: #1A3A60;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-register__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 20px;
  opacity: 0;
  color: #e0e0e0;
  font-size: 0.95em;
}

.page-register__faq-item.active .page-register__faq-answer {
  max-height: 2000px !important; /* 🚨 Use !important and sufficient value */
  padding: 20px !important;
  opacity: 1;
  background: #1A3A60;
  border-radius: 0 0 8px 8px;
}

.page-register__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--primary-color);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-light);
}

.page-register__faq-question:hover {
  background: #1A3A60;
  border-color: var(--secondary-color);
}

.page-register__faq-question:active {
  background: #2A4A70;
}

.page-register__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
  color: var(--secondary-color);
}

.page-register__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-register__faq-item.active .page-register__faq-toggle {
  color: #ffffff;
  transform: rotate(45deg); /* Change to 'x' or rotate for '−' */
}

/* Final CTA Section */
.page-register__cta-final-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--background-light);
}

.page-register__cta-final-section .page-register__section-title {
    color: var(--primary-color);
}

.page-register__cta-final-section .page-register__section-description {
    color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-register__main-title {
        font-size: 2.8em;
    }
    .page-register__intro-text {
        font-size: 1.2em;
    }
    .page-register__section-title {
        font-size: 2em;
    }
    .page-register__security-content {
        flex-direction: column;
        text-align: center;
    }
    .page-register__security-image-wrapper {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .page-register__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-register__hero-image img {
        border-radius: 8px;
    }
    .page-register__main-title {
        font-size: 2.2em;
    }
    .page-register__intro-text {
        font-size: 1em;
    }
    .page-register__cta-button {
        padding: 12px 30px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin-left: auto;
        margin-right: auto;
    }
    .page-register__section-title {
        font-size: 1.8em;
    }
    .page-register__section-description {
        font-size: 0.95em;
    }
    .page-register__registration-form {
        padding: 25px;
    }
    .page-register__captcha-image {
        width: 150px;
        height: 50px;
    }
    .page-register__form-input {
        width: 100%;
    }
    .page-register__benefits-grid {
        grid-template-columns: 1fr;
    }
    .page-register__benefit-image {
        max-width: 200px;
    }
    .page-register__security-text {
        order: 2;
    }
    .page-register__security-image-wrapper {
        order: 1;
        margin-bottom: 30px;
    }
    .page-register__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-register__faq-question h3 {
        font-size: 1em;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .page-register__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    .page-register__faq-answer {
        padding: 0 15px;
    }
    .page-register__faq-item.active .page-register__faq-answer {
        padding: 15px !important;
    }
    /* Mobile image responsiveness */
    .page-register img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-register__container, .page-register__section,
    .page-register__form-section, .page-register__benefits-section,
    .page-register__security-section, .page-register__faq-section,
    .page-register__cta-final-section {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    /* Mobile button responsiveness */
    .page-register__cta-button,
    .page-register__submit-button,
    .page-register a[class*="button"],
    .page-register a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-register__captcha-container {
        flex-wrap: wrap;
    }
    .page-register__captcha-input {
        width: 100%;
        flex-grow: 0;
    }
    .page-register__captcha-image {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .page-register__main-title {
        font-size: 1.8em;
    }
    .page-register__section-title {
        font-size: 1.5em;
    }
    .page-register__registration-form {
        padding: 20px;
    }
}