﻿/* Refined color palette */
:root {
    --primary-color: #2c3e50;
    --accent-color: rgba(76, 175, 80, 0.8); /* Changed to green */
    --gradient-light: rgba(236, 240, 241, 0.95);
    --gradient-white: rgba(255, 255, 255, 0.98);
    --shadow-soft: 0 10px 30px rgba(44, 62, 80, 0.1);
    --shadow-strong: 0 20px 40px rgba(44, 62, 80, 0.15);
    --transition-smooth: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Elegant hero section */
.hero2 {
    position: relative;
    padding: 140px 0;
    background: linear-gradient(135deg, var(--gradient-white), var(--gradient-light));
    border-bottom-left-radius: 60px;
    border-bottom-right-radius: 60px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    text-align: center;
}

    .hero2::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, rgba(76, 175, 80, 0.05), /* Changed to green */
        rgba(44, 62, 80, 0.05) );
        animation: subtleFlow 15s ease-in-out infinite;
    }

    /* Animated gradient line */
    .hero2 .animated-line {
        height: 6px;
        background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
        width: 50%;
        transition: width 0.5s ease;
        margin: 0 auto;
        opacity: 1;
        border-radius: 10px;
    }

    .hero2:hover .animated-line {
        width: 100%;
    }

    /* Hero text with gradient */
    .hero2 h1 {
        font-size: 4rem;
        font-weight: 300;
        background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        animation: textGradient 5s ease-in-out infinite;
    }

@keyframes textGradient {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Refined welcome section */
.welcome2 {
    position: relative;
    padding: 3.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 40px;
    box-shadow: 0 20px 40px rgba(44, 62, 80, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.9);
    animation: floatGentle 6s ease-in-out infinite;
}

    .welcome2 h1 {
        font-size: 4.2rem;
        font-weight: 300;
        color: var(--primary-color);
        letter-spacing: -1px;
        margin-bottom: 1.5rem;
        position: relative;
    }

    .welcome2 h2 {
        font-size: 1.8rem;
        color: var(--accent-color);
        font-weight: 400;
        opacity: 0.9;
    }

/* Card design */
.card {
    height: 500px;
    background: white;
    border-radius: 30px !important; /* Slightly squarer before hover */
    border: none !important;
    box-shadow: 0 10px 30px rgba(44, 62, 80, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.9);
    transition: var(--transition-smooth);
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

    .card:hover {
        transform: translateY(-20px);
        border-radius: 40px !important; /* More rounded on hover */
        box-shadow: 0 30px 60px rgba(44, 62, 80, 0.12), 0 0 0 1px rgba(41, 128, 185, 0.1);
    }

/* Card image */
.card-img-top {
    height: 400px;
    object-fit: cover;
    border-radius: 30px 30px 0 0; /* Match card's initial shape */
    transition: var(--transition-smooth);
}

.card:hover .card-img-top {
    transform: scale(1.05); /* Scale image on hover */
}

/* Card body */
.card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.7), transparent);
    padding: 30px 20px;
    transition: var(--transition-smooth);
    border-radius: 0 0 30px 30px; /* Match card's initial shape */
    backdrop-filter: blur(5px);
}

.card:hover .card-body {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Card title */
.card-title {
    font-size: 1.6rem;
    font-weight: 500;
    color: white !important; /* White text before hover */
    margin: 0;
    position: relative;
    padding-bottom: 15px;
    text-align: center;
    transition: var(--transition-smooth);
}

.card:hover .card-title {
    color: var(--primary-color) !important;
}

/* Gradient underline */
.card-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    transition: width 0.5s ease;
    border-radius: 2px;
}

.card:hover .card-title::after {
    width: 70%;
}

/* Arrow indicator */
.card::after {
    content: '→';
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0;
    transform: translateX(20px);
    transition: var(--transition-smooth);
    z-index: 3;
}

.card:hover::after {
    opacity: 0.6;
    transform: translateX(0);
}

/* Main container */
main.container {
    background: white;
    border-radius: 40px;
    box-shadow: var(--shadow-soft);
    margin-top: -40px;
    padding: 60px 40px;
    position: relative;
    z-index: 2;
}

/* Animations */
@keyframes floatGentle {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(0.5deg);
    }
}

@keyframes subtleFlow {
    0%, 100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }
}

/* Grid layout */
@media (min-width: 992px) {
    .col-lg-3 {
        flex: 0 0 auto;
        width: 50%;
        padding: 0 25px;
    }
}

/* Loading animation */
.col-lg-3 {
    opacity: 0;
    transform: translateY(30px);
    animation: elegantFadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes elegantFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered entrance */
.col-lg-3:nth-child(1) {
    animation-delay: 0.2s;
}

.col-lg-3:nth-child(2) {
    animation-delay: 0.4s;
}

.col-lg-3:nth-child(3) {
    animation-delay: 0.6s;
}

.col-lg-3:nth-child(4) {
    animation-delay: 0.8s;
}

.col-lg-3:nth-child(5) {
    animation-delay: 1.0s;
}

.col-lg-3:nth-child(6) {
    animation-delay: 1.2s;
}

.col-lg-3:nth-child(7) {
    animation-delay: 1.4s;
}

.col-lg-3:nth-child(8) {
    animation-delay: 1.6s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card {
        height: 400px;
    }

    .card-img-top {
        height: 300px;
    }

    .welcome2 h1 {
        font-size: 3rem;
    }
}
