/* iFSP Website - About Page CSS */
/* This file contains styles specific to the about page */

/* About Page Content - ABOUT SPECIFIC */
.about-content {
    padding: 100px 0;
    background: #f8f9fa;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 80px;
    align-items: start;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 300;
    color: #2c3e50;
    margin-bottom: 30px;
}

.about-text h3 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #00231f;
    margin: 40px 0 20px;
}

.about-text p {
    font-size: 16px;
    line-height: 1.8;
    color: #5a6c7d;
    margin-bottom: 20px;
}

.about-stats {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.stat-item {
    text-align: center;
    margin-bottom: 40px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: #00231f;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    color: #5a6c7d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Values Section - ABOUT SPECIFIC */
.values {
    padding: 100px 0;
    background: white;
}

.values h2 {
    font-size: 2.5rem;
    font-weight: 300;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 80px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.value-item {
    text-align: center;
    padding: 40px 20px;
}

.value-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.value-item h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #00231f;
    margin-bottom: 15px;
}

.value-item p {
    color: #5a6c7d;
    line-height: 1.6;
}

/* Team Section - ABOUT SPECIFIC */
.team {
    padding: 100px 0;
    background: #f8f9fa;
}

.team h2 {
    font-size: 2.5rem;
    font-weight: 300;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 80px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.team-member {
    background: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    background: #ddd;
}

.team-member h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #00231f;
    margin-bottom: 10px;
}

.team-role {
    color: #f4a444;
    font-weight: 500;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

.team-member p:last-child {
    color: #5a6c7d;
    line-height: 1.6;
}

/* About Hero Section - ABOUT SPECIFIC */
.about-hero {
    position: relative;
    background: #00231f;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.about-hero .hero-image-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/About/Images-about/about-hero-image.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.about-hero .hero-image-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.about-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 1200px;
    padding: 80px 40px;
    background: none;
}

.hero-text-overlay {
    position: relative;
    z-index: 2;
    background: none;
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    font-weight: 300;
}

.about-title {
    font-size: 3.5rem;
    font-weight: 200;
    color: white;
    line-height: 1.1;
    margin-bottom: 0;
}

.about-text-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1000px;
    margin: 0 auto;
}

.about-text-left p,
.about-text-right p {
    font-size: 16px;
    line-height: 1.8;
    color: #5a6c7d;
    margin-bottom: 0;
    text-align: justify;
}

.about-text-left p strong,
.about-text-right p strong {
    color: #000000;
    font-weight: 500;
}

.our-companies {
    padding: 100px 0;
    background: white;
}

.companies-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 80px;
}

.companies-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.company-item {
    text-align: center;
    padding: 30px 20px;
    transition: transform 0.3s ease;
}

.company-item:hover {
    transform: translateY(-5px);
}

.company-icon {
    margin-bottom: 20px;
}

.company-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.company-item h3 {
    font-size: 14px;
    font-weight: 600;
    color: #00231f;
    margin-bottom: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.company-item p {
    font-size: 14px;
    color: #5a6c7d;
    line-height: 1.6;
}

.values-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 80px;
}

.values .values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.values .value-item {
    text-align: left;
    padding: 0;
}

.values .value-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: #00231f;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.values .value-item p {
    font-size: 14px;
    color: #5a6c7d;
    line-height: 1.7;
}

/* Icon of Values Section - ABOUT SPECIFIC */
.icon-of-values {
    padding: 80px 0;
    background: #00231f;
}

