/**
 * FINTC Theme - Subpages Common Styles
 * Styles for Volunteering, Baptism, Small Groups, Become a Member, Salvation, Potluck, Battleground pages
 */

/* ========================================
   HERO BANNER
   ======================================== */

.subpage-template {
    background-color: var(--color-white);
    padding-top: var(--header-height);
}

.subpage-hero {
    position: relative;
    height: 50vh;
    min-height: 400px;
    max-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
}

.subpage-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.subpage-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.subpage-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
}

.subpage-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--spacing-xl);
    max-width: 900px;
}

.subpage-hero-title {
    font-size: var(--font-size-5xl);
    font-weight: 700;
    color: white;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.subpage-hero-subtitle {
    font-size: var(--font-size-xl);
    color: rgba(255,255,255,0.9);
    font-weight: 400;
}

/* ========================================
   SECTION STYLES
   ======================================== */

.subpage-section {
    padding: 0;
}

.subpage-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
    align-items: stretch;
}

/* Image positioning with order */
.subpage-section-grid.image-left .subpage-section-image {
    order: 1;
}

.subpage-section-grid.image-left .subpage-section-content {
    order: 2;
}

.subpage-section-grid.image-right .subpage-section-content {
    order: 1;
}

.subpage-section-grid.image-right .subpage-section-image {
    order: 2;
}

/* Section Image */
.subpage-section-image {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
    min-height: 500px;
    max-width: none;
}

.subpage-section-grid.image-left .subpage-section-image {
    justify-self: end;
}

.subpage-section-grid.image-right .subpage-section-image {
    justify-self: start;
}

.subpage-section-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform var(--transition-slow);
}

.subpage-section:hover .subpage-section-image img {
    transform: scale(1.05);
}

/* Section Content */
.subpage-section-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--spacing-3xl);
    max-width: 640px;
    width: 100%;
}

.subpage-section-grid.image-right .subpage-section-content {
    justify-self: end;
}

.subpage-section-grid.image-left .subpage-section-content {
    justify-self: start;
}

.subpage-section-content h2 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
}

