/* About Section - Exact Match to Original Elementor Design */

.about-section {
    position: relative;
    padding: 80px 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%,
        rgba(248, 251, 255, 1) 50%,
        rgba(255, 255, 255, 1) 100%);
    overflow: hidden;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    min-height: 400px;
    text-align: center;
}

.about-text-content {
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Ensure consistent width for both languages */
.about-text-content * {
    max-width: 100%;
    box-sizing: border-box;
}

/* UFG Logo Watermark - Exact Match to Original Position */
.about-section::before {
    content: '';
    position: absolute;
    top: 30%;
    left: 10%;
    width: 300px;
    height: 300px;
    background-image: url('/assets/images/aufg-logo.png');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    opacity: 0.08;
    transform: translateY(-50%);
    z-index: 0;
    pointer-events: none;
    animation: fadeInBackground 2s ease-out 1s both,
               gentleFloat 15s ease-in-out 3s infinite;
}

/* About Heading - Exact Match to Original Elementor Properties */
.about-heading {
    font-family: "Poppins", sans-serif;
    font-size: 36px;
    font-weight: 700;
    text-transform: uppercase;
    font-style: normal;
    text-decoration: none;
    line-height: 1em;
    letter-spacing: 0.04em;
    color: #0C4F7C;
    margin: 0 0 30px 0;
    text-align: center;
}

/* About Description */
.about-description {
    margin-bottom: 40px;
    line-height: 1.6;
}

.about-description p {
    margin: 0 0 16px 0;
    font-size: 16px;
    line-height: 1.6;
    font-family: "Roboto", sans-serif;
}

/* Text Styling - Exact Match to Original Image */
.company-name {
    font-weight: 600;
    color: #1e88e5;
}

.text-content {
    color: #333333;
    font-weight: 400;
}

.year {
    font-weight: 600;
    color: #1e88e5;
}

/* Button Container */
.about-button-container {
    text-align: center;
    margin-top: 24px;
}

/* Learn More Button - Exact Match to Original */
.about-learn-more-btn {
    background: linear-gradient(135deg, #038BB9 0%, #1169B5 100%);
    color: white;
    padding: 16px 32px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(3, 139, 185, 0.2);
    font-family: inherit;
    min-width: 150px;
    transform: translateY(0px) scale(1);
}

.about-learn-more-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 25px rgba(3, 139, 185, 0.3);
}

.about-learn-more-btn:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 4px 6px rgba(3, 139, 185, 0.2);
}

/* Video section now handled by modern-video-player.css */

/* Animations - Exact Match */
@keyframes fadeInBackground {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 0.03;
    }
}

@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(-50%) scale(1);
    }
    50% {
        transform: translateY(-50%) scale(1.02);
    }
}

/* RTL styles for about section */
body.rtl-mode .about-section {
    direction: rtl;
}

body.rtl-mode .about-container {
    direction: rtl;
}

body.rtl-mode .about-content {
    direction: rtl;
}

