/* Remove the * selector that was conflicting with menu.css */
/* Keep only grid-specific styling */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: calc(100vh - 120px); /* Adjust for menu and footer height */
}

/* Consistent paragraph styling for all text in container */
.container > p {
    font-size: 1.05rem;
    color: #444;
    margin-bottom: 15px;
    text-align: justify;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.container h1 {
    text-align: center;
    color: #1A3A52;
    margin-bottom: 30px; /* Reduced from 40px */
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* H2 styling */
.container h2 {
    text-align: center;
    color: #1A3A52;
    margin-bottom: 20px; /* Reduced from 40px */
    margin-top: 30px; /* Reduced from default */
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 20px;
}

.grid-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.grid-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.grid-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.grid-item-content {
    padding: 20px;
    text-align: center;
}

.grid-item h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 10px;
}

.grid-item p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}


/* SECTION css */
/* ===== Section and Paragraph Styling for Text Content ===== */

section {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin: 10px auto; /* Reduced from 20px to 10px for tighter spacing */
    max-width: 1000px;
    line-height: 1.8;
    color: #333;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

section:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Make all h2 consistent across sections */
section h2,
h2 {
    text-align: center;
    color: #1A3A52;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    font-size: 2rem; /* Consistent size for all h2 */
    margin-top: 10px; /* Reduced from 15px */
}

section h3 {
    text-align: center;
    color: #1A3A52;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
    font-size: 1.4rem;
    margin-top: 20px; /* Reduced from 25px */
    margin-bottom: 15px;
}

/* Paragraphs inside sections */
section p {
    font-size: 1.05rem;
    color: #444;
    margin-bottom: 15px; /* Reduced from 20px */
    text-align: justify;
}

/* Last paragraph in section has less margin */
section p:last-of-type {
    margin-bottom: 0;
}

/* UL inside sections */
section ul {
    margin-bottom: 15px; /* Added for consistency */
}

/* Responsive tweaks */
@media (max-width: 768px) {
    section {
        padding: 25px;
        margin: 20px auto; /* Kept consistent */
    }
    section p {
        font-size: 0.95rem;
    }
}

/* SECTION css Ends*/

/* Responsive adjustments */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        padding: 10px;
    }

    .container h1 {
        font-size: 2rem;
        margin-bottom: 25px; /* Reduced from 30px */
    }

    .grid-item img {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 20px 10px;
    }
}