.icon-values-content {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Invisible hover detection area that doesn't shrink */
.icon-values-content::before {
    content: '';
    position: absolute;
    top: 110px; /* Start after padding (50px + 60px) */
    left: 50%;
    transform: translateX(-50%);
    width: 600px; /* Exclude side padding (700px - 50px each side) */
    height: 120px; /* Just the content area, no padding */
    z-index: 25;
    pointer-events: auto;
}

/* Trigger animations when hovering the invisible area */
.icon-values-content:hover .values-icons-container {
    animation: containerReverse 11.5s ease-in-out infinite;
}

.icon-values-content:hover .value-icon-separator {
    animation: separatorReverse 11.5s ease-in-out infinite;
}

.icon-values-content:hover .value-icon-item h3 {
    animation: headingReverse 11.5s ease-in-out infinite;
}

.icon-values-content:hover .value-icon-item:first-child .value-icon-image {
    animation: firstImageReverse 11.5s ease-in-out infinite;
}

.icon-values-content:hover .value-icon-item:last-child .value-icon-image {
    animation: lastImageReverse 11.5s ease-in-out infinite;
}

.icon-values-content:hover .value-icon-item:nth-child(3) .value-icon-image {
    animation: middleImageReverse 11.5s ease-in-out infinite;
}

.icon-values-content:hover .values-icons-container::after {
    animation: iconReverse 11.5s ease-in-out infinite, flashEffect 0.3s ease-out 1.5s infinite;
}

.icon-values-content:hover .values-icons-container::before {
    animation: textReverse 11.5s ease-in-out infinite;
}

.icon-values-title {
    font-size: 2.2rem;
    font-weight: 300;
    color: white;
    margin-bottom: 50px;
}

.title-accent-light {
    color: #f4a444;
}

.values-icons-container {
    background: #fef9f3;
    padding: 60px 50px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 35px;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: max-width 1s ease-in-out, padding 1s ease-in-out;
}

/* Remove the old hover states from the container */

/* Remove old container hover states - now handled by parent */

/* IFSP Icon that appears in center */
.values-icons-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0) rotate(0deg);
    width: 173px;
    height: 173px;
    background-image: url('../Shared/assets/images/IFSP-ICON.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    transition: transform 0.15s ease-out, opacity 0.15s ease-out;
    z-index: 15;
    animation: none;
    opacity: 0;
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
}

/* IFSP Text that appears above the icon */
.values-icons-container::before {
    content: 'iFSP';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -135px);
    font-size: 2rem;
    font-weight: 600;
    color: #00231f;
    z-index: 16;
    opacity: 0;
    transition: opacity 0.15s ease-out;
}

