/* ==========================================================================
   ABOUT PAGE STYLES
   ========================================================================== */

/* Page Header */
.page-header-section { background: linear-gradient(135deg, #051937, #00b4d8); padding: 80px 5%; text-align: center; color: white; }
.page-header-title { font-size: 48px; font-weight: 900; margin: 0 0 10px 0; letter-spacing: 2px; }
.page-header-subtitle { font-size: 18px; opacity: 0.9; font-weight: 500; max-width: 600px; margin: 0 auto; }

/* Content Section (Split Layout) */
.content-section { padding: 80px 0; background-color: #fff; overflow-x: hidden; }
.content-row { display: flex; align-items: center; width: 100%; margin: 0 auto 80px auto; }

.content-text { flex: 1; padding: 40px 5% 40px 8%; display: flex; flex-direction: column; justify-content: center; text-align: left; align-items: flex-start; }
.content-text h2 { font-size: 32px; color: #051937; margin-bottom: 25px; font-weight: 900; position: relative; display: inline-block; }
.content-text h2::after { content: ''; position: absolute; bottom: -10px; left: 0; width: 60px; height: 4px; background: #00b4d8; border-radius: 2px; }
.content-text p { font-size: 16px; line-height: 1.8; color: #555; margin-bottom: 20px; max-width: 650px; }

.content-image-wrapper { flex: 1; height: 450px; overflow: hidden; position: relative; border-radius: 250px 0 0 250px; }
.content-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; }
.content-image-wrapper:hover .content-image { transform: scale(1.05); }

/* Reverse Layout */
.content-row.reverse { flex-direction: row-reverse; }
.content-row.reverse .content-text { padding: 40px 8% 40px 5%; text-align: right; align-items: flex-end; }
.content-row.reverse .content-text h2::after { left: auto; right: 0; }
.content-row.reverse .content-image-wrapper { border-radius: 0 250px 250px 0; }

/* Goals Section */
.goals-section { background-color: #f9f9f9; padding: 80px 5%; }
.goals-section h2 { text-align: center;  font-size: 36px; font-weight: 900; color: #051937; margin-bottom: 50px; /* Adds space between title and cards */ position: relative; display: block; /* Ensures it takes full width to center properly */ }
/* Optional: Add a small underline to the Goals title */
.goals-section h2::after { content: ''; display: block; width: 60px; height: 4px; background: #00b4d8; margin: 10px auto 0 auto; /* 'auto' on left/right centers the line */ border-radius: 2px; }
.goals-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1200px; margin: 50px auto 0 auto; }
.goal-card { background: white; padding: 40px 30px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); text-align: center; transition: transform 0.3s ease; border-top: 5px solid transparent; }
.goal-card:hover { transform: translateY(-10px); }
.goal-card.vision { border-color: #00b4d8; }
.goal-card.mission { border-color: #ff6b6b; }
.goal-card.values { border-color: #1dd1a1; }
.goal-icon { font-size: 40px; margin-bottom: 20px; display: block; }
.goal-card h3 { font-size: 22px; color: #051937; margin-bottom: 15px; font-weight: 800; }
.goal-card p { font-size: 14px; line-height: 1.6; color: #666; }

/* Union Team Section (Horizontal) */
.union-team-section { padding: 80px 5%; background-color: #fff; }
.union-team-section p { text-align: center }
.union-team-section h2 { text-align: center; font-size: 36px; font-weight: 900; color: #051937; margin-bottom: 50px; display: block;}
/* Optional: Add a small underline to the Team title */
.union-team-section h2::after { content: ''; display: block; width: 60px; height: 4px; background: #00b4d8; /* Or #d32f2f if you want red */ margin: 10px auto 0 auto; border-radius: 2px;}
.team-grid-horizontal { max-width: 1200px; margin: 50px auto 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

.team-card-horizontal { display: flex; align-items: stretch; background: #f4f7f6; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; min-height: 140px; }
.team-card-horizontal:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
.team-card-horizontal:nth-child(even) { flex-direction: row-reverse; }

/* Layout Fix for ODD cards */
.team-card-horizontal:nth-child(odd) .card-text-content { flex-direction: row-reverse; text-align: right; padding-right: 0 !important; }
.team-card-horizontal:nth-child(odd) .accent-bar { margin-right: 1!important; margin-left: 15px !important; }
.team-card-horizontal:nth-child(odd) .member-details { align-items: flex-end; }

/* Center Last Card */
.team-card-horizontal:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: 100%; max-width: 580px; margin-left: auto; margin-right: auto; }

.card-text-content { flex: 1; padding: 15px 20px; display: flex; align-items: flex-start; }
.accent-bar { width: 5px; height: 40px; background-color: #d32f2f; margin-right: 15px; border-radius: 3px; flex-shrink: 0; margin-top: 5px; }
.member-details { display: flex; flex-direction: column; justify-content: center; }
.member-details h3 { font-size: 18px; font-weight: 800; color: #051937; margin: 0 0 4px 0; }
.member-role { font-size: 11px; font-weight: 800; color: #d32f2f; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; display: block; }
.member-class { font-size: 13px; font-weight: 600; color: #777; font-style: italic; display: block; margin-bottom: 8px; }
.member-desc { font-size: 13px; line-height: 1.4; color: #666; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.card-image-wrapper-h { width: 180px; flex-shrink: 0; position: relative; min-height: 100%; }
.card-image-h { width: 100%; height: 100%; object-fit: cover; object-position: center top; position: absolute; top: 0; left: 0; }

/* Theme Colors */
.theme-blue .accent-bar { background-color: #00b4d8; } .theme-blue .member-role { color: #00b4d8; }
.theme-green .accent-bar { background-color: #1dd1a1; } .theme-green .member-role { color: #1dd1a1; }
.theme-purple .accent-bar { background-color: #9b59b6; } .theme-purple .member-role { color: #9b59b6; }
.theme-orange .accent-bar { background-color: #e67e22; } .theme-orange .member-role { color: #e67e22; }
.theme-red .accent-bar { background-color: #d32f2f; } .theme-red .member-role { color: #d32f2f; }

/* --- FINAL MOBILE FIX (With Spacing) --- */
@media (max-width: 992px) {

    /* 1. ORIGINAL TOP SECTION (Keep curved images) */
    .page-header-title { font-size: 32px; }
    .content-row, .content-row.reverse { flex-direction: column; gap: 40px; margin-bottom: 60px; }
    .content-text, .content-row.reverse .content-text { flex: auto; padding: 0 20px; text-align: center; align-items: center; order: 2; }
    .content-text h2::after, .content-row.reverse .content-text h2::after { left: 50%; right: auto; transform: translateX(-50%); }
    
    .content-image-wrapper { flex: auto; width: 100%; height: 300px; order: 1; border-radius: 150px 0 0 150px; }
    .content-row.reverse .content-image-wrapper { border-radius: 0 150px 150px 0; }
    
    .goals-grid { grid-template-columns: 1fr; }

    /* 2. UNION TEAM SECTION FIX */
    .team-grid-horizontal { 
        grid-template-columns: 1fr; 
        max-width: 500px; 
        margin: 40px auto; 
        gap: 20px;
    }

    .team-card-horizontal {
        min-height: 120px; 
        align-items: center; 
    }

    /* Small Image to allow text space */
    .card-image-wrapper-h { 
        width: 130px !important; 
        min-width: 130px; 
        height: 100%;
        position: relative;
    }
    
    .card-text-content {
        padding: 10px !important; 
        width: 100%; 
    }

    /* ODD CARDS (Text Left | Line | Image Right) */
    .team-card-horizontal:nth-child(odd) { 
        flex-direction: row; 
        text-align: right; 
    }
    .team-card-horizontal:nth-child(odd) .card-text-content { 
        flex-direction: row-reverse; 
        justify-content: flex-start;
    }
    .team-card-horizontal:nth-child(odd) .accent-bar {
        /* Add 10px gap on the right (touching image) */
        margin-right: 10px !important; 
        margin-left: 10px !important;
    }
    .team-card-horizontal:nth-child(odd) .member-details {
        align-items: flex-end; 
    }

    /* EVEN CARDS (Image Left | Line | Text Right) */
    .team-card-horizontal:nth-child(even) { 
        flex-direction: row-reverse; 
        text-align: left; 
    }
    .team-card-horizontal:nth-child(even) .card-text-content { 
        flex-direction: row; 
        justify-content: flex-start;
    }
    .team-card-horizontal:nth-child(even) .accent-bar {
        /* Add 10px gap on the left (touching image) */
        margin-left: 10px !important;
        margin-right: 10px !important;
    }
    .team-card-horizontal:nth-child(even) .member-details {
        align-items: flex-start; 
    }

    /* Typography Adjustments */
    .member-details h3 { font-size: 16px; margin-bottom: 2px; }
    .member-class { font-size: 12px; }
    .member-role { font-size: 10px; }
    
    /* Hiding description creates the cleanest look on mobile */
    .member-desc { display: none; }
}