/* ============================================================
   TEAM PAGE - GreenWay Solar Energy
   Complete CSS with Fixed Scroll
   ============================================================ */

/* ============================================================
   TEAM HERO
   ============================================================ */
   .team-hero {
    padding: 160px 0 80px;
    background: linear-gradient(135deg, #0a2e1a 0%, #0a6e3e 100%);
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.team-hero::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 80px;
    background: #f8fafc;
    clip-path: ellipse(70% 100% at 50% 100%);
    z-index: 1;
}

.team-hero .container {
    position: relative;
    z-index: 2;
}

.team-hero .badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 6px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    color: #fbbf24;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.team-hero .badge i {
    margin-right: 6px;
}

.team-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: #ffffff;
}

.team-hero h1 span {
    color: #fbbf24;
}

.team-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

/* ============================================================
   FOUNDER SECTION
   ============================================================ */
.founder-section {
    padding: 60px 0 40px;
    background: #f8fafc;
}

.founder-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.founder-section .section-label {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0a6e3e;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.founder-section .section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: #0a2e1a;
    margin-bottom: 40px;
}

.founder-section .section-title span {
    color: #0a6e3e;
}

/* ============================================================
   FOUNDER CARD - FIXED SCROLL
   ============================================================ */
.founder-card-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    padding: 20px 0;
}

.card {
    max-width: 400px;
    width: 100%;
    margin: auto;
    overflow: hidden;
    position: relative;
    z-index: 1;
    background-color: #ffffff;
    display: flex;
    transition: 0.3s;
    flex-direction: column;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(10, 110, 62, 0.06);
}

.card[data-state="#about"] {
    height: 480px;
}

.card[data-state="#about"] .card-main {
    padding-top: 0;
}

.card[data-state="#contact"] {
    height: 460px;
}

.card[data-state="#experience"] {
    height: 540px;
}

/* ===== EXPERIENCE SECTION - SCROLL FIX ===== */
.card[data-state="#experience"] .card-content {
    height: 100%;
    overflow-y: auto;
    padding-right: 10px;
    padding-bottom: 10px;
    max-height: 400px;
    scrollbar-width: none;        /* Firefox - Hide scrollbar */
    -ms-overflow-style: none;     /* IE/Edge - Hide scrollbar */
}

/* Chrome/Safari - Hide scrollbar */
.card[data-state="#experience"] .card-content::-webkit-scrollbar {
    display: none;                /* Chrome/Safari - Hide scrollbar */
    width: 0;
}

.card.is-active .card-header {
    height: 80px;
}

.card.is-active .card-cover {
    height: 100px;
    top: -50px;
}

.card.is-active .card-avatar {
    transform: none;
    left: 20px;
    width: 56px;
    height: 56px;
    bottom: 10px;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card.is-active .card-fullname {
    left: 92px;
    transform: none;
    bottom: 22px;
    font-size: 18px;
}

.card.is-active .card-jobtitle {
    left: 92px;
    transform: none;
    bottom: 4px;
    letter-spacing: 1px;
    font-size: 10px;
}

/* Card Header */
.card-header {
    position: relative;
    display: flex;
    height: 200px;
    flex-shrink: 0;
    width: 100%;
    transition: 0.3s;
}

.card-header * {
    transition: 0.3s;
}

.card-cover {
    width: 100%;
    height: 100%;
    position: absolute;
    height: 160px;
    top: -20%;
    left: 0;
    will-change: top;
    background-size: cover;
    background-position: center;
    filter: blur(30px);
    transform: scale(1.2);
    transition: 0.5s;
}

.card-avatar {
    width: 125px;
    height: 125px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    object-position: center;
    object-fit: cover;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-64px);
    border: 4px solid #fff;
}

.card-fullname {
    position: absolute;
    bottom: 0;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    transform: translateY(-10px) translateX(-50%);
    left: 50%;
    color: #0a2e1a;
}

.card-jobtitle {
    bottom: -10px;
    position: absolute;
    font-size: 11px;
    white-space: nowrap;
    font-weight: 500;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-7px);
    color: #0a6e3e;
}

/* Card Main */
.card-main {
    position: relative;
    flex: 1;
    display: flex;
    padding-top: 10px;
    flex-direction: column;
}

.card-subtitle {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 8px;
    color: #0a6e3e;
    letter-spacing: 1px;
}

