/* ========================================
   SERVICES PAGE STYLES - MODAL VERSION
   Logo green #30AA28 on white. Gold/orange accents unchanged.

   v1.1 - category-section background matched to the homepage sections
          (.home-services, #section-leadership, #future-plans,
          #section-about): same white > sage > pale green > white ground
          and the same two soft green glows. Both ends are pure white, so
          stacked category sections join without a seam. Nothing else changed.
   ======================================== */

/* Hero Section - EXACTLY Matches Homepage */
.services-hero {
    background: linear-gradient(rgba(48, 170, 40, 0.7), rgba(48, 170, 40, 0.7)), url('../../company.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--white);
    text-align: center;
    padding: 180px 20px;
    position: relative;
    overflow: hidden;
}

.services-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.4);
    animation: fadeInDown 1s ease;
}

.services-hero p {
    font-size: 1.3rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s backwards;
}

/* Category Sections
   Ground = the same gradient and glows used by the homepage sections.
   The glows are extra background layers on the element itself, so no
   markup or pseudo-element is needed. */
.category-section {
    padding: 80px 20px;
    background-color: #ffffff;
    background-image:
        radial-gradient(ellipse 52% 40% at 20% 34%, rgba(185, 221, 181, 0.5), transparent 72%),
        radial-gradient(ellipse 44% 36% at 94% 12%, rgba(185, 221, 181, 0.3), transparent 70%),
        linear-gradient(180deg, #FFFFFF 0%, #F3F8F2 30%, #E9F4E6 64%, #FFFFFF 100%);
}

.category-header {
    text-align: center;
    margin-bottom: 50px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.category-badge {
    display: inline-block;
    padding: 8px 25px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.loan-badge {
    background: #30AA28;
    color: white;
    box-shadow: 0 4px 15px rgba(48, 170, 40, 0.3);
}

.other-badge {
    background: linear-gradient(135deg, #f57c00, #ffa726);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 124, 0, 0.3);
}

.category-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.loan-title { color: #30AA28; }
.other-title { color: #f57c00; }

.category-subtitle {
    font-size: 1.1rem;
    color: var(--gray-text);
}

/* Services Grid */
.services-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Service Card (Trigger) */
.service-card-modern {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.service-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.service-card-modern.loan-card:hover { border-color: #30AA28; }
.service-card-modern.other-card:hover { border-color: #f57c00; }

/* ========================================
   FEATURED / POPULAR SERVICE CARD
   ======================================== */
.service-card-modern.featured {
    border: 3px solid #FFD700;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.2), 0 0 0 1px rgba(255, 215, 0, 0.1);
    position: relative;
}

.service-card-modern.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.03) 0%, rgba(255, 193, 7, 0.05) 100%);
    pointer-events: none;
    border-radius: 15px;
    z-index: 0;
}

.service-card-modern.featured:hover {
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.3), 0 0 0 1px rgba(255, 215, 0, 0.3);
    border-color: #FFC107;
}

.service-card-modern.featured .service-card-content {
    position: relative;
    z-index: 1;
}

/* Featured Star Badge */
.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
    z-index: 2;
    animation: badgePulse 2s ease-in-out infinite;
}

.featured-badge i {
    font-size: 0.8rem;
    animation: starRotate 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { 
        box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 6px 20px rgba(255, 165, 0, 0.6);
        transform: scale(1.05);
    }
}

@keyframes starRotate {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

.service-card-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-header-modern {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.service-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.loan-card .service-icon-wrapper {
    background: #30AA28;
    box-shadow: 0 4px 15px rgba(48, 170, 40, 0.3);
}

.other-card .service-icon-wrapper {
    background: linear-gradient(135deg, #f57c00, #ffa726);
    box-shadow: 0 4px 15px rgba(245, 124, 0, 0.3);
}

.service-card-modern:hover .service-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.service-info { flex: 1; }

.service-name {
    font-size: 1.4rem;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.loan-card .service-name { color: #30AA28; }
.other-card .service-name { color: #f57c00; }

.service-hint {
    font-size: 0.85rem;
    color: var(--gray-text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.service-description {
    color: var(--gray-text);
    line-height: 1.7;
    font-size: 1rem;
    margin: 0 0 20px 0;
    flex: 1;
}

.view-details-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: auto;
}

.loan-card .view-details-btn {
    background: rgba(48, 170, 40, 0.1);
    color: #30AA28;
}
.loan-card .view-details-btn:hover { background: #30AA28; color: white; }

.other-card .view-details-btn {
    background: #fff3e0;
    color: #f57c00;
}
.other-card .view-details-btn:hover { background: #f57c00; color: white; }

/* Featured card special button style */
.service-card-modern.featured .view-details-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
}

.service-card-modern.featured .view-details-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(255, 165, 0, 0.5);
}


/* ========================================
   MODAL STYLES (The Popup)
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(50px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

/* Featured Modal Header */
.modal-header.featured-modal {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    border-bottom: 3px solid #FFD700;
}

/* Custom Scrollbar for Modal */
.modal-content::-webkit-scrollbar { width: 8px; }
.modal-content::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
.modal-content::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
.modal-content::-webkit-scrollbar-thumb:hover { background: #aaa; }

.modal-header {
    padding: 30px 30px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    border-radius: 20px 20px 0 0;
}

.modal-icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.modal-header.loan-header .modal-icon-wrapper { background: #30AA28; }
.modal-header.other-header .modal-icon-wrapper { background: linear-gradient(135deg, #f57c00, #ffa726); }

.modal-title-group { flex: 1; }
.modal-title { font-size: 1.8rem; margin: 0 0 5px 0; font-weight: 700; }
.modal-header.loan-header .modal-title { color: #30AA28; }
.modal-header.other-header .modal-title { color: #f57c00; }

.modal-close {
    background: #f5f5f5;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #666;
    transition: all 0.3s ease;
}

.modal-close:hover { background: #e0e0e0; color: #333; transform: rotate(90deg); }

.modal-body { padding: 30px; }

.modal-section { margin-bottom: 30px; }
.modal-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.modal-header.loan-header ~ .modal-body .modal-section-title { color: #30AA28; }
.modal-header.other-header ~ .modal-body .modal-section-title { color: #f57c00; }

.modal-text { color: var(--dark-text); line-height: 1.8; font-size: 1rem; margin: 0; }

.requirements-grid-modal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.req-box {
    padding: 20px;
    border-radius: 12px;
    background: #f8f9fa;
    border-top: 4px solid;
}

.loan-header ~ .modal-body .req-box.retirees { border-top-color: #30AA28; }
.loan-header ~ .modal-body .req-box.regular { border-top-color: #30AA28; }
.other-header ~ .modal-body .req-box.retirees { border-top-color: #f57c00; }
.other-header ~ .modal-body .req-box.regular { border-top-color: #30AA28; }

.req-box h5 {
    margin: 0 0 15px 0;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.loan-header ~ .modal-body .req-box h5 { color: #30AA28; }
.other-header ~ .modal-body .req-box h5 { color: #f57c00; }

.req-list { margin: 0; padding-left: 20px; color: var(--dark-text); line-height: 1.8; }
.req-list li { margin-bottom: 5px; font-size: 0.95rem; }

.modal-cta {
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    color: white;
    margin-top: 20px;
}
.modal-header.loan-header ~ .modal-body .modal-cta { background: #30AA28; }
.modal-header.other-header ~ .modal-body .modal-cta { background: linear-gradient(135deg, #f57c00, #ffa726); }

.modal-cta h4 { margin: 0 0 10px 0; font-size: 1.3rem; }
.modal-cta p { margin: 0 0 20px 0; opacity: 0.95; }
.modal-cta-btn {
    display: inline-block;
    padding: 12px 35px;
    background: white;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s ease;
}
.loan-header ~ .modal-body .modal-cta-btn { color: #30AA28; }
.other-header ~ .modal-body .modal-cta-btn { color: #f57c00; }
.modal-cta-btn:hover { transform: scale(1.05); }

/* CTA Section */
.cta-section-services {
    padding: 80px 20px;
    background: #30AA28;
    color: white;
    text-align: center;
}
.cta-section-services h2 { font-size: 2.5rem; margin-bottom: 20px; font-weight: 700; }
.cta-section-services p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.95; }

/* Responsive */
@media (max-width: 768px) {
    .services-hero { 
        padding: 120px 20px; 
        background-attachment: scroll; 
    }
    .services-hero h1 { font-size: 2.2rem; }
    .category-section { padding: 60px 15px; }
    .category-title { font-size: 1.8rem; }
    .services-grid { grid-template-columns: 1fr; }
    
    /* Featured badge mobile */
    .featured-badge {
        font-size: 0.7rem;
        padding: 5px 10px;
        top: 10px;
        right: 10px;
    }
    
    /* Modal Mobile */
    .modal-content { max-height: 95vh; border-radius: 15px; }
    .modal-header { padding: 20px; gap: 15px; }
    .modal-icon-wrapper { width: 55px; height: 55px; font-size: 1.5rem; }
    .modal-title { font-size: 1.4rem; }
    .modal-body { padding: 20px; }
    .requirements-grid-modal { grid-template-columns: 1fr; }
}