html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding: 0;
    margin-top: 70px;
}

nav {
    background-color: #007bff;
    color: white;
    padding: 0.5rem 2rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    margin-right: 2rem;
}

.logo img {
    height: 50px;
}

.nav-menu {
    list-style-type: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.nav-menu li a i {
    margin-right: 0.5rem;
}

.nav-menu li a:hover {
    background-color: #0056b3;
    border-radius: 4px;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: white;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #ddd;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 2px 0;
    transition: 0.3s;
}

.hero-section {
    background: #f4f4f4;
    padding: 2rem 0;
    text-align: center;
}

.welcome-message {
    margin-bottom: 1rem;
}

.welcome-message h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.welcome-message p {
    font-size: 1.2rem;
    color: #555;
}

.slider {
    position: relative;
    width: 100%; /* Ensure full width */
    height: 600px; /* Set the height to 600 pixels */
    overflow: hidden;
}

.slide {
    width: 100%;
    height: 100%; /* Ensure the image fills the slider height */
    display: none; /* Initially hide all slides */
    object-fit: cover; /* Use 'cover' to fill the entire slider width */
    object-position: center; /* Center the image within the slider */
}

.slide:first-child {
    display: block; /* Show the first slide initially */
}

.content {
    text-align: center;
    padding: 0 2rem; /* Add padding on the sides */
    max-width: 100%;
    margin: 0;
}

.subject-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0;
    width: 100%;
}

.card {
    background-color: #f5f5f5;
    color: #333;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex: 1 1 calc(50% - 0.5rem);
    max-width: calc(50% - 0.5rem);
    box-sizing: border-box;
    transition: transform 0.3s;
    border: none;
    margin-bottom: 1rem;
}

.card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: #222;
}

.card p {
    margin: 0.5rem 0;
    color: #444;
    font-size: 0.9rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    background-color: #ffffff;
}

/* Update media queries to maintain spacing on smaller screens */
@media (max-width: 768px) {
    nav {
        padding: 0.5rem 1rem;
    }

    .nav-container {
        position: relative;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: #007bff;
        padding: 1rem 0;
        gap: 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu li a {
        padding: 1rem;
        justify-content: center;
    }

    .nav-menu li a:hover {
        background-color: #0056b3;
        border-radius: 0;
    }

    .social-icons {
        display: flex;
        flex-direction: column;
        position: fixed;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        background-color: rgba(0, 123, 255, 0.9);
        padding: 0.8rem;
        border-radius: 8px 0 0 8px;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .social-icons a {
        color: white;
        padding: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2rem;
        height: 2rem;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.1);
        margin: 0.3rem 0;
    }

    .social-icons a:hover {
        background-color: rgba(255, 255, 255, 0.2);
        transform: translateX(-3px);
    }

    /* Hamburger menu animation */
    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 40px; /* Smaller logo on mobile */
    }

    .nav-menu li a {
        font-size: 0.9rem;
    }

    .content {
        padding: 0 1rem; /* Smaller padding on mobile */
    }
    
    .card {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 1rem;
        margin-bottom: 0.5rem;
    }

    .subject-cards {
        gap: 0.5rem;
    }

    .social-icons {
        padding: 0.6rem;
    }

    .social-icons a {
        width: 1.8rem;
        height: 1.8rem;
        font-size: 1rem;
    }
}

footer {
    background-color: #007bff;
    color: white;
    text-align: center;
    padding: 1rem;
    width: 100%;
    position: relative;
    bottom: 0;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

footer p {
    margin: 0.5rem 0;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    color: #ddd;
    text-decoration: underline;
}

/* Login Popup Styles */
.popup {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.popup-content {
    background-color: #fff;
    margin: 8% auto;
    padding: 0;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    position: relative;
    animation: slideIn 0.3s ease-out;
    overflow: hidden; /* Add this to prevent content overflow */
}

.login-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    padding: 2rem;
    text-align: center;
    border-radius: 12px 12px 0 0;
    color: white;
}

.login-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
    background: white;
    padding: 10px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.login-header p {
    margin: 0.5rem 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.popup-content form {
    padding: 2rem;
    box-sizing: border-box; /* Add this to include padding in width calculation */
}

.popup-content .form-group {
    position: relative;
    margin-bottom: 1.5rem;
    width: 100%; /* Add this to ensure full width */
}

.popup-content .form-group label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #007bff;
}

.popup-content .form-group input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box; /* Add this to include padding in width calculation */
}

.popup-content .form-group input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
    outline: none;
}

.popup-content button {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.popup-content button:hover {
    background: #0056b3;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: background-color 0.3s;
}

.close:hover {
    background: rgba(255,255,255,0.2);
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .popup-content {
        margin: 15% auto;
        width: 95%;
        max-width: 350px; /* Add max-width for mobile */
    }
    
    .popup-content form {
        padding: 1.5rem; /* Slightly reduce padding on mobile */
    }
    
    .popup-content .form-group input {
        font-size: 16px; /* Better size for mobile input */
    }
    
    .login-header {
        padding: 1.5rem;
    }
    
    .login-logo {
        width: 60px;
        height: 60px;
    }
}

.discover-section {
    padding: 2rem;
    text-align: center;
    background-color: #f9f9f9;
    margin-top: 2rem;
}

.discover-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.discover-section p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 2rem;
}