.card-content {
    padding: 20px 24px;
}

.card-desc {
    line-height: 1.7;
    color: #475569;
    font-size: 14px;
    margin: 0;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
}

/* Card Social */
.card-social {
    display: flex;
    align-items: center;
    padding: 0 24px;
    margin-bottom: 20px;
    gap: 8px;
}

.card-social svg {
    fill: #94a3b8;
    width: 18px;
    display: block;
    transition: 0.3s;
}

.card-social a {
    color: #8797a1;
    height: 36px;
    width: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    background-color: #f1f5f9;
    text-decoration: none;
}

.card-social a:hover {
    background-color: #0a6e3e;
}

.card-social a:hover svg {
    fill: #ffffff;
}

/* Card Buttons */
.card-buttons {
    display: flex;
    background-color: #fff;
    margin-top: auto;
    position: sticky;
    bottom: 0;
    left: 0;
    border-top: 1px solid #f1f5f9;
}

.card-buttons button {
    flex: 1 1 auto;
    user-select: none;
    background: 0;
    font-size: 12px;
    border: 0;
    padding: 14px 5px;
    cursor: pointer;
    color: #64748b;
    transition: 0.3s;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    outline: 0;
    border-bottom: 3px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    -webkit-tap-highlight-color: transparent;
}

.card-buttons button.is-active,
.card-buttons button:hover {
    color: #0a2e1a;
    border-bottom: 3px solid #0a6e3e;
    background: linear-gradient(
        to bottom,
        rgba(10, 110, 62, 0) 0%,
        rgba(10, 110, 62, 0.05) 44%,
        rgba(10, 110, 62, 0.08) 100%
    );
}

/* Card Sections */
.card-section {
    display: none;
}

.card-section.is-active {
    display: block;
    animation: fadeIn 0.5s both;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Timeline */
.card-timeline {
    margin-top: 20px;
    position: relative;
    padding-left: 10px;
}

.card-timeline:after {
    background: linear-gradient(to top, rgba(10, 110, 62, 0) 0%, #0a6e3e 100%);
    content: "";
    left: 40px;
    width: 1px;
    top: 0;
    height: 100%;
    position: absolute;
}

.card-item {
    position: relative;
    padding-left: 50px;
    padding-right: 10px;
    padding-bottom: 24px;
    z-index: 1;
}

.card-item:last-child {
    padding-bottom: 5px;
}

.card-item:after {
    content: attr(data-year);
    width: 10px;
    position: absolute;
    top: 0;
    left: 25px;
    width: 10px;
    height: 10px;
    line-height: 1;
    border: 2px solid #fff;
    font-size: 10px;
    text-indent: -35px;
    border-radius: 50%;
    color: rgba(134, 134, 134, 0.7);
    background: linear-gradient(to bottom, #4ade80 0%, #0a6e3e 100%);
    box-shadow: 0 0 0 3px rgba(10, 110, 62, 0.15);
}

.card-item-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #0a2e1a;
}

.card-item-title span {
    color: #0a6e3e;
}

.card-item-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    font-family: 'Inter', sans-serif;
}

/* Card Contact */
.card-contact-wrapper {
    margin-top: 16px;
}

.card-contact {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #475569;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    cursor: pointer;
}

.card-contact + .card-contact {
    margin-top: 14px;
}

.card-contact svg {
    flex-shrink: 0;
    width: 26px;
    min-height: 30px;
    margin-right: 12px;
    transition: 0.3s;
    padding-right: 12px;
    border-right: 1px solid #e2e8f0;
    color: #0a6e3e;
}

.contact-me {
    border: 0;
    outline: none;
    background: linear-gradient(to right, #0a6e3e, #0a8f4e);
    box-shadow: 0 4px 12px rgba(10, 110, 62, 0.3);
    color: #fff;
    padding: 12px 16px;
    width: 100%;
    border-radius: 8px;
    margin-top: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: 0.3s;
    letter-spacing: 0.5px;
    -webkit-tap-highlight-color: transparent;
}

.contact-me:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 110, 62, 0.35);
}

/* ============================================================
   TEAM GRID
   ============================================================ */
.team-grid-section {
    padding: 40px 0 100px;
    background: #f8fafc;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Team Card */
.team-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.4s ease;
    text-align: center;
    padding-bottom: 30px;
    position: relative;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(10, 110, 62, 0.15);
}

