body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #d4d4d4; /* Light gray background as requested */
    color: #000000; /* Text color changed to black for contrast with light background */
}

.navbar {
    background-color: #0d1a26;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    width: 150px; /* As per request */
    height: 80px; /* As per request */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #007BFF;
}

.hero {
    background: linear-gradient(135deg, #007BFF, #004085);
    text-align: center;
    padding: 5rem 2rem;
    border-bottom: 4px solid #ffffff;
    color: #ffffff; /* Ensure text is white for contrast with blue gradient */
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

.cta-button {
    background-color: #ffffff;
    color: #007BFF;
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #e0e0e0;
}

.services, .content {
    padding: 5rem 2rem;
    text-align: left;
}

.services h2, .content h1 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #007BFF;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2x2 grid for index page */
    gap: 2rem;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    position: relative;
    width: 100%;
    max-width: 400px; /* Ensure cards fit nicely in 2x2 grid */
    height: 350px; /* Increased height to accommodate longer text on back */
    perspective: 1000px;
    cursor: pointer;
    background-color: #ffffff; /* White cards for contrast with light background */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: #000000; /* Black text for contrast with white cards */
    overflow: hidden; /* Ensure content doesn’t overflow */
}

.card-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    padding: 1rem; /* Consistent padding */
}

.card-front {
    z-index: 2;
    background-color: #ffffff;
}

.card-back {
    transform: rotateY(180deg);
    background-color: #e0e0e0; /* Light gray back for contrast */
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    text-align: center; /* Center-align text */
    padding: -5rem; /* Increased padding for margins on all sides */
    overflow: auto; /* Allow scrolling if text exceeds height */
}

.card:hover .card-inner {
    transform: rotateY(180deg);
}

.card h3 {
    font-size: 1.5rem;
    margin: 0;
    text-align: center;
}

.card p {
    font-size: 1rem; /* Slightly reduced to fit better */
    margin: 0.5rem 0; /* Reduced margin to fit text within height */
    text-align: center;
    line-height: 1.4; /* Improve readability */
    word-wrap: break-word; /* Ensure text wraps within the card */
    max-width: 90%; /* Prevent text from spilling out horizontally */
}

.instruction {
    font-size: 0.9rem;
    color: #666666;
    margin-top: 1rem;
}

/* Popup Styles */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1024px;
    height: 768px;
    background-color: #1a1a1a;
    border: 2px solid #007BFF;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    resize: none; /* Prevent resizing */
}

.popup-content {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: auto; /* Allow scrolling if PDF exceeds size */
}

.popup video, .popup iframe {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure content scales to fit while maintaining aspect ratio */
    border: none; /* Remove any default iframe border */
}
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: #ffffff;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.close-btn:hover {
    color: #007BFF;
}

footer {
    background-color: #0d1a26;
    padding: 1.5rem;
    text-align: center;