body.rtl-mode .about-text-content {
    text-align: center;
    direction: rtl;
    max-width: 800px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Ensure Arabic text spans respect the container width */
body.rtl-mode .about-text-content .text-ar {
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    display: inline !important;
    box-sizing: border-box !important;
}

/* Ensure all language text spans have consistent width constraints */
.about-text-content .text-en,
.about-text-content .text-ar {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    display: inline;
    box-sizing: border-box;
}

body.rtl-mode .about-heading {
    text-align: center;
    direction: rtl;
}

body.rtl-mode .about-description {
    text-align: center;
    direction: rtl;
}

body.rtl-mode .about-description p {
    text-align: center;
    direction: rtl;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

body.rtl-mode .about-button-container {
    text-align: center;
    direction: rtl;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .about-content {
        gap: 40px;
    }
    
    .about-heading {
        font-size: 28px;
    }
    
    .about-container {
        padding: 0 16px;
    }
    
}

@media (max-width: 768px) {
    .about-section {
        padding: 60px 0;
    }
    
    .about-container {
        padding: 0 15px;
    }
    
    .about-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .about-text-content {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .about-heading {
        font-size: 24px;
        text-align: center;
        margin-bottom: 20px;
        line-height: 1.2;
    }
    
    .about-description {
        text-align: center;
        margin-bottom: 30px;
    }
    
    .about-description p {
        font-size: 15px;
        line-height: 1.7;
        margin-bottom: 15px;
    }
    
    .about-button-container {
        text-align: center;
        margin-top: 20px;
    }
    
    .about-learn-more-btn {
        padding: 15px 30px;
        font-size: 15px;
        min-width: 160px;
    }
    
    /* Mobile logo positioning */
    .about-text-content::before {
        width: 250px;
        height: 250px;
        right: -30%;
        opacity: 0.02;
    }
    
    /* RTL styles for tablet/mobile */
    body.rtl-mode .about-content {
        direction: rtl;
        text-align: center;
    }

    body.rtl-mode .about-text-content {
        direction: rtl;
        text-align: center;
    }

    body.rtl-mode .about-heading {
        text-align: center;
        direction: rtl;
    }

    body.rtl-mode .about-description {
        text-align: center;
        direction: rtl;
    }

    body.rtl-mode .about-description p {
        text-align: center;
        direction: rtl;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }

    body.rtl-mode .about-button-container {
        text-align: center;
        direction: rtl;
    }
}

@media (max-width: 480px) {
    .about-section {
        padding: 40px 0;
    }
    
    .about-container {
        padding: 0 12px;
    }
    
    .about-content {
        gap: 25px;
    }
    
    .about-text-content {
        padding: 0 5px;
    }
    
    .about-heading {
        font-size: 20px;
        margin-bottom: 15px;
        line-height: 1.3;
    }
    
    .about-description {
        margin-bottom: 25px;
    }
    
    .about-description p {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 12px;
    }
    
    .about-button-container {
        margin-top: 15px;
    }
    
    .about-learn-more-btn {
        padding: 14px 25px;
        font-size: 14px;
        min-width: 140px;
    }
    
    /* Mobile logo positioning */
    .about-text-content::before {
        width: 200px;
        height: 200px;
        opacity: 0.01;
    }
    
    /* RTL styles for small mobile */
    body.rtl-mode .about-section {
        direction: rtl;
    }

    body.rtl-mode .about-container {
        direction: rtl;
    }

    body.rtl-mode .about-content {
        direction: rtl;
        text-align: center;
    }

    body.rtl-mode .about-text-content {
        direction: rtl;
        text-align: center;
    }

    body.rtl-mode .about-heading {
        text-align: center;
        direction: rtl;
    }

    body.rtl-mode .about-description {
        text-align: center;
        direction: rtl;
    }

    body.rtl-mode .about-description p {
        text-align: center;
        direction: rtl;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }

    body.rtl-mode .about-button-container {
        text-align: center;
        direction: rtl;
    }
}

/* Extra small mobile devices */
@media (max-width: 360px) {
    .about-section {
        padding: 35px 0;
    }
    
    .about-container {
        padding: 0 10px;
    }
    
    .about-content {
        gap: 20px;
    }
    
    .about-text-content {
        padding: 0;
    }
    
    .about-heading {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .about-description p {
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 10px;
    }
    
    .about-learn-more-btn {
        padding: 12px 20px;
        font-size: 13px;
        min-width: 120px;
    }
    
    /* Hide background logo on very small screens */
    .about-section::before {
        display: none;
    }
    
    .about-text-content::before {
        display: none;
    }
    
    /* RTL styles for extra small mobile */
    body.rtl-mode .about-section {
        direction: rtl;
    }

    body.rtl-mode .about-container {
        direction: rtl;
    }

    body.rtl-mode .about-content {
        direction: rtl;
        text-align: center;
    }

    body.rtl-mode .about-text-content {
        direction: rtl;
        text-align: center;
    }

    body.rtl-mode .about-heading {
        text-align: center;
        direction: rtl;
    }

    body.rtl-mode .about-description {
        text-align: center;
        direction: rtl;
    }

    body.rtl-mode .about-description p {
        text-align: center;
        direction: rtl;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    body.rtl-mode .about-button-container {
        text-align: center;
        direction: rtl;
    }
}

/* Fix for gradient animation causing RTL scroll issues */
.bg-gradient-to-r {
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* RTL version of gradient */
body.rtl-mode .bg-gradient-to-r {
    background: linear-gradient(to left, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* Prevent horizontal scroll in RTL mode */
body.rtl-mode .absolute.inset-0 {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Global RTL overflow fix */
body.rtl-mode {
    overflow-x: hidden;
}

body.rtl-mode * {
    max-width: 100%;
}

/* Fix for mobile RTL layout issues */
@media (max-width: 768px) {
    body.rtl-mode {
        overflow-x: hidden !important;
    }
    
    body.rtl-mode .absolute {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    body.rtl-mode .bg-gradient-to-r {
        background: linear-gradient(to left, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
    }
}

/* ===== TIMELINE RTL FIXES ===== */
/* Fix timeline center line in RTL */
body.rtl-mode .timeline-line {
    right: 50% !important;
    left: auto !important;
    transform: translateX(50%) !important;
}

/* Fix timeline dots in RTL */
body.rtl-mode .timeline-dot {
    right: 50% !important;
    left: auto !important;
    transform: translateX(50%) !important;
}

/* Fix timeline alternating layout in RTL */
body.rtl-mode .timeline-item:nth-child(odd) .w-1\/2:first-child {
    order: 2;
    padding-right: 0;
    padding-left: 2rem;
    text-align: left;
}

body.rtl-mode .timeline-item:nth-child(odd) .w-1\/2:last-child {
    order: 1;
    padding-left: 0;
    padding-right: 2rem;
    text-align: right;
}

body.rtl-mode .timeline-item:nth-child(even) .w-1\/2:first-child {
    padding-right: 0;
    padding-left: 2rem;
    text-align: left;
}

body.rtl-mode .timeline-item:nth-child(even) .w-1\/2:last-child {
    padding-left: 0;
    padding-right: 2rem;
    text-align: right;
}

/* Mobile timeline fixes for RTL */
@media (max-width: 768px) {
    body.rtl-mode .timeline-item {
        flex-direction: row-reverse;
        text-align: right;
    }
    
    body.rtl-mode .timeline-content {
        text-align: right;
        direction: rtl;
    }
    
    body.rtl-mode .timeline-year {
        text-align: right;
    }
    
    body.rtl-mode .w-1\/2 {
        text-align: right !important;
        direction: rtl;
    }
}

/* Prevent timeline horizontal overflow */
@media (max-width: 768px) {
    body.rtl-mode .space-y-16 {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    body.rtl-mode .timeline-item {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    body.rtl-mode .timeline-content {
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Ensure proper typography */
.about-section * {
    box-sizing: border-box;
}

/* Content layering */
.about-content > * {
    position: relative;
    z-index: 1;
}