.team-card .card-image {
    width: 100%;
    height: 260px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #0a6e3e;
    position: relative;
    overflow: hidden;
}

.team-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease-in-out;
}

.team-card .card-image img:hover {
    transform: scale(1.1);
}

.team-card .card-image .placeholder-icon {
    font-size: 5rem;
    opacity: 0.3;
    color: #0a6e3e;
}

.team-card .card-body {
    padding: 24px 20px 0;
}

.team-card .card-body h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0a2e1a;
    margin-bottom: 4px;
}

.team-card .card-body .role {
    font-size: 0.95rem;
    color: #0a6e3e;
    font-weight: 600;
    display: inline-block;
    background: #ecfdf5;
    padding: 2px 16px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.team-card .card-body p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.team-card .card-social {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.team-card .card-social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #0a2e1a;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
}

.team-card .card-social a:hover {
    background: #0a6e3e;
    color: #fff;
    transform: scale(1.1);
}

.team-card .card-social a.linkedin:hover {
    background: #0077b5;
}

.team-card .card-social a.twitter:hover {
    background: #1da1f2;
}

/* ============================================================
   RESPONSIVE - TABLET
   ============================================================ */
@media (max-width: 992px) {
    .team-hero {
        padding: 140px 0 60px;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* ============================================================
   RESPONSIVE - MOBILE
   ============================================================ */
@media (max-width: 768px) {
    .team-hero {
        padding: 120px 0 50px;
    }
    
    .team-hero h1 {
        font-size: 2rem;
    }
    
    .team-hero p {
        font-size: 1rem;
    }
    
    .founder-section .section-title {
        font-size: 1.8rem;
    }
    
    .card {
        max-width: 100%;
        margin: 0 10px;
    }
    
    .card[data-state="#about"] {
        height: 460px;
    }
    
    .card[data-state="#contact"] {
        height: 440px;
    }
    
    .card[data-state="#experience"] {
        height: 520px;
    }
    
    .card[data-state="#experience"] .card-content {
        max-height: 380px;
    }
    
    .team-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        padding: 0 16px;
    }
    
    .team-card .card-image {
        height: 200px;
    }
    
    .team-card .card-body h3 {
        font-size: 1.2rem;
    }
    
    .team-card .card-body p {
        font-size: 0.85rem;
    }
}

/* ============================================================
   RESPONSIVE - SMALL MOBILE
   ============================================================ */
@media (max-width: 480px) {
    .team-hero {
        padding: 100px 0 40px;
    }
    
    .team-hero h1 {
        font-size: 1.6rem;
    }
    
    .team-hero p {
        font-size: 0.85rem;
    }
    
    .founder-section .section-title {
        font-size: 1.5rem;
    }
    
    .card[data-state="#about"] {
        height: 480px;
    }
    
    .card[data-state="#experience"] {
        height: 560px;
    }
    
    .card[data-state="#experience"] .card-content {
        max-height: 420px;
    }
    
    .card-content {
        padding: 16px 18px;
    }
    
    .card-social {
        padding: 0 18px;
    }
    
    .card-fullname {
        font-size: 18px;
    }
    
    .card-avatar {
        width: 90px;
        height: 90px;
        transform: translateX(-50%) translateY(-50px);
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 12px;
    }
    
    .team-card .card-image {
        height: 180px;
    }
    
    .team-card .card-body {
        padding: 16px 16px 0;
    }
    
    .team-card .card-body h3 {
        font-size: 1.1rem;
    }
    
    .team-card .card-body .role {
        font-size: 0.8rem;
    }
    
    .team-card .card-body p {
        font-size: 0.8rem;
    }
}

/* ============================================================
   IOS SAFARI & MOBILE FIXES
   ============================================================ */
@supports (-webkit-touch-callout: none) {
    .team-hero {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    .card-buttons button,
    .contact-me {
        -webkit-tap-highlight-color: transparent;
    }
    
    input, textarea, button {
        font-size: 16px;
    }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .team-card:hover {
        transform: none !important;
    }
    
    .team-card .card-image img {
        transform: none !important;
    }
}

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #0a6e3e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a2e1a;
}

/* ============================================================
   SELECTION COLOR
   ============================================================ */
::selection {
    background: #f59e0b;
    color: #0a2e1a;
}

::-moz-selection {
    background: #f59e0b;
    color: #0a2e1a;
}