/* Reset & base */
* {
    box-sizing: border-box;
}
body, html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fff;
    color: #222;
    line-height: 1.6;
    font-size: 16px;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px 0;
}

.logo {
    max-height: 60px;
    width: auto;
    filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.2));
}

main {
    max-width: 1400px;
    margin: 100px auto 60px;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 0;
}

section {
    background: #fff;
    padding: 30px 25px;
    margin-bottom: 0;
    border-radius: 10px;
    box-shadow: 0 8px 15px -5px rgba(26,26,71,0.3);
    transition: box-shadow 0.3s ease;
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

section:hover {
    box-shadow: 0 10px 20px -5px rgba(26,26,71,0.5);
}

h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    margin-bottom: 18px;
    color: #1A1A47; /* Dark indigo from logo */
    border-bottom: 3px solid #FF3A2F; /* Orange-red from logo */
    padding-bottom: 6px;
    max-width: max-content;
    margin-left: auto;
    margin-right: auto;
}

/* Courses */
#courses {
    padding: 2rem 0 3rem;
    width: 100%;
    margin: 0;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slider {
    margin-bottom: 0;
    padding-bottom: 0;
}

.course {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
    font-weight: 600;
    font-size: 1.1rem;
    color: #444;
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.course:last-child {
    border-bottom: none;
}

.learn-more {
    background-color: #1A1A47; /* Dark indigo from logo */
    color: white;
    padding: 8px 22px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 11px -7px rgba(26,26,71,0.8);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.learn-more:hover, .learn-more:focus {
    background-color: #FF3A2F; /* Orange-red from logo */
    box-shadow: 0 6px 16px -4px rgba(255,58,47,0.7);
}

/* Locations */
#locations {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

#locations ul {
    list-style-type: none;
    padding-left: 10px;
    columns: 2;
    column-gap: 40px;
    font-size: 1.1rem;
    color: #555;
    margin: 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

#locations ul li {
    padding: 6px 0 6px 25px;
    position: relative;
}

#locations ul li::before {
    content: "✓";
    color: #FF3A2F; /* Orange-red from logo */
    font-weight: bold;
    margin-right: 8px;
    position: absolute;
    left: 0;
    top: 6px;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.contact-form input, .contact-form select {
    padding: 14px 15px;
    margin: 8px 0 20px;
    border: 2px solid #ddd;
    border-radius: 35px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus, .contact-form select:focus {
    border-color: #1A1A47; /* Dark indigo from logo */
    outline: none;
    box-shadow: 0 0 8px 0 rgba(26,26,71,0.5);
}

.contact-form button {
    background-color: #FF3A2F; /* Orange-red from logo */
    color: white;
    font-weight: 700;
    border: none;
    border-radius: 35px;
    padding: 15px 0;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 6px 15px -3px rgba(255,58,47,0.7);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    letter-spacing: 1.2px;
}

.contact-form button:hover, .contact-form button:focus {
    background-color: #E12F25; /* Darker orange-red */
    box-shadow: 0 9px 20px -6px rgba(225,47,37,0.7);
}

/* Modal Styles - FIXED: Improved modal positioning and scroll behavior */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(-30px);
    transition: transform 0.4s ease-out;
    position: relative;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal.show .modal-content {
    transform: translateY(0);
}

/* FIXED: Improved close button styling and positioning */
.close-button {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    position: sticky;
    top: 5px;
    right: 15px;
    float: right;
    width: 35px;
    height: 35px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 100;
}

.close-button:hover,
.close-button:focus {
    color: #FF3A2F; /* Orange-red from logo */
}

#modal-title {
    color: #1A1A47; /* Dark indigo from logo */
    margin-top: 10px;
    border-bottom: 3px solid #FF3A2F; /* Orange-red from logo */
    padding-bottom: 8px;
    max-width: max-content;
    margin-left: auto;
    margin-right: auto;
}

.modal-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.modal-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.modal-section h3 {
    color: #1A1A47; /* Dark indigo from logo */
    margin-bottom: 10px;
    text-align: center;
}

.modal-details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.detail-item {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.syllabus-item {
    margin-bottom: 8px;
    text-align: center;
}

/* Container class for consistent max-width and centering */
.container {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
}

/* Locations Section Styles */
.locations-section {
    padding: 4rem 0;
    background: #f8f9fa;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-header {
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

.section-title {
    font-size: 2.5rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-title span {
    color: #3f51b5;
}

.section-description {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
}

.location-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.5rem;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 2rem;
}

.location-card {
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100px;
    min-width: 0; /* Prevents overflow in grid */
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.location-card-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    
}

.location-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.location-card:hover .location-card-image {
    transform: scale(1.1);
}

.location-card-content {
    padding: 1rem;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.location-card-title {
    font-size: 0.7rem;
    font-weight: 400;
    color: #333;
    margin: 0;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-pin-icon {
    width: 8px;
    height: 8px;
    stroke: #3f51b5;
    stroke-width: 2;
}

/* FIXED: Added specific styles for the syllabus download link */
#modal-syllabus-download-section {
    margin-top: 1rem;
}

#modal-syllabus-download {
    display: inline-block;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .location-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
        padding: 0 1.5rem;
    }
    
    .location-card {
        height: 200px;
    }
    
    .location-card-image-container {
        height: 200px;
    }
}

@media (max-width: 900px) {
    .location-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 1.25rem;
    }
    
    .location-card {
        height: 260px;
    }
    
    .location-card-image-container {
        height: 180px;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .locations-section {
        padding: 2rem 0;
    }
    
    .section-header {
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    .location-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0 1rem;
    }
    
    .location-card {
        height: 200px;
    }
    
    .location-card-image-container {
        height: 140px;
    }
    
    .location-card-title {
        font-size: 1rem;
    }
    
    .map-pin-icon {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 400px) {
    .location-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
    }
    
    .location-card {
        height: 220px;
    }
    
    .location-card-image-container {
        height: 160px;
    }
}

/* Responsive tweaks */
@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }
    
    main {
        margin: 80px auto 40px;
        padding: 0 15px;
    }
    
    #locations ul {
        columns: 1;
    }
    
    .course {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .learn-more {
        margin-top: 8px;
        width: fit-content;
    }
    
    .contact-form {
        max-width: 100%;
    }
    
    .modal-content {
        width: 95%;
        padding: 15px 20px;
        margin: 10% auto;
    }
    
    .modal-details {
        flex-direction: column;
        gap: 10px;
    }
}

