/* Basic fixes to prevent horizontal scrolling */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* About Us Page Specific Styles */
.about-hero {
    padding: 60px 0;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.about-hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.3s;
}

.about-hero h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.5s ease;
    animation: expandLine 1s forwards 0.8s;
}

.about-hero p {
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.7;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.6s;
}

@keyframes expandLine {
    to { transform: scaleX(1); }
}

.mission-section,
.values-section {
    padding: 80px 0;
    position: relative;
}

.mission-section {
    background-color: var(--darker-color);
    position: relative;
    z-index: 2;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
    position: relative;
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.mission-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.mission-text {
    flex: 1;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.mission-text.visible {
    opacity: 1;
    transform: translateX(0);
}

.mission-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 20px;
}

.mission-image {
    flex: 1;
    position: relative;
    min-height: 350px;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease;
    max-width: 100%; /* Added to prevent overflow */
}

.mission-image.visible {
    opacity: 1;
    transform: translateX(0);
}

.mission-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
}

.mission-image::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 15px;
    width: calc(100% - 30px); /* Fixed to prevent overflow */
    height: 100%;
    border: 2px solid var(--accent-color);
    border-radius: 20px;
    z-index: -1;
    transition: all 0.3s ease;
}

.mission-image:hover img {
    transform: scale(1.02);
}

.mission-image:hover::before {
    top: -20px;
    left: 20px;
}

.values-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.value-card {
    background-color: var(--dark-card);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.value-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.value-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
}

.value-icon {
    background: var(--gradient);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
    font-size: 24px;
    position: relative;
    overflow: hidden;
}

.value-icon i {
    position: relative;
    z-index: 2;
}

.value-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    top: -100%;
    left: -100%;
    animation: shimmerIcon 3s infinite;
}

@keyframes shimmerIcon {
    to {
        top: 100%;
        left: 100%;
    }
}

.value-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.value-description {
    color: var(--text-light);
    line-height: 1.6;
}

/* Background effects */
.bg-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(76, 201, 240, 0.1));
    animation: float 15s infinite ease-in-out;
    max-width: 60px; /* Added to prevent overflow */
    max-height: 60px; /* Added to prevent overflow */
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Call to action */
.cta-section {
    padding: 60px 0;
    text-align: center;
    background-color: var(--darker-color);
    position: relative;
    overflow: hidden;
}

.cta-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.cta-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.cta-text {
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.7;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.cta-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.cta-button {
    background: var(--gradient);
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.cta-button.visible {
    opacity: 1;
    transform: translateY(0);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.4);
    background: var(--gradient-alt);
}

/* Container class fix to prevent horizontal overflow */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Reduced padding for mobile */
    position: relative;
}

/* Responsive styles */
@media (max-width: 992px) {
    .mission-content {
        flex-direction: column;
    }
    
    .mission-image {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .about-hero h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .mission-section,
    .values-section {
        padding: 60px 20px; /* Added horizontal padding */
    }
    
    /* Adjust values grid for mobile */
    .values-container {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
    
    /* Ensure all text is properly contained */
    .about-hero p,
    .mission-text p,
    .value-description,
    .cta-text {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .about-hero {
        padding: 40px 15px; /* Added horizontal padding */
    }
    
    .about-hero h1 {
        font-size: 2rem;
    }
    
    .about-hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .mission-text p {
        font-size: 1rem;
    }
    
    .mission-image {
        min-height: 250px;
    }
    
    /* Fix for decorative mission image border */
    .mission-image::before {
        width: calc(100% - 15px);
        left: 7px;
    }
    
    .mission-image:hover::before {
        top: -15px;
        left: 10px;
    }
    
    /* Fix for cta section */
    .cta-section {
        padding: 40px 15px;
    }
    
    /* Ensure buttons don't overflow */
    .cta-button {
        width: auto;
        max-width: 100%;
        padding: 15px 25px;
    }
}