@keyframes flashEffect {
    0% {
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
    50% {
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.6), 0 0 16px rgba(255, 255, 255, 0.4), 0 0 24px rgba(255, 255, 255, 0.2);
    }
    100% {
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
}

@keyframes continuousRotate {
    0% {
        transform: translate(-50%, calc(-50% + 0px)) scale(1) rotate(180deg);
    }
    20% {
        transform: translate(-50%, calc(-50% - 4px)) scale(1) rotate(252deg);
    }
    40% {
        transform: translate(-50%, calc(-50% - 7px)) scale(1) rotate(324deg);
    }
    60% {
        transform: translate(-50%, calc(-50% - 4px)) scale(1) rotate(396deg);
    }
    80% {
        transform: translate(-50%, calc(-50% + 4px)) scale(1) rotate(468deg);
    }
    100% {
        transform: translate(-50%, calc(-50% + 0px)) scale(1) rotate(540deg);
    }
}

/* Extended animations with reverse sequence */
@keyframes containerReverse {
    0% {
        max-width: 700px;
        padding: 60px 50px;
    }
    13.04% {
        max-width: 400px;
        padding: 60px 30px;
    }
    52.17% {
        max-width: 400px;
        padding: 60px 30px;
    }
    69.57% {
        max-width: 700px;
        padding: 60px 50px;
    }
    100% {
        max-width: 700px;
        padding: 60px 50px;
    }
}

@keyframes separatorReverse {
    0% { opacity: 1; }
    13.04% { opacity: 0; }
    52.17% { opacity: 0; }
    69.57% { opacity: 1; }
    100% { opacity: 1; }
}

@keyframes headingReverse {
    0% { opacity: 1; }
    13.04% { opacity: 0; }
    52.17% { opacity: 0; }
    69.57% { opacity: 1; }
    100% { opacity: 1; }
}

@keyframes firstImageReverse {
    0% { 
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
    13.04% { 
        transform: translateX(250px) rotate(300deg);
        opacity: 0;
    }
    52.17% { 
        transform: translateX(250px) rotate(300deg);
        opacity: 0;
    }
    69.57% { 
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% { 
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
}

@keyframes lastImageReverse {
    0% { 
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
    13.04% { 
        transform: translateX(-250px) rotate(-300deg);
        opacity: 0;
    }
    52.17% { 
        transform: translateX(-250px) rotate(-300deg);
        opacity: 0;
    }
    69.57% { 
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% { 
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
}

@keyframes middleImageReverse {
    0% { opacity: 1; }
    13.04% { opacity: 0; }
    52.17% { opacity: 0; }
    69.57% { opacity: 1; }
    100% { opacity: 1; }
}

@keyframes iconReverse {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    17.39% {
        transform: translate(-50%, calc(-50% + 6px)) scale(1) rotate(180deg);
        opacity: 1;
    }
    52.17% {
        transform: translate(-50%, calc(-50% + 6px)) scale(1) rotate(540deg);
        opacity: 1;
    }
    69.57% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
}

@keyframes textReverse {
    0% { opacity: 0; }
    30.43% { opacity: 0; }
    34.78% { opacity: 1; }
    52.17% { opacity: 1; }
    60.87% { opacity: 0; }
    100% { opacity: 0; }
}

.value-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.value-icon-image {
    width: 120px;
    height: 120px;
    margin-top: 20px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    transition: transform 1.5s ease-in-out, opacity 1.5s ease-in-out;
    position: relative;
    z-index: 5;
}

.value-icon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.value-icon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.value-icon-item h3 {
    font-size: 12px;
    font-weight: 500;
    color: #00231f;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0 0 20px 0;
    transition: opacity 0.3s ease;
}

.value-icon-separator {
    font-size: 24px;
    font-weight: 300;
    color: #00231f;
    margin: 0 20px;
    transition: opacity 0.3s ease;
    align-self: center;
    margin-top: 20px;
}

.icon-values-description {
    max-width: 600px;
    margin: 0 auto;
}

.icon-values-description p {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

/* CTA Section - ABOUT SPECIFIC (if needed) */
.cta {
    padding: 100px 0;
    background: #00231f;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 300;
    color: white;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

/* Mobile Responsive - ABOUT SPECIFIC */
@media (max-width: 768px) {
    .about-hero-content {
        padding: 40px 25px;
        max-width: 100%;
    }
    
    .about-title {
        font-size: 2.2rem;
        font-weight: 200;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 45px;
    }
    
    .about-hero {
        min-height: 70vh;
    }
    
    .about-text-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about-content {
        padding: 60px 20px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .companies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .values .values-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .values {
        padding: 80px 20px;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .icon-values-content::before {
        top: 100px; /* Start after padding (50px + 50px) */
        width: calc(100vw - 70px); /* Responsive width with padding consideration */
        max-width: 530px; /* Maximum width for larger screens */
        height: 100px; /* Just the content area, no padding */
    }
    
    .icon-values-content:hover .values-icons-container {
        max-width: 350px;
        padding: 50px 20px;
    }
    
    .values-icons-container {
        padding: 50px 35px;
        gap: 25px;
        max-width: 600px;
        transition: max-width 1.2s ease-in-out, padding 1.2s ease-in-out;
    }
    
    /* Adjust hover animations for tablet */
    .icon-values-content:hover .value-icon-item:first-child .value-icon-image {
        transform: translateX(140px) rotate(450deg);
        opacity: 0;
        transition: transform 1.8s ease-in-out, opacity 1.8s ease-in-out;
    }

    .icon-values-content:hover .value-icon-item:last-child .value-icon-image {
        transform: translateX(-140px) rotate(-450deg);
        opacity: 0;
        transition: transform 1.8s ease-in-out, opacity 1.8s ease-in-out;
    }
    
    .icon-values-content:hover .value-icon-item:nth-child(3) .value-icon-image {
        opacity: 0;
        transition: opacity 1.8s ease-in-out;
    }
    
    .icon-values-content:hover .value-icon-separator {
        opacity: 0;
    }

    .icon-values-content:hover .value-icon-item h3 {
        opacity: 0;
    }
    
    .values-icons-container::after {
        width: 144px;
        height: 144px;
        margin-top: 12px;
    }
    
    .values-icons-container::before {
        font-size: 1.6rem;
        transform: translate(-50%, -115px);
    }
    
    .icon-values-content:hover .values-icons-container::after {
        transform: translate(-50%, calc(-50% + 3px)) scale(1) rotate(180deg);
        animation: continuousRotateTablet 7s linear infinite 2s, flashEffectTablet 0.3s ease-out 1.5s;
        opacity: 1;
    }
    
    .icon-values-content:hover .values-icons-container::before {
        opacity: 1;
        transition: opacity 0.5s ease-in-out 2.8s;
    }
    
    .value-icon-image {
        width: 90px;
        height: 90px;
    }
    
    .value-icon-item h3 {
        font-size: 10px;
        margin: 0 0 12px 0;
    }
    
    .value-icon-separator {
        font-size: 18px;
        margin: 0 12px;
        margin-top: 12px;
    }
    
    .icon-values-description p {
        font-size: 14px;
    }
    
    @keyframes continuousRotateTablet {
        0% {
            transform: translate(-50%, calc(-50% + 0px)) scale(1) rotate(180deg);
        }
        20% {
            transform: translate(-50%, calc(-50% - 3px)) scale(1) rotate(252deg);
        }
        40% {
            transform: translate(-50%, calc(-50% - 5px)) scale(1) rotate(324deg);
        }
        60% {
            transform: translate(-50%, calc(-50% - 3px)) scale(1) rotate(396deg);
        }
        80% {
            transform: translate(-50%, calc(-50% + 3px)) scale(1) rotate(468deg);
        }
        100% {
            transform: translate(-50%, calc(-50% + 0px)) scale(1) rotate(540deg);
        }
    }
    
    @keyframes flashEffectTablet {
        0% {
            box-shadow: 0 0 0 rgba(255, 255, 255, 0);
        }
        50% {
            box-shadow: 0 0 6px rgba(255, 255, 255, 0.6), 0 0 12px rgba(255, 255, 255, 0.4), 0 0 18px rgba(255, 255, 255, 0.2);
        }
        100% {
            box-shadow: 0 0 0 rgba(255, 255, 255, 0);
        }
    }
}

@media (max-width: 480px) {
    .about-hero-content {
        padding: 20px 15px;
        min-height: auto;
    }
    
    .about-title {
        font-size: 1.6rem;
        font-weight: 200;
        line-height: 1.1;
        margin-bottom: 10px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .about-hero {
        min-height: 60vh;
    }
    
    .about-content {
        padding: 40px 15px;
    }
    
    .about-text-content {
        gap: 20px;
    }
    
    .companies-grid {
        grid-template-columns: 1fr;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .values {
        padding: 60px 15px;
    }
    
    .values-icons-container {
        flex-direction: row;
        padding: 45px 10px;
        gap: 10px;
    }
    
    .value-icon-separator {
        transform: none;
        margin: 0 5px;
        margin-top: 20px;
    }
    
    .value-icon-image {
        width: 60px;
        height: 60px;
    }
    
    .value-icon-item h3 {
        margin: 0 0 8px 0;
        font-size: 8px;
    }
    
    .icon-values-title {
        font-size: 1.8rem;
    }
    
    /* Disable complex animations on mobile for better UX */
    .values-icons-container:hover .value-icon-item:first-child .value-icon-image,
    .values-icons-container:hover .value-icon-item:last-child .value-icon-image {
        transform: none;
    }
    
    .values-icons-container::after {
        width: 120px;
        height: 120px;
        background-image: url('../Shared/assets/images/IFSP-ICON.jpg');
        background-size: cover;
        background-position: center;
        border-radius: 50%;
        opacity: 0; /* Start completely hidden */
        transform: translate(-50%, -50%) scale(0);
        display: block; /* Keep display block but use opacity and scale to hide */
        transition: none; /* Remove conflicting transition, let scroll-triggered handle it */
    }
    
    .values-icons-container::before {
        content: 'iFSP';
        font-size: 1.4rem;
        transform: translate(-50%, -95px);
        opacity: 0; /* Start hidden */
    }
    
    /* Mobile scroll-triggered animations */
    .icon-values-content.scroll-triggered .values-icons-container {
        max-width: 300px;
        padding: 45px 10px;
        transition: max-width 1.2s ease-in-out 2s;
    }
    
    .icon-values-content.scroll-triggered .value-icon-separator {
        opacity: 0;
        transition: opacity 0.5s ease 2s;
    }
    
    .icon-values-content.scroll-triggered .value-icon-item h3 {
        opacity: 0;
        transition: opacity 0.5s ease 2s;
    }
    
    .icon-values-content.scroll-triggered .value-icon-item:first-child .value-icon-image {
        transform: translateX(100px) rotate(270deg);
        opacity: 0;
        transition: transform 2s ease-in-out 2s, opacity 2s ease-in-out 2s;
    }
    
    .icon-values-content.scroll-triggered .value-icon-item:last-child .value-icon-image {
        transform: translateX(-100px) rotate(-270deg);
        opacity: 0;
        transition: transform 2s ease-in-out 2s, opacity 2s ease-in-out 2s;
    }
    
    .icon-values-content.scroll-triggered .value-icon-item:nth-child(3) .value-icon-image {
        opacity: 0;
        transition: opacity 2s ease-in-out 2s;
    }
    
    .icon-values-content.scroll-triggered .values-icons-container::after {
        transform: translate(-50%, calc(-50% + 3px)) scale(1) rotate(180deg);
        animation: continuousRotate 8s linear infinite 4.7s;
        opacity: 1;
        transition: transform 1.2s ease-out 3.5s, opacity 1.2s ease-out 3.5s;
    }
    
    .icon-values-content.scroll-triggered .values-icons-container::before {
        opacity: 1;
        transition: opacity 1.2s ease-in-out 7.6s;
    }
}