/* style/login.css */

/* Variables */
:root {
    --primary-color: #E53935;
    --secondary-color: #FF5A4F;
    --text-main-color: #333333;
    --card-bg-color: #FFFFFF;
    --border-color: #E0E0E0;
    --background-page-color: #F5F7FA; /* Specific background for this page */
    --gradient-button: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main-color);
    background-color: var(--background-page-color); /* Use page-specific background */
    padding-top: 10px; /* Small top padding, body handles header offset */
}

/* General container styles */
.page-login__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Hero Section */
.page-login__hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 40px;
    background-color: var(--background-page-color); /* Ensure light background for text */
    padding-bottom: 40px;
}

.page-login__hero-image-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
}

.page-login__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    filter: none; /* Ensure no image filters */
}

.page-login__hero-content {
    max-width: 900px;
    padding: 0 20px;
}

.page-login__main-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 15px;
    max-width: 100%; /* Ensure H1 does not overflow */
}

.page-login__description {
    font-size: 18px;
    color: var(--text-main-color);
    margin-bottom: 30px;
}

/* Form Section */
.page-login__form-section {
    padding: 60px 0;
    background-color: var(--background-page-color);
}

.page-login__form-card {
    background-color: var(--card-bg-color);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 500px;
    margin: 0 auto;
    box-sizing: border-box;
}

.page-login__form-title {
    font-size: 30px;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 10px;
}

.page-login__form-subtitle {
    font-size: 16px;
    color: var(--text-main-color);
    text-align: center;
    margin-bottom: 30px;
}

.page-login__form-group {
    margin-bottom: 20px;
}

.page-login__form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main-color);
}

.page-login__form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
    color: var(--text-main-color);
    background-color: #fcfcfc;
}

.page-login__form-input::placeholder {
    color: #999;
}

.page-login__form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.page-login__forgot-password-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-login__forgot-password-link:hover {
    color: var(--secondary-color);
}

.page-login__remember-me {
    display: flex;
    align-items: center;
}

.page-login__checkbox {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.page-login__checkbox-label {
    color: var(--text-main-color);
}

.page-login__btn-primary {
    display: block;
    width: 100%;
    padding: 15px 25px;
    background: var(--gradient-button);
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    filter: none; /* Ensure no image filters */
}

.page-login__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 57, 53, 0.4);
}

.page-login__register-link-wrapper {
    text-align: center;
    margin-top: 25px;
    font-size: 16px;
    color: var(--text-main-color);
}

.page-login__register-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-login__register-link:hover {
    color: var(--secondary-color);
}

/* Benefits Section */
.page-login__benefits-section {
    background-color: var(--primary-color); /* Dark background */
    padding: 60px 0;
    color: #ffffff; /* Light text */
}

.page-login__section-title {
    font-size: 36px;
    text-align: center;
    margin-bottom: 20px;
    color: #ffffff;
}

.page-login__section-description {
    font-size: 18px;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-login__benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.page-login__benefit-card {
    background-color: var(--card-bg-color);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: var(--text-main-color); /* Dark text on light card */
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.page-login__benefit-card:hover {
    transform: translateY(-5px);
}

.page-login__benefit-icon {
    width: 100%; /* Occupy card main area */
    height: auto;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    filter: none; /* Ensure no image filters */
}

.page-login__benefit-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.page-login__benefit-text {
    font-size: 15px;
    margin-bottom: 20px;
    flex-grow: 1; /* Push button to bottom */
}

.page-login__btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background: #ffffff;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    filter: none; /* Ensure no image filters */
}

.page-login__btn-secondary:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

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

.page-login__cta-title {
    font-size: 38px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-login__cta-description {
    font-size: 20px;
    color: var(--text-main-color);
    margin-bottom: 40px;
}

.page-login__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-login__cta-button {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

/* FAQ Section */
.page-login__faq-section {
    padding: 60px 0;
    background-color: var(--background-page-color);
}

.page-login__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

details.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg-color);
}
details.page-login__faq-item summary.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-login__faq-item summary.page-login__faq-question::-webkit-details-marker {
  display: none;
}
details.page-login__faq-item summary.page-login__faq-question:hover {
  background: #f5f5f5;
}
.page-login__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-main-color);
}
.page-login__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-login__faq-item .page-login__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: var(--text-main-color);
}
.page-login__faq-answer p {
    margin: 0;
    padding: 0;
}
.page-login__small-cta-button {
    margin-top: 15px;
    font-size: 14px;
    padding: 8px 15px;
    border-radius: 4px;
}

/* --- Responsive Styles --- */

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .page-login {
        padding-top: 10px !important; /* Small top padding for mobile */
        font-size: 16px;
        line-height: 1.6;
    }

    .page-login__container {
        padding: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Hero Section */
    .page-login__hero-section {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }

    .page-login__hero-image-wrapper {
        margin-bottom: 15px;
    }

    .page-login__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-login__main-title {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .page-login__description {
        font-size: 16px;
        margin-bottom: 20px;
    }

    /* Form Section */
    .page-login__form-section {
        padding: 30px 0;
    }

    .page-login__form-card {
        padding: 25px;
        max-width: 100%;
    }

    .page-login__form-title {
        font-size: 24px;
    }

    .page-login__form-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .page-login__form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 20px;
    }

    .page-login__login-button,
    .page-login__btn-primary,
    .page-login__btn-secondary,
    .page-login a[class*="button"],
    .page-login 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;
        font-size: 16px;
    }
    
    .page-login__register-link-wrapper {
        margin-top: 20px;
        font-size: 15px;
    }

    /* Benefits Section */
    .page-login__benefits-section {
        padding: 30px 0;
    }

    .page-login__section-title {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .page-login__section-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-login__benefits-grid {
        grid-template-columns: 1fr; /* Single column for benefits on mobile */
        gap: 20px;
    }

    .page-login__benefit-card {
        padding: 20px;
    }

    .page-login__benefit-icon {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        max-height: 150px;
    }

    .page-login__benefit-title {
        font-size: 20px;
    }

    .page-login__benefit-text {
        font-size: 14px;
    }

    /* CTA Section */
    .page-login__cta-section {
        padding: 40px 0;
    }

    .page-login__cta-title {
        font-size: 30px;
    }

    .page-login__cta-description {
        font-size: 17px;
        margin-bottom: 30px;
    }

    .page-login__cta-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-login__cta-button {
        min-width: unset;
        max-width: 100%;
    }

    /* FAQ Section */
    .page-login__faq-section {
        padding: 30px 0;
    }

    details.page-login__faq-item summary.page-login__faq-question { padding: 15px; }
    .page-login__faq-qtext { font-size: 15px; }
    details.page-login__faq-item .page-login__faq-answer {
        padding: 0 15px 15px;
    }
    .page-login__small-cta-button {
        font-size: 13px;
        padding: 6px 12px;
    }

    /* General image and button container rules for mobile */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-login__section,
    .page-login__card,
    .page-login__container,
    .page-login__form-card,
    .page-login__benefits-grid,
    .page-login__cta-buttons,
    .page-login__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .page-login__main-title {
        font-size: 36px;
    }
    .page-login__description {
        font-size: 17px;
    }
    .page-login__form-card {
        max-width: 450px;
    }
    .page-login__benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    .page-login__section-title {
        font-size: 32px;
    }
    .page-login__cta-title {
        font-size: 34px;
    }
    .page-login__cta-description {
        font-size: 18px;
    }
    .page-login__cta-buttons {
        gap: 15px;
    }
}