/* About Hero Section */
.about-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    margin-top: 0;
    padding-top: var(--header-height, 80px);
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1552053831-71594a27632d?w=1200&q=80') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 0;
}

@media (min-width: 1440px) {
    .about-hero {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}

@media (min-width: 1920px) {
    .about-hero {
        padding-left: 6rem;
        padding-right: 6rem;
    }
}

.about-hero-content {
    max-width: 800px;
    text-align: center;
    color: #ffffff;
    opacity: 0;
    animation: fadeInUp 1.2s ease-out 0.3s forwards;
}

@media (min-width: 1440px) {
    .about-hero-content {
        max-width: 1000px;
    }
}

@media (min-width: 1920px) {
    .about-hero-content {
        max-width: 1200px;
    }
}

.about-hero h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8), 0 0 20px rgba(0,0,0,0.5);
}

.about-hero p {
    font-size: 1.2rem;
    color: #ffffff;
    line-height: 1.7;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.8), 0 0 15px rgba(0,0,0,0.5);
}

/* About Section */
.about-section {
    padding: 4rem 2rem;
    scroll-margin-top: calc(var(--header-height) + 20px);
}

.about-section:nth-child(even) {
    background-color: #f8f8f8;
}

.about-section:nth-child(odd) {
    background-color: #ffffff;
}

.about-section-title {
    max-width: 100%;
    margin: 0 auto 3rem;
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c2c2c;
    position: relative;
    padding-bottom: 1rem;
    padding-left: 2rem;
    padding-right: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    width: 100%;
}

@media (min-width: 1440px) {
    .about-section-title {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

@media (min-width: 1920px) {
    .about-section-title {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}

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

.about-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #2F7F7A, #5FA5A0);
    border-radius: 2px;
}

.about-section-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    min-height: 500px;
    width: 100%;
    padding: 0 2rem;
}

@media (min-width: 1440px) {
    .about-section-container {
        max-width: 1400px;
        gap: 5rem;
        padding: 0 3rem;
    }
}

@media (min-width: 1920px) {
    .about-section-container {
        max-width: 1600px;
        gap: 6rem;
        padding: 0 4rem;
    }
}

.about-section-content {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-self: start;
    order: 1;
}

.about-section-content.animated {
    opacity: 1;
    transform: translateX(0);
}


.about-section-text {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
}

.about-section-text p {
    margin-bottom: 1.5rem;
}

.about-section-text p:last-child {
    margin-bottom: 0;
}

/* Carousel Styles */
.about-section-carousel {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: start;
    order: 2;
}

.about-section-carousel.animated {
    opacity: 1;
    transform: translateX(0);
}

/* Flip order for Our Team and Facilities sections */
#our-team .about-section-content,
#facilities .about-section-content {
    order: 2;
    transform: translateX(30px);
}

#our-team .about-section-content.animated,
#facilities .about-section-content.animated {
    transform: translateX(0);
}

#our-team .about-section-carousel,
#facilities .about-section-carousel {
    order: 1;
    transform: translateX(-30px);
}

#our-team .about-section-carousel.animated,
#facilities .about-section-carousel.animated {
    transform: translateX(0);
}

.carousel-container {
    position: relative;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    background-color: #ffffff;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
}

.carousel-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    position: relative;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Carousel Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    color: #2c2c2c;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.carousel-btn:hover {
    background-color: #2F7F7A;
    color: #2c2c2c;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn-prev {
    left: 15px;
}

.carousel-btn-next {
    right: 15px;
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicator:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.carousel-indicator.active {
    background-color: #2F7F7A;
    border-color: #2F7F7A;
    transform: scale(1.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .about-hero {
        height: 50vh;
        min-height: 350px;
    }

    .about-hero h1 {
        font-size: 2.5rem;
    }

    .about-section-container {
        gap: 3rem;
    }

    .about-section-title {
        font-size: 2.2rem;
        margin-bottom: 2.5rem;
    }
}

@media (max-width: 768px) {
    .about-hero {
        height: 45vh;
        min-height: 300px;
        padding-top: var(--header-height, 70px);
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .about-hero h1 {
        font-size: 2rem;
    }

    .about-hero p {
        font-size: 1rem;
    }

    .about-section {
        padding: 3rem 1.5rem;
    }

    .about-section-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        min-height: auto;
    }

    .about-section-content {
        transform: translateY(30px) !important;
    }

    .about-section:nth-child(even) .about-section-content {
        transform: translateY(30px) !important;
    }

    .about-section-content.animated {
        transform: translateY(0) !important;
    }

    .about-section-carousel {
        transform: translateY(30px) !important;
        order: -1;
    }

    .about-section:nth-child(even) .about-section-carousel {
        transform: translateY(30px) !important;
    }

    .about-section-carousel.animated {
        transform: translateY(0) !important;
    }

    .about-section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .about-section-text {
        font-size: 1rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-btn-prev {
        left: 10px;
    }

    .carousel-btn-next {
        right: 10px;
    }

    .carousel-btn svg {
        width: 20px;
        height: 20px;
    }

    .carousel-indicators {
        bottom: 15px;
    }

    .carousel-indicator {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .about-hero {
        height: 40vh;
        min-height: 250px;
        padding-top: var(--header-height, 60px);
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .about-hero h1 {
        font-size: 1.75rem;
    }

    .about-hero p {
        font-size: 0.95rem;
    }

    .about-section {
        padding: 2.5rem 1rem;
    }

    .about-section-container {
        gap: 2rem;
    }

    .about-section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .about-section-text {
        font-size: 0.95rem;
    }

    .about-section-text p {
        margin-bottom: 1.25rem;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
    }

    .carousel-btn-prev {
        left: 8px;
    }

    .carousel-btn-next {
        right: 8px;
    }

    .carousel-btn svg {
        width: 18px;
        height: 18px;
    }

    .carousel-indicators {
        bottom: 12px;
        gap: 8px;
    }

    .carousel-indicator {
        width: 8px;
        height: 8px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .carousel-btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Testimonials Section */
.testimonials-section {
    background-color: #f8f8f8;
}

.testimonials-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 0 2rem;
    width: 100%;
}

@media (min-width: 1440px) {
    .testimonials-grid {
        max-width: 1400px;
        gap: 2.5rem;
    }
}

@media (min-width: 1920px) {
    .testimonials-grid {
        max-width: 1600px;
        gap: 3rem;
    }
}

.testimonial-card {
    background-color: #ffffff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(30px);
    display: flex;
    flex-direction: column;
}

.testimonial-card.animated {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-color: #2F7F7A;
}

.testimonial-stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #FFD700;
    line-height: 1;
}

.testimonial-stars .star {
    display: inline-block;
}

.testimonial-text {
    font-size: 1rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
    font-style: italic;
}

.testimonial-author {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.testimonial-author-info {
    display: flex;
    flex-direction: column;
}

.testimonial-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c2c2c;
    margin: 0 0 0.25rem 0;
}

.testimonial-service {
    font-size: 0.9rem;
    color: #999;
    margin: 0;
}

/* Testimonials Responsive */
@media (max-width: 1024px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .testimonials-section {
        padding: 3rem 1.5rem;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .testimonial-stars {
        font-size: 1.3rem;
        margin-bottom: 1.25rem;
    }

    .testimonial-text {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }

    .testimonial-name {
        font-size: 1rem;
    }

    .testimonial-service {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .testimonials-section {
        padding: 2.5rem 1rem;
    }

    .testimonial-card {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .testimonial-stars {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .testimonial-text {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}