.subpage-section-content p {
    font-size: var(--font-size-lg);
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.subpage-section-content p:last-of-type {
    margin-bottom: var(--spacing-xl);
}

/* Section Buttons */
.subpage-section-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

/* ========================================
   SECTION COLOR VARIANTS
   ======================================== */

/* Sand Background */
.subpage-section-sand {
    background-color: var(--color-sand);
}

.subpage-section-sand .subpage-section-content h2 {
    color: var(--color-dark);
}

.subpage-section-sand .subpage-section-content p {
    color: var(--color-text);
}

/* White Background */
.subpage-section-white {
    background-color: var(--color-white);
}

.subpage-section-white .subpage-section-content h2 {
    color: var(--color-dark);
}

.subpage-section-white .subpage-section-content p {
    color: var(--color-text);
}

/* Dark Background */
.subpage-section-dark {
    background-color: var(--color-dark);
}

.subpage-section-dark .subpage-section-content h2 {
    color: white;
}

.subpage-section-dark .subpage-section-content p {
    color: rgba(255, 255, 255, 0.85);
}

.subpage-section-dark .subpage-section-content li,
.subpage-section-dark .feature-list li {
    color: rgba(255, 255, 255, 0.9);
}

.subpage-section-dark .btn-outline-light,
.subpage-section-dark .btn-outline-dark {
    color: var(--color-white);
    border-color: var(--color-white);
    border-radius: 999px;
}

.subpage-section-dark .btn-outline-light:hover,
.subpage-section-dark .btn-outline-dark:hover {
    background-color: var(--color-white);
    color: var(--color-dark);
}

/* ========================================
   QUOTE SECTION
   ======================================== */

.subpage-quote-section {
    padding: var(--spacing-4xl) 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.subpage-quote-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

.subpage-quote-icon {
    display: block;
    font-size: 5rem;
    line-height: 1;
    opacity: 0.5;
    font-family: Georgia, serif;
    margin-bottom: var(--spacing-md);
}

.subpage-quote-content blockquote {
    font-size: var(--font-size-2xl);
    font-weight: 500;
    font-style: italic;
    line-height: 1.6;
    margin: 0 0 var(--spacing-lg);
}

.subpage-quote-content cite {
    font-size: var(--font-size-lg);
    font-style: normal;
    opacity: 0.8;
}

/* ========================================
   ROLES/FEATURES GRID SECTION
   ======================================== */

.subpage-roles-section {
    padding: var(--spacing-4xl) 0;
    background-color: var(--color-white);
}

.subpage-roles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.subpage-role-card {
    background: var(--color-sand);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    text-align: center;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.subpage-role-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.subpage-role-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: white;
}

.subpage-role-icon svg {
    width: 36px;
    height: 36px;
}

.subpage-role-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: var(--spacing-sm);
}

.subpage-role-card p {
    font-size: var(--font-size-base);
    color: var(--color-text);
    line-height: 1.7;
    margin: 0;
}

/* Section title centered */
.section-title-centered {
    text-align: center;
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: var(--spacing-md);
}

.section-subtitle-centered {
    text-align: center;
    font-size: var(--font-size-lg);
    color: var(--color-text);
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
}

/* Special styles for schedule text */
.potluck-schedule,
.battleground-schedule {
    font-size: var(--font-size-xl) !important;
    font-weight: 600 !important;
    color: inherit;
}

.contact-email a {
    color: #667eea;
    font-size: var(--font-size-lg);
    font-weight: 600;
    text-decoration: none;
}

.contact-email a:hover {
    text-decoration: underline;
}

.subpage-section-dark .contact-email a {
    color: white;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

@media (max-width: 992px) {
    .subpage-roles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .subpage-hero {
        height: auto;
        min-height: 0;
        max-height: none;
    }

    .subpage-hero-image img {
        height: auto;
        object-position: center;
    }

    .subpage-hero-title {
        font-size: var(--font-size-3xl);
    }

    .subpage-hero-subtitle {
        font-size: var(--font-size-lg);
    }

    .subpage-section-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .subpage-section-grid.image-left .subpage-section-image,
    .subpage-section-grid.image-right .subpage-section-image {
        order: 1;
    }

    .subpage-section-grid.image-left .subpage-section-content,
    .subpage-section-grid.image-right .subpage-section-content {
        order: 2;
    }

    .subpage-section-image {
        height: auto;
        min-height: 300px;
        max-width: none;
        background-size: cover;
        background-position: center;
    }

    .subpage-section-image img {
        object-fit: cover;
        object-position: center;
    }

    .subpage-section-content {
        padding: var(--spacing-xl);
    }

    .subpage-section-content h2 {
        font-size: var(--font-size-2xl);
    }

    .subpage-roles-grid {
        grid-template-columns: 1fr;
    }

    .subpage-quote-content blockquote {
        font-size: var(--font-size-xl);
    }

    .subpage-quote-section {
        padding: var(--spacing-3xl) 0;
    }

    .schedule-highlight {
        flex-direction: column;
        text-align: center;
    }

    .give-methods-grid {
        grid-template-columns: 1fr;
    }

    .bank-details {
        padding: var(--spacing-md);
    }
}

/* ========================================
   SCHEDULE HIGHLIGHT
   ======================================== */

.schedule-highlight {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: rgba(102, 126, 234, 0.1);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    margin: var(--spacing-lg) 0;
    border-left: 4px solid #667eea;
}

.schedule-highlight-dark {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: white;
}

.schedule-icon {
    font-size: 2.5rem;
}

.schedule-details {
    display: flex;
    flex-direction: column;
}

.schedule-details strong {
    font-size: var(--font-size-lg);
    color: var(--color-dark);
}

.schedule-highlight-dark .schedule-details strong {
    color: white;
}

.schedule-details span {
    font-size: var(--font-size-base);
    color: var(--color-text);
}

.schedule-highlight-dark .schedule-details span {
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   GIVE PAGE SPECIFIC STYLES
   ======================================== */

.give-method-card {
    text-align: center;
}

.give-method-value {
    font-size: var(--font-size-xl) !important;
    font-weight: 700 !important;
    color: #667eea !important;
    margin-bottom: var(--spacing-sm) !important;
}

.bank-details {
    background: rgba(255, 255, 255, 0.1);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    margin-top: var(--spacing-lg);
}

.bank-details p {
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-base);
}

.bank-details p:last-child {
    margin-bottom: 0;
}

/* ========================================
   COMMUNITY PAGE SPECIFIC STYLES
   ======================================== */

.program-subtitle {
    font-size: var(--font-size-lg) !important;
    font-style: italic;
    color: #667eea !important;
    margin-bottom: var(--spacing-md) !important;
}

.subpage-section-dark .program-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
}

.free-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 50px;
    font-weight: 600;
    font-size: var(--font-size-base);
    margin-top: var(--spacing-md);
}

/* ========================================
   BUTTON STYLES FOR SUBPAGES
   ======================================== */

.subpage-section-content .btn {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
    margin-top: var(--spacing-md);
}

.subpage-section-content .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.subpage-section-content .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.subpage-section-content .btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.subpage-section-content .btn-secondary:hover {
    background: #667eea;
    color: white;
}

.subpage-section-dark .btn-secondary {
    color: white;
    border-color: white;
}

.subpage-section-dark .btn-secondary:hover {
    background: white;
    color: #667eea;
}

/* ========================================
   MARRIAGE COURSE IMAGE FIT
   ======================================== */

/* Keep the full poster visible on desktop/tablet/mobile (no crop). */
.marriage-course-page .subpage-section-image {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #f1ece8;
}