/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif; /* Modern font */
    background-color: #1f1f1f; /* Fixed dark background color */
    color: #e2e2e2; /* Light text for contrast */
    line-height: 1.6;
    padding: 0; /* Remove default padding */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden; /* Prevent scrolling while animation is loading */
    animation: fadeContent 2s ease-in-out; /* Dynamic content animation on page load */
    user-select: none; /* Prevent text selection */
}

/* Prevent scrolling on page load */
html, body {
    height: 100%;
    width: 100%;
}

/* Keyframe for fading and moving content */
@keyframes fadeContent {
    0% {
        opacity: 0; /* Start with hidden content */
        transform: translateY(50px); /* Content comes from below */
    }
    100% {
        opacity: 1; /* Fully visible */
        transform: translateY(0); /* Final position */
    }
}

.container {
    max-width: 1400px;
    width: 100%;
}

h1 {
    text-align: center;
    font-size: 3rem;
    color: #ecf0f1; /* Soft white color for title */
    margin-bottom: 40px;
    font-weight: 600;
    text-transform: uppercase;
    animation: fadeText 2s ease-in-out; /* Dynamic title animation */
}

@keyframes fadeText {
    0% {
        opacity: 0; /* Start hidden */
        transform: translateY(-20px); /* Title comes from the top */
    }
    100% {
        opacity: 1; /* Fully visible */
        transform: translateY(0); /* Final position */
    }
}

.applications-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    padding: 20px;
    animation: fadeContent 2s ease-in-out; /* Dynamic content animation */
    width: 100%;
}

.application-card {
    background: linear-gradient(to bottom, rgba(44, 62, 80, 1) 0%, rgba(44, 62, 80, 0.9) 50%, rgba(44, 62, 80, 1) 100%); /* Solid gradient */
    border-radius: 15px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2); /* Softer shadow */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    color: #fff; /* Ensure the text inside is visible */
    animation: fadeCard 2s ease-in-out; /* Dynamic card animation */
}

@keyframes fadeCard {
    0% {
        opacity: 0; /* Start with hidden card */
        transform: translateY(30px); /* Card slides up from below */
    }
    100% {
        opacity: 1; /* Fully visible card */
        transform: translateY(0); /* Final position */
    }
}

.application-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3); /* Darker shadow on hover */
}

.application-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: opacity 0.3s ease;
    border-bottom: 5px solid rgba(52, 152, 219, 0.75); /* Border removed */
    user-select: none; /* Prevent text selection */
    -webkit-user-drag: none; /* Prevent image drag in webkit-based browsers */
}

.application-card img:hover {
    opacity: 0.85;
}

.application-details {
    padding: 20px;
    background: rgba(45, 52, 54, 0.9); /* Solid background */
    position: relative;
    z-index: 1;
    animation: fadeDetails 2s ease-in-out; /* Dynamic details background animation */
}

@keyframes fadeDetails {
    0% {
        opacity: 0; /* Start with hidden details */
        transform: translateY(20px); /* Details come from below */
    }
    100% {
        opacity: 1; /* Fully visible details */
        transform: translateY(0); /* Final position */
    }
}

.application-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: rgba(52, 152, 219, 1); /* Solid blue title */
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.application-card:hover .application-title {
    color: rgb(7, 93, 150); /* Change to specific blue on hover */
}

.application-title:hover {
    color: rgb(7, 93, 150); /* Red on hover */
}

.application-description {
    font-size: 1rem;
    color: rgba(189, 195, 199, 1); /* Solid gray description text */
    line-height: 1.6;
}

.application-card:hover .application-description {
    color: rgba(236, 240, 241, 1); /* White text on hover */
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    h1 {
        font-size: 2.5rem;
    }
    .applications-container {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    .applications-container {
        gap: 20px;
    }

    .application-card {
        height: 350px; /* Adjust card height on smaller screens */
    }
}

/* For very small screens (mobile) */
@media (max-width: 480px) {
    .application-card {
        height: 300px; /* Further reduce the height of cards on small screens */
    }
    .application-title {
        font-size: 1.5rem;
    }
    .application-description {
        font-size: 0.9rem;
    }
}