/* News Section Styles */
.news-section {
    padding: 4rem 0;
    background: #fff;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: row;
    position: relative;
    border: 1px solid #eee;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-date {
    background: #1A1A47;
    color: white;
    padding: 1.5rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 90px;
}

.news-date .day {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.news-date .month {
    font-size: 1rem;
    text-transform: uppercase;
    opacity: 0.9;
}

.news-content {
    padding: 1.5rem;
    flex: 1;
}

.news-content h3 {
    font-size: 1.2rem;
    color: #1a1a1a;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.news-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-link {
    color: #3f51b5;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.news-link:hover {
    color: #1A1A47;
}

/* Responsive adjustments for news section */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 1rem;
    }

    .news-card {
        margin-bottom: 1rem;
    }

    .news-date {
        padding: 1rem;
        min-width: 80px;
    }

    .news-date .day {
        font-size: 1.5rem;
    }

    .news-content {
        padding: 1.2rem;
    }

    .news-content h3 {
        font-size: 1.1rem;
    }
}
    /* Fix for ultra-wide screen responsiveness */
@media (min-width: 1600px) {
    main, section, .container, #locations ul, .course, .news-grid {
        max-width: 90vw;
    }

    .location-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1rem;
    }

    .location-card {
        height: 120px;
    }

    .location-card-image-container {
        height: 120px;
    }
}
@media (max-width: 600px) {
    .news-card {
        flex-direction: column;
    }

    .news-date {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    .news-content {
        padding: 1rem;
    }

    .news-content h3 {
        font-size: 1.1rem;
    }
}
