/*--------- About Us Interface Styles (Dynamic & Premium) ----------*/

.about-section {
    padding: 0;
    background-color: var(--off-white, #f8f9fa);
    position: relative;
    overflow-x: clip; 
}

.hero-banner {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 235, 233, 0.8)), url('../images/pattern-bg.png');
    backdrop-filter: var(--backdrop-blur, blur(12px));
    padding: clamp(80px, 12vw, 150px) 0;
    text-align: center;
    border-bottom-left-radius: clamp(40px, 6vw, 80px);
    border-bottom-right-radius: clamp(40px, 6vw, 80px);
    margin-bottom: clamp(40px, 8vw, 80px);
    box-shadow: 0 15px 35px rgba(141, 110, 99, 0.1);
    border-bottom: 2px solid rgba(255, 255, 255, 0.6);
    position: relative;
    animation: slideDownFade 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.headline-title {
    background: linear-gradient(45deg, var(--dark-coffee, #3e2723), var(--primary-brown, #8d6e63));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    letter-spacing: -1px;
    margin: 0 auto;
    filter: drop-shadow(2px 4px 10px rgba(141, 110, 99, 0.15));
    animation: scaleUp 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.text-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.headline {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
    color: var(--dark-coffee, #3e2723);
    position: relative;
}

.headline::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-brown, #8d6e63);
    border-radius: 4px;
    margin: 15px auto 0;
    transition: width 0.4s ease;
}

.headline:hover::after {
    width: 120px;
}

.main-content {
    padding: clamp(40px, 8vw, 80px) 0;
    position: relative;
    z-index: 2;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start; 
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box; /* Fix: Keeps alignment perfectly centered */
}

@media (min-width: 992px) {
    .about-grid {
        grid-template-columns: 7fr 5fr;
    }
}

.text-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: clamp(35px, 6vw, 60px);
    border-radius: clamp(20px, 4vw, 30px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04), inset 0 0 0 1px rgba(255,255,255,0.5);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: center;
    width: 100%;
    box-sizing: border-box; /* Fix: Prevents content padding from stretching the grid */
}

.text-content:hover {
    box-shadow: 0 30px 60px rgba(141, 110, 99, 0.12), inset 0 0 0 1px rgba(255,255,255,0.8);
    transform: translateY(-8px) scale(1.01);
}

.lead-text {
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    font-weight: 700;
    color: var(--dark-coffee, #3e2723);
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
    line-height: 1.5;
}

.text-content p {
    color: var(--text-muted, #555);
    line-height: clamp(1.7, 2.5vw, 1.9);
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    margin-bottom: clamp(15px, 3vw, 25px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-brown, #8d6e63), var(--dark-coffee, #3e2723));
    color: var(--pure-white, #ffffff);
    margin: clamp(20px, 4vw, 30px) auto 0;
    border-radius: 50px;
    padding: clamp(12px, 2.5vw, 18px) clamp(30px, 5vw, 50px);
    font-weight: 700;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    box-shadow: 0 10px 20px rgba(141, 110, 99, 0.3);
    cursor: pointer;
    display: inline-block;
}

.btn-primary:hover, .btn-primary:focus {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 30px rgba(141, 110, 99, 0.4);
    outline: none;
}

.btn-primary:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 5px 10px rgba(141, 110, 99, 0.2);
}

/* Expandable Text Logic */
.expandable-text {
    max-height: clamp(140px, 25vw, 200px);
    overflow: hidden;
    position: relative;
    transition: max-height 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.expandable-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: clamp(60px, 10vw, 100px);
    background: linear-gradient(to top, rgba(255,255,255,1), rgba(255,255,255,0));
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.expandable-text.expanded {
    max-height: 4000px;
}

.expandable-text.expanded::after {
    opacity: 0;
}

.image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: sticky; 
    top: clamp(80px, 15vh, 120px);
    z-index: 5;
}

.image-wrapper::before {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(141, 110, 99, 0.1) 0%, rgba(255,255,255,0) 70%);
    z-index: -1;
    animation: pulseGlow 4s infinite alternate;
}

.flag-container {
    display: block;
    width: 100%;
    animation: floatUpDown 4s ease-in-out infinite; 
}

.sa-flag {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: clamp(10px, 2vw, 20px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin: 0 auto;
}

.sa-flag:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.mission-vision {
    background: linear-gradient(to bottom, #ffffff, #f8f9fa);
    padding: clamp(60px, 10vw, 120px) 0;
}

.mv-grid {
    display: grid;
    grid-template-columns: minmax(auto, 500px);
    justify-content: center;
    align-items: stretch;
    gap: clamp(2rem, 5vw, 3rem);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box; /* Fix: Keeps alignment perfectly centered */
}

@media (min-width: 768px) {
    .mv-grid {
        grid-template-columns: repeat(2, minmax(auto, 500px));
    }
}

.card {
    background: rgba(255, 255, 255, 0.9);
    padding: clamp(30px, 5vw, 50px);
    border-radius: clamp(20px, 4vw, 30px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(141, 110, 99, 0.1);
    height: 100%;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-brown), var(--dark-coffee));
    transform: scaleX(0);
    transition: transform 0.5s ease;
    transform-origin: left;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(141, 110, 99, 0.15);
}

.card:hover::before {
    transform: scaleX(1);
}

.text-primary {
    color: var(--primary-brown, #8d6e63);
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 800;
}

/* Timeline Section */
.timeline-section {
    background: var(--pure-white, #ffffff);
    padding: clamp(60px, 10vw, 120px) 0;
}

.timeline {
    position: relative;
    max-width: clamp(300px, 90vw, 1000px);
    margin: 0 auto;
    padding: clamp(40px, 6vw, 60px) 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: clamp(4px, 0.8vw, 6px);
    background: linear-gradient(to bottom, rgba(141,110,99,0.1), var(--primary-brown), rgba(141,110,99,0.1));
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: calc(clamp(4px, 0.8vw, 6px) / -2);
    border-radius: 10px;
}

.timeline-item {
    position: relative;
    width: 100%;
    margin-bottom: clamp(40px, 8vw, 80px);
    perspective: 1000px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: clamp(20px, 4vw, 30px);
    height: clamp(20px, 4vw, 30px);
    right: calc(50% - clamp(10px, 2vw, 15px));
    background: var(--pure-white, #ffffff);
    border: clamp(4px, 1vw, 6px) solid var(--primary-brown, #8d6e63);
    top: clamp(25px, 5vw, 40px);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 6px rgba(141, 110, 99, 0.2);
    transition: all 0.4s ease;
}

.timeline-item:hover::after {
    background: var(--primary-brown, #8d6e63);
    box-shadow: 0 0 0 10px rgba(141, 110, 99, 0.3), 0 0 20px rgba(141, 110, 99, 0.6);
    transform: scale(1.2);
}

.timeline-column {
    width: 100%;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: clamp(25px, 5vw, 45px);
    border-radius: clamp(20px, 4vw, 30px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(141, 110, 99, 0.1);
    position: relative;
    width: 45%;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

.timeline-content:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 20px 40px rgba(141, 110, 99, 0.15);
}

.timeline-item.left .timeline-content {
    margin-left: 0;
    margin-right: auto;
}

.timeline-item.right .timeline-content {
    margin-left: auto;
    margin-right: 0;
}

@media screen and (max-width: 768px) {
    .timeline::after {
        left: clamp(24px, 8vw, 40px);
    }
    
    .timeline-item::after {
        right: auto;
        left: clamp(14px, 5vw, 25px);
    }
    
    .timeline-content {
        width: calc(100% - clamp(60px, 15vw, 90px));
        margin-left: clamp(60px, 15vw, 90px) !important;
    }
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--dark-coffee, #3e2723), #1a100d);
    color: var(--pure-white, #ffffff);
    padding: clamp(60px, 10vw, 120px) 0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 10%, transparent 20%);
    background-size: 20px 20px;
    opacity: 0.3;
    animation: rotateBg 60s linear infinite;
}

.stats-section .headline {
    color: var(--pure-white, #ffffff);
}

.stats-section .headline::after {
    background: var(--pure-white, #ffffff);
}

/* Fixed Centering for Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: clamp(1rem, 2vw, 2rem); 
    text-align: center;
    position: relative;
    z-index: 2;
    width: 100%;
    margin: 0 auto;
    max-width: 1200px;
    box-sizing: border-box; /* Fix: Keeps alignment perfectly centered */
}

@media (min-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr); 
    }
}

.stat-card {
    padding: clamp(15px, 2vw, 25px); 
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.stat-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.3);
}

.stat-number {
    font-size: clamp(1.8rem, 3.5vw, 3rem); 
    font-weight: 900;
    margin-bottom: clamp(0.5rem, 2vw, 1rem);
    background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}

.stat-label {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: clamp(0.75rem, 1.2vw, 1rem); 
    font-weight: 600;
    color: #e0e0e0;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes slideDownFade {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
    from { opacity: 0.5; transform: scale(1); }
    to { opacity: 1; transform: scale(1.1); }
}

@keyframes rotateBg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes floatUpDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}