.discover-cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap; /* Allow cards to wrap on smaller screens */
}

.discover-card {
    background-color: #f4f4f4;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    width: 300px; /* Default width */
    transition: transform 0.3s;
}

.discover-card img {
    width: 100%;
    height: 200px; /* Default height */
    object-fit: cover;
}

.discover-card a {
    display: block;
    padding: 1rem;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    transition: background-color 0.3s;
}

.discover-card a:hover {
    background-color: #0056b3;
}

.discover-card:hover {
    transform: translateY(-5px);
}

/* About Us Page Styles */
.about-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-header {
    text-align: center;
    margin-bottom: 3rem;
}

.about-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.about-item {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s;
}

.about-item:hover {
    transform: translateY(-5px);
}

.about-item i {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.about-description {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Contact Page Styles */
.contact-section {
    padding: 4rem 0; /* Remove horizontal padding */
    width: 100%;
    margin: 0;
}

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
    background-color: #f8f9fa;
    padding: 2rem;
    width: 100%;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0; /* Remove gap */
    width: 100%;
}

.contact-info {
    display: grid;
    gap: 0;
    background-color: #f8f9fa;
    padding: 4rem 2rem;
    color: #333;
}

.contact-item {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item i {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.contact-item h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.contact-form {
    background: #f8f9fa;
    padding: 4rem 2rem;
}

.contact-form h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.contact-form .form-group {
    margin-bottom: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

.submit-btn {
    background: #007bff;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background: #0056b3;
}

/* Update responsive styles */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .contact-section {
        padding: 0;
        margin-top: 70px; /* Account for fixed navbar */
    }
    
    .contact-header {
        padding: 1.5rem;
    }
    
    .contact-info,
    .contact-form {
        padding: 2rem 1rem;
    }
}

/* Contact Page Styles */
.contact-form-section {
    background: #f8f9fa;
    padding: 4rem 2rem;
    width: 100%;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    margin-bottom: 3rem;
}

.contact-details {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}

.contact-detail-item {
    text-align: center;
}

.contact-detail-item i {
    font-size: 2rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.contact-detail-item h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.contact-detail-item p {
    color: #666;
}

/* Update responsive styles */
@media (max-width: 768px) {
    .contact-details {
        flex-direction: column;
        gap: 2rem;
    }
    
    .contact-form-section {
        padding: 2rem 1rem;
    }
}

.contact-map {
    width: 100%;
    height: 450px;
    margin-top: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .contact-map {
        height: 300px;
        margin-top: 1rem;
    }
}

.header-contact-details {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 1.5rem;
}

.header-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-contact-item i {
    color: #007bff;
    font-size: 1.2rem;
}

.header-contact-item p {
    margin: 0;
    color: #333;
}

@media (max-width: 768px) {
    .header-contact-details {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-contact-item {
        justify-content: center;
    }
}

/* Form message alerts */
.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    text-align: center;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#formMessage {
    margin-top: 1rem;
}

.discover-header {
    text-align: center;
    padding: 2rem;
    background-color: #f8f9fa;
    margin-bottom: 2rem;
}

.discover-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin: 0;
    font-weight: bold;
}

@media (max-width: 768px) {
    .discover-header h1 {
        font-size: 2rem;
    }
}

/* Student Results Form Styles */
.results-form-container {
    max-width: 600px;
    margin: 120px auto 2rem; /* Increased top margin from default */
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.results-form-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
}

/* For mobile devices */
@media (max-width: 768px) {
    .results-form-container {
        margin: 100px 1rem 2rem; /* Slightly less margin on mobile */
        padding: 1.5rem;
    }
}

/* Student Results Search Form */
#search-form.search-form {
    max-width: 500px;
    margin: 120px auto 2rem; /* Added top margin to push it down */
    padding: 2rem;
}

#search-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

/* For mobile devices */
@media (max-width: 768px) {
    #search-form.search-form {
        margin: 100px 1rem 2rem; /* Slightly less margin on mobile */
        padding: 1.5rem;
    }
}

/* Search Button and Loading Styles */
.search-btn {
    position: relative;
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    overflow: hidden;
}

.search-btn:hover {
    background: #0056b3;
}

.search-btn .loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
    animation: spin 1s infinite linear;
}

.search-btn.loading {
    cursor: not-allowed;
    background: #0056b3;
}

.search-btn.loading .btn-text {
    opacity: 0.5;
}

.search-btn.loading .loader {
    opacity: 1;
    visibility: visible;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Optional: Disable form while loading */
form.loading {
    pointer-events: none;
    opacity: 0.7;
} 