/* Hero section */
.hero {
    height: 80vh;
    padding: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 0;
    justify-content: center;
    background: linear-gradient(135deg, rgba(235, 235, 235, 0.9) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.hero .container {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 5;
    justify-content: flex-start;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background-color: rgba(88, 139, 139, 0.1);
    z-index: -1;
    animation: pulse 8s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.1); opacity: 0.9; }
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background-color: rgba(165, 121, 130, 0.1);
    z-index: -1;
    animation: pulse 10s ease-in-out infinite alternate-reverse;
}

.hero-content {
    max-width: 600px;
    animation: slideInLeft 0.8s ease-out forwards;
    padding-left: 20px;
    z-index: 2;
    position: relative;
}

@keyframes slideInLeft {
    0% { transform: translateX(-50px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

.hero h1 {
    font-size: 56px;
    line-height: 1.2;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #735D78 0%, #588B8B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent; /* Fallback for browsers that don't support text-fill-color */
}

.hero h1 span {
    color: var(--purple);
    position: relative;
    display: inline-block;
    opacity: 0;
    animation: slideInWord 0.8s ease-in-out 0.5s forwards;
    background: linear-gradient(90deg, #A57982 0%, #588B8B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent; /* Fallback for browsers that don't support text-fill-color */
}

@keyframes slideInWord {
    0% { transform: translateX(-20px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

.hero h1 span::after {
    content: none;
}

/* Keeping the animation keyframes for reference */
@keyframes underlineExpand {
    0% { width: 0; }
    100% { width: 100%; }
}

.hero p {
    font-size: 20px;
    margin-bottom: 40px;
    color: #4a4a4a;
    animation: fadeIn 1s ease-out 0.3s forwards;
    opacity: 0;
    background: linear-gradient(90deg, #588B8B 0%, #735D78 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    font-weight: 500;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.hero-buttons {
    display: flex;
    gap: 20px;
    animation: fadeIn 1s ease-out 0.6s forwards;
    opacity: 0;
}

.hero-buttons .btn {
    min-width: 200px;  /* Set fixed minimum width for both buttons */
    text-align: center;
    padding: 12px 30px;
}

.hero-buttons .btn-primary {
    background: linear-gradient(135deg, #735D78 30%, #588B8B 100%);
    border: none;
    transition: all 0.3s ease;
}

.hero-buttons .btn-primary:hover {
    background: linear-gradient(135deg, #588B8B 0%, #735D78 70%);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(115, 93, 120, 0.3);
}

.hero-buttons .btn-secondary {
    background: transparent;
    border: 2px solid #735D78;
    color: #735D78;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-buttons .btn-secondary:hover {
    color: white;
    border-color: transparent;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(115, 93, 120, 0.3);
}

.hero-buttons .btn-secondary:active {
    transform: translateY(0) scale(1);
}

.hero-buttons .btn-secondary:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #A57982 0%, #588B8B 100%);
    transition: all 0.3s ease;
    z-index: -1;
}

.hero-buttons .btn-secondary:hover:before {
    width: 100%;
}

.hero-image {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 45%;
    max-width: 600px;
    z-index: 1;
    opacity: 0;
    animation: slideInRight 1s ease-out 0.5s forwards;
}

@keyframes slideInRight {
    0% { transform: translate(50px, -50%); opacity: 0; }
    100% { transform: translate(0, -50%); opacity: 0.9; }
}

/* Features section */
.features {
    padding: 100px 0;
    background-color: white;
    position: relative;
    z-index: 10;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 40px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background-color: var(--teal);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.section-header p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto;
    color: #666;
}

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

.feature-card {
    background-color: var(--light-gray);
    border-radius: 10px;
    padding: 40px 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px);
}

.feature-card.animated {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--purple);
    z-index: -1;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-card:hover::before {
    transform: scaleY(1);
}

.feature-card:hover h3,
.feature-card:hover p,
.feature-card:hover .feature-icon {
    color: white;
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 20px;
    color: var(--teal);
    transition: color 0.3s ease, transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    color: white;
    transform: translateY(-5px) scale(1.1);
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.feature-card p {
    transition: color 0.3s ease;
}

/* Services section */
.services {
    padding: 100px 0;
    background-color: var(--light-gray);
}

.services-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 25px;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: 'Jost', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 5px 10px;
}

.tab-btn.active {
    color: var(--purple);
    border-bottom-color: var(--purple);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    transform: translateY(20px);
    opacity: 0;
}

.service-card.animated {
    animation: fadeInUp 0.6s ease forwards;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: rotate(10deg) scale(1.1);
}

.service-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.service-content p {
    color: #666;
    font-size: 15px;
}

/* About section */
.about {
    padding: 100px 0;
    background-color: white;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: stretch;
}

.about-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.about-image {
    position: relative;
    margin-top: 20px;
    margin-bottom: 0;
    max-width: 100%;
}

.about-image img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.about-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    max-height: 300px;
    border: 3px solid var(--teal);
    border-radius: 10px;
    top: 15px;
    left: 15px;
    z-index: -1;
}

.about-text {
    margin-bottom: 10px;
}

.about-text h2 {
    font-size: 40px;
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
    color: #666;
}

.about-right {
    display: flex;
    align-items: center;
    height: 100%;
}

.core-values {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    justify-content: space-between;
    height: 100%;
    padding: 10px 0;
}

.value-item {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    transform: translateY(30px);
    opacity: 0;
    animation: valueItemFadeIn 0.8s ease forwards;
    cursor: pointer;
    display: flex;
    align-items: center;
    text-align: left;
}

.value-item:nth-child(2) {
    animation-delay: 0.2s;
}

.value-item:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes valueItemFadeIn {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.value-item:hover {
    transform: translateY(-7px);
    box-shadow: 0 15px 30px rgba(115, 93, 120, 0.2);
    background-color: white;
}

.value-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #735D78 0%, #588B8B 100%);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.value-item:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.value-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(115, 93, 120, 0.05) 0%, rgba(88, 139, 139, 0.05) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.value-item:hover::after {
    opacity: 1;
}

.value-icon {
    font-size: 24px;
    width: 70px;
    height: 70px;
    min-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 20px;
    background: linear-gradient(135deg, rgba(115, 93, 120, 0.1) 0%, rgba(88, 139, 139, 0.1) 100%);
    color: #588B8B;
    transition: all 0.5s ease;
    position: relative;
    z-index: 1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    animation: iconPulse 3s infinite alternate;
}

.value-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #735D78 0%, #588B8B 100%);
    z-index: -1;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.4s ease;
}

@keyframes iconPulse {
    0% { transform: scale(1); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08); }
    100% { transform: scale(1.05); box-shadow: 0 8px 20px rgba(115, 93, 120, 0.15); }
}

.value-item:hover .value-icon {
    animation: none;
    color: white;
    transform: rotateY(180deg);
    box-shadow: 0 8px 25px rgba(115, 93, 120, 0.3);
}

.value-item:hover .value-icon::before {
    opacity: 1;
    transform: scale(1);
}

.value-content {
    flex: 1;
}

.value-item h3 {
    font-size: 22px;
    margin-bottom: 8px;
    color: #333;
    position: relative;
    transition: all 0.3s ease;
    display: inline-block;
}

.value-item:hover h3 {
    background: linear-gradient(90deg, #735D78 0%, #588B8B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    transform: translateY(-2px);
}

.value-item p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
    transition: all 0.3s ease;
}

/* Teams section */
.teams {
    padding: 100px 0;
    background-color: var(--light-gray);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 350px); /* Fixed width of 350px for each column */
    gap: 30px;
    margin-top: 50px;
    justify-content: center;
    align-items: stretch;
}

.team-member {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    transform: translateY(30px);
    opacity: 0;
    padding: 25px;
    border-radius: 15px;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.3s ease;
    width: 350px; /* Fixed width */
    height: 100%;
}

.team-member.animated {
    animation: fadeInUp 0.8s ease forwards;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.team-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 5px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.team-member:hover .team-avatar {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-info {
    text-align: center;
    flex: 1; /* Allow info section to grow */
    display: flex;
    flex-direction: column;
}

.team-info h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--dark);
}

.team-info p {
    color: #444;
    font-size: 15px;
    line-height: 1.6;
    flex: 1; /* Allow paragraph to grow */
    display: -webkit-box;
    -webkit-line-clamp: 6; /* Limit to 6 lines of text */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-divider {
    height: 1px;
    background-color: #ddd;
    margin: 0 auto;
    width: 80%;
    max-width: 800px;
}

/* Testimonials section */
.testimonials {
    padding: 100px 0;
    background-color: white;
}

.testimonial-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.testimonial-item {
    background-color: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 3px solid var(--teal);
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-text {
    font-size: 18px;
    font-style: italic;
    margin-bottom: 20px;
    color: #444;
    position: relative;
}

.testimonial-text::before,
.testimonial-text::after {
    content: '"';
    font-size: 50px;
    color: var(--purple);
    opacity: 0.2;
    position: absolute;
}

.testimonial-text::before {
    top: -20px;
    left: -15px;
}

.testimonial-text::after {
    bottom: -40px;
    right: -15px;
}

.testimonial-author h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.testimonial-author p {
    color: #666;
    font-size: 14px;
}

/* Contact section */
.contact {
    padding: 100px 0;
    background-color: white;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    font-size: 28px;
    margin-bottom: 30px;
}

.contact-info p {
    margin-bottom: 30px;
    color: #666;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    transform: translateX(-20px);
    opacity: 0;
}

.contact-item.animated {
    animation: slideInLeft 0.6s ease forwards;
}

.contact-item:hover {
    transform: translateX(5px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transition: all 0.3s ease;
}

.contact-item:hover .contact-icon {
    transform: rotate(15deg);
    background-color: var(--purple);
}

.contact-text h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.contact-text p {
    margin-bottom: 0;
    color: #666;
}

.contact-form {
    background-color: var(--light-gray);
    padding: 40px;
    border-radius: 10px;
}

#formMessage {
    display: none;
    padding: 15px;
    margin-top: 20px;
    border-radius: 5px;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Jost', sans-serif;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--teal);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Responsive styles */
@media (max-width: 1200px) {
    .hero h1 {
        font-size: 48px;
    }

    .hero-image {
        width: 40%;
    }
}

@media (max-width: 992px) {
    .hero {
        min-height: 100vh;
        padding: 100px 0;
    }

    .hero .container {
        justify-content: center;
    }

    .hero-content {
        max-width: 100%;
        text-align: center;
        padding: 0 20px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        opacity: 0.3;
        width: 80%;
        right: 50%;
        transform: translate(50%, -50%);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-left {
        order: 1;
    }

    .about-right {
        order: 2;
    }

    .about-image {
        margin-top: 20px;
        margin-bottom: 0;
    }

    .about-image img {
        max-height: 300px;
    }

    .core-values {
        padding: 10px 0 20px;
        gap: 30px;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .value-item {
        padding: 24px 20px;
    }

    .value-icon {
        width: 60px;
        height: 60px;
        min-width: 60px;
        margin-right: 15px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 36px;
        line-height: 1.3;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }

    .features-grid,
    .team-grid {
        grid-template-columns: 1fr;
    }

    .core-values {
        gap: 25px;
        padding: 5px 0 15px;
    }

    .value-item h3 {
        font-size: 20px;
    }

    .value-item p {
        font-size: 14px;
    }

    .team-grid {
        grid-template-columns: minmax(auto, 350px);
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 32px;
    }

    .hero-content {
        padding: 0 15px;
    }

    .value-item {
        flex-direction: column;
        text-align: center;
        padding: 25px 15px;
    }

    .value-icon {
        margin: 0 auto 15px;
    }

    /* Ensure the hero section has enough padding for the fixed header */
    .hero {
        padding-top: 80px;
    }
}

/* Update media query for responsiveness */
@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 350px; /* Single column with fixed width */
        gap: 20px;
    }
    
    .team-member {
        width: 350px; /* Maintain fixed width */
        margin: 0 auto; /* Center the card */
    }
}

/* For very small screens */
@media (max-width: 400px) {
    .team-grid {
        grid-template-columns: 1fr; /* Full width on very small screens */
    }
    
    .team-member {
        width: 100%; /* Full width */
        max-width: 350px; /* Maximum width */
    }
}
