.card a{
    text-decoration: none !important;
    color: inherit;
}


/*  MAIN HEADING ANIMATIONS */

.text-gradient {
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Animated text container */
.animated-text {
    position: relative;
    min-height: 80px;
    margin-bottom: 2rem !important;
    width: 100%;
    max-width: 100%; 
}

/* Base styles for all titles */
.title {
    opacity: 0;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center;
    width: 100%;
    max-width: 100%;
    transform: translateY(20px);
    animation-duration: 20s; /* Increased from 4s to 5s */
    animation-fill-mode: forwards;
}

/* Specific title animations with individual keyframes */
.title:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    animation-name: fade1;
    animation-delay: 0s;
    animation-iteration-count: infinite;
}

.title:nth-child(2) {
    animation-name: fade2;
    animation-delay: 0s;
    animation-iteration-count: infinite;
}

.title:nth-child(3) {
    animation-name: fade3;
    animation-delay: 0s;
    animation-iteration-count: infinite;
}

.title:nth-child(4) {
    animation-name: fade4;
    animation-delay: 0s;
    animation-iteration-count: infinite;
}

/* Separate keyframes for each title */
@keyframes fade1 {
    0%, 24% {  /* Increased from 20% to 24% */
        opacity: 1;
        transform: translateY(0);
        z-index: 4;
    }
    27%, 100% {  /* Adjusted from 23% to 27% */
        opacity: 0;
        transform: translateY(-20px);
        z-index: 1;
    }
}

@keyframes fade2 {
    0%, 27% {  /* Adjusted from 23% to 27% */
        opacity: 0;
        transform: translateY(20px);
        z-index: 1;
    }
    30%, 54% {  /* Adjusted from 25%/45% to 30%/54% */
        opacity: 1;
        transform: translateY(0);
        z-index: 4;
    }
    57%, 100% {  /* Adjusted from 48% to 57% */
        opacity: 0;
        transform: translateY(-20px);
        z-index: 1;
    }
}

@keyframes fade3 {
    0%, 57% {  /* Adjusted from 48% to 57% */
        opacity: 0;
        transform: translateY(20px);
        z-index: 1;
    }
    60%, 84% {  /* Adjusted from 50%/70% to 60%/84% */
        opacity: 1;
        transform: translateY(0);
        z-index: 4;
    }
    87%, 100% {  /* Adjusted from 73% to 87% */
        opacity: 0;
        transform: translateY(-20px);
        z-index: 1;
    }
}

@keyframes fade4 {
    0%, 87% {  /* Adjusted from 73% to 87% */
        opacity: 0;
        transform: translateY(20px);
        z-index: 1;
    }
    90%, 97% {  /* Adjusted from 75%/95% to 90%/97% */
        opacity: 1;
        transform: translateY(0);
        z-index: 4;
    }
    99%, 100% {  /* Adjusted from 98% to 99% */
        opacity: 0;
        transform: translateY(20px);
        z-index: 1;
    }
}


.card-image {
    width: 300px;
    height: 400px;
    object-fit: cover;
}


@media (min-width: 768px) {
    .animated-text {
        min-height: 140px; /* Slightly larger minimum height for bigger screens */
        margin-bottom: 3rem; /* More space below on larger screens */
        font-size: 4.5rem;
    }
}



/*  PORTFOLIO PAGES */
.gallery-item {
    /* margin-bottom: 1.5rem; */
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 300px;
    position: relative;
    line-height: 0; /* Fix for whitespace */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block; /* Fix for whitespace */

}




