/* style/login.css */

/* --- Base Styles --- */
.page-login {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light background */
    background-color: #ffffff; /* Explicitly set for clarity */
}

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

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

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

/* --- Hero Section --- */
.page-login__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 */
    background: linear-gradient(135deg, #e0f2f7, #ffffff); /* Light gradient background */
}

.page-login__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-login__hero-image {
    width: 100%;
    margin-bottom: 30px;
    overflow: hidden; /* Ensure image doesn't overflow */
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.page-login__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 12px;
}

.page-login__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 600px; /* Constrain content width */
    padding: 20px;
}

.page-login__hero-content h1 {
    font-size: 42px;
    color: #000000;
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: 700;
}

.page-login__intro-text {
    font-size: 20px;
    color: #555555;
    margin-bottom: 30px;
}

/* --- Login Card --- */
.page-login__login-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin-top: 30px;
    width: 100%;
    max-width: 450px;
    box-sizing: border-box;
    border: 1px solid #e0e0e0;
}

.page-login__login-title {
    font-size: 28px;
    color: #26A9E0;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.page-login__form-group {
    margin-bottom: 25px;
    text-align: left;
}

.page-login__form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: #333333;
    font-weight: 500;
}

.page-login__form-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-login__form-input:focus {
    border-color: #26A9E0;
    box-shadow: 0 0 0 3px rgba(38, 169, 224, 0.2);
    outline: none;
}

.page-login__forgot-password {
    display: block;
    text-align: right;
    font-size: 14px;
    color: #26A9E0;
    text-decoration: none;
    margin-bottom: 25px;
    transition: color 0.3s ease;
}

.page-login__forgot-password:hover {
    color: #1a7bbd;
    text-decoration: underline;
}

.page-login__login-button {
    width: 100%;
    padding: 15px 25px;
    background: #EA7C07; /* Custom color for login button */
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-sizing: border-box; /* Ensure padding doesn't make button overflow */
}

.page-login__login-button:hover {
    background: #d46b00;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-login__register-prompt {
    text-align: center;
    margin-top: 25px;
    font-size: 15px;
    color: #666666;
}

.page-login__register-link {
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-login__register-link:hover {
    color: #1a7bbd;
    text-decoration: underline;
}

/* --- Benefits Section --- */
.page-login__benefits-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

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

.page-login__benefit-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eeeeee;
}

.page-login__benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.page-login__benefit-icon {
    width: 100%; /* Ensure images are responsive within card */
    max-width: 150px; /* Constrain icon size */
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    object-fit: cover;
}

.page-login__benefit-title {
    font-size: 22px;
    color: #26A9E0;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-login__benefit-text {
    font-size: 16px;
    color: #555555;
    line-height: 1.7;
}

/* --- App Download Section --- */
.page-login__app-download-section {
    padding: 80px 0;
    background: #26A9E0; /* Dark background for brand color */
    color: #ffffff; /* White text for contrast */
}

.page-login__app-download-section .page-login__section-title {
    color: #ffffff;
}

.page-login__app-download-section .page-login__section-description {
    color: #e0f2f7;
}

.page-login__app-download-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.page-login__app-image {
    width: 100%;
    max-width: 600px; /* Constrain app image size */
    height: auto;
    margin-bottom: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

.page-login__app-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    justify-content: center;
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
}

.page-login__btn-primary,
.page-login__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons are responsive */
    flex-grow: 1; /* Allow buttons to grow in flex container */
    text-align: center;
}

.page-login__btn-primary {
    background: #EA7C07; /* Custom color for primary button */
    color: #ffffff;
    border: 2px solid #EA7C07;
}

.page-login__btn-primary:hover {
    background: #d46b00;
    border-color: #d46b00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-login__btn-secondary {
    background: #ffffff;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}

.page-login__btn-secondary:hover {
    background: #e0f2f7;
    color: #1a7bbd;
    border-color: #1a7bbd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* --- FAQ Section --- */
.page-login__faq-section {
    padding: 80px 0;
    background-color: #f0f5f8;
}

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

.page-login__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* FAQ default state - answer hidden */
.page-login__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;
    background: #f9f9f9;
    color: #555555;
}

/* FAQ expanded state - ⚠️ Use!important and sufficiently large max-height */
.page-login__faq-item.active .page-login__faq-answer {
    max-height: 2000px !important; /* ⚠️ Use!important to ensure priority, value large enough for any content */
    padding: 20px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 8px 8px;
}

/* Question style */
.page-login__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-login__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-login__faq-question:active {
    background: #eeeeee;
}

/* Question title style */
.page-login__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: #333333;
    pointer-events: none; /* Prevent h3 from blocking click event */
}

/* Toggle icon */
.page-login__faq-toggle {
    font-size: 28px; /* Larger for better visibility */
    font-weight: bold;
    line-height: 1;
    color: #26A9E0; /* Brand color for toggle */
    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: 32px; /* Larger touch target */
    height: 32px;
    border-radius: 50%;
    background-color: #e0f2f7; /* Light background for icon */
}

.page-login__faq-item.active .page-login__faq-toggle {
    color: #ffffff;
    background-color: #26A9E0; /* Brand color when active */
    transform: rotate(180deg); /* Rotate for minus sign visual */
}

/* --- CTA Section --- */
.page-login__cta-section {
    padding: 80px 0;
    background: #26A9E0;
    color: #ffffff;
    text-align: center;
}

.page-login__cta-section .page-login__section-title {
    color: #ffffff;
}

.page-login__cta-section .page-login__section-description {
    color: #e0f2f7;
    margin-bottom: 50px;
}

.page-login__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* --- Global Button Styles for Responsiveness --- */
.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%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center; /* Ensure text is centered within button */
}

.page-login__app-buttons,
.page-login__cta-buttons,
.page-login__button-group,
.page-login__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  display: flex; /* Ensure flex properties are applied */
  justify-content: center;
  gap: 20px;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .page-login__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-login__hero-content h1 {
        font-size: 30px;
    }

    .page-login__intro-text {
        font-size: 16px;
    }

    .page-login__login-card {
        padding: 30px 20px;
        margin-top: 20px;
    }

    .page-login__login-title {
        font-size: 24px;
        margin-bottom: 25px;
    }

    .page-login__form-input {
        padding: 12px 15px;
        font-size: 15px;
    }

    .page-login__login-button {
        padding: 12px 20px;
        font-size: 16px;
    }

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

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

    .page-login__benefits-section,
    .page-login__app-download-section,
    .page-login__faq-section,
    .page-login__cta-section {
        padding: 50px 0;
    }

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

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

    .page-login__app-image {
        max-width: 100%;
        width: 100%;
        height: auto;
        margin-bottom: 30px;
    }
    
    .page-login__app-buttons,
    .page-login__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px;
    }

    .page-login__btn-primary,
    .page-login__btn-secondary {
        padding: 12px 20px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-login__faq-question {
        padding: 15px;
    }

    .page-login__faq-question h3 {
        font-size: 16px;
    }

    .page-login__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
        margin-left: 10px;
    }

    .page-login__faq-item.active .page-login__faq-answer {
        padding: 15px !important;
    }

    /* Mobile specific image sizing for content images */
    .page-login img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    .page-login__section,
    .page-login__card,
    .page-login__container,
    .page-login__benefits-grid > div { /* Target direct children of grid for padding */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-login__benefits-grid {
        padding-left: 15px;
        padding-right: 15px;
    }
}