/* --- Global Styles & Variables --- */
:root {
    --primary-color: #003366; /* Navy Blue */
    --secondary-color: #D81E05; /* Red */
    --accent-color: #f0f0f0; /* Light Gray for backgrounds */
    --text-color: #333;
    --footer-bg: #222; /* Darker background for footer */
    --white: #fff;
    --gray: #666;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth; /* Enable smooth scrolling */
}

body {
    font-family: Arial, sans-serif; /* Example font */
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Prevents bottom space under images */
}

h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2em;
}

/* --- Header Styles --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /*position: sticky; !* Make header sticky *!*/
    /*top: 0;*/
    /*z-index: 1000; !* Ensure header stays on top *!*/
    width: 100%;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px; /* More padding */
    border-bottom: 1px solid #eee;
}

.logo-container {
    /*flex-basis: 150px; !* Give logos a base size *!*/
    display: flex;
    justify-content: center;
}

.logo {
    max-height: 100px; /* Adjust as needed */
}

.nss-logo {
    /* Specific styles if needed */
}

.iitk-logo {
    /* Specific styles if needed */
}

/* --- Navigation --- */
.main-nav {
    background-color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px; /* Match header-top padding */

    position: sticky;
    top: 0; /* Stick to the very top of the viewport */
    z-index: 1000; /* Ensure it stays above other content when scrolling */
    width: 100%; /* Force full width when sticky */
}

.small {
    display: none;
}

.large {
    display: block;
}

@media (max-width: 768px) {
    .main-nav {
        position: static; /* Removes the sticky behavior */
        /* You might want to adjust other properties for small screens too,
           e.g., padding, width, etc., if needed. */
        /* For example, if width: 100% is only for sticky state: */
        /* width: auto; */
    }

    .small {
        display: block !important;
        margin: 0 !important;
        width: 100%;
    }

    .logo{
        margin: 0 auto;
        max-height: 112px !important;
    }

    .iitk{
        display: none;
    }

    .header-top{
        padding: 10px;
    }

    .large {
        display: none !important;
    }

}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    position: relative; /* Needed for dropdown positioning */
}

.nav-links a {
    color: var(--white);
    padding: 15px 20px;
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links a:hover,
.nav-links li.dropdown:hover > a { /* Keep parent highlighted on dropdown hover */
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Dropdown Styles */
.dropdown-arrow {
    font-size: 0.8em;
    margin-left: 5px;
    display: inline-block;
}

.dropdown-content {
    display: none; /* Hidden by default */
    position: absolute;
    background-color: var(--primary-color);
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    top: 100%; /* Position below the parent */
    left: 0;
}

.dropdown-content li {
    list-style-type: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Separator */
}

.dropdown-content a {
    padding: 12px 16px;
    /* Keep text color white, hover changes background */
}

.dropdown-content a:hover {
    background-color: var(--secondary-color); /* Match main nav hover */
    color: var(--white);
}

.dropdown:hover .dropdown-content {
    display: block; /* Show dropdown on hover */
}

/* Social Links */
.social-links {
    display: flex;
    align-items: center;
}

.social-icon {
    color: var(--white);
    margin-left: 15px; /* Keep or adjust spacing */
    /* font-size: 1.4em; */ /* REMOVE or COMMENT OUT this line */
    transition: color 0.3s ease;
    padding: 10px; /* Keep padding for a larger clickable area */
    display: inline-flex; /* Helps align the SVG vertically if needed */
    align-items: center; /* Vertically center SVG inside the anchor */
    justify-content: center; /* Horizontally center SVG inside the anchor */
}

/* The hover effect still works because the SVG inherits the color */
.social-icon:hover {
    color: var(--secondary-color);
}

/* You might target the SVG directly if you need specific SVG styles */
.social-icon svg {
    display: block; /* Prevents extra space below SVG */
}

/* Adjust spacing for the first icon if needed */
.social-links a:first-child {
    margin-left: 0; /* Remove margin from the first icon if it looks too spaced */
}

/* --- Slider Styles --- */
.slider-section {
    margin-top: 0; /* Remove any top margin if header is sticky */
    padding-top: 0; /* Remove any top padding */
}

.slider-container {
    width: 100%;
    /* max-height: 70vh; Set a max height relative to viewport */
    aspect-ratio: 16 / 7; /* Control aspect ratio for responsiveness */
    overflow: hidden;
    position: relative;
    background-color: var(--gray); /* Background while images load */
}

.slider {
    /*display: flex;*/
    height: 100%;
    transition: transform 0.7s ease-in-out; /* Smoother transition */
}

.slide {
    min-width: 100%; /* Can keep or remove, less relevant with absolute positioning */
    height: 100%;
    /* position: relative; */ /* Remove if it was there */
    overflow: hidden; /* Keep this */

    /* --- ADD these lines --- */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* height: 100%; */ /* Already defined */
    /* --- End of ADD --- */


    opacity: 0; /* Keep this: Hidden by default */
    transition: opacity 0.7s ease-in-out; /* Keep this: For the fade effect */
    /* Add background color if images load slowly */
    background-color: #eee; /* Light gray placeholder */
}

.slide.active {
    z-index: 1;
    opacity: 1; /* Show active slide */
}


.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area, might crop */
    display: block;
}

/* Slider Navigation Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 2rem;
    z-index: 10;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

/* Slider Indicator Dots */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    z-index: 10;
}

.dot {
    height: 12px;
    width: 12px;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot.active {
    background-color: var(--white);
    transform: scale(1.2); /* Make active dot slightly larger */
}


/* --- Content Block Styles --- */
.content-block {
    padding: 20vh 0;
    background-color: var(--white); /* White background */
}

.content-block .container {
    display: flex;
    align-items: center;
    gap: 40px; /* Space between image and text */
}

.content-image-container {
    flex: 0 0 50%; /* Image takes 40% width */
    max-width: 50%;
}

.content-image {
    border-radius: 8px; /* Slightly rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.content-text {
    flex: 1; /* Text takes remaining space */
}

.content-text h2 {
    color: var(--primary-color);
    /* margin-bottom: 20px; */ /* Original Value */
    margin-bottom: 30px; /* Increased space below the heading */
    font-size: 2em;
}

.content-text p {
    margin-bottom: 18px;
}

/* --- Placeholder Section Styles --- */
.placeholder-section {
    padding: 60px 0;
    background-color: var(--accent-color); /* Different background */
    text-align: center;
}

/* --- Contact Section Styles --- */
.contact-section {
    padding: 60px 0;
    text-align: center;
    background-color: var(--white);
}

.contact-section a {
    color: var(--secondary-color);
    font-weight: bold;
}
.contact-section a:hover {
    text-decoration: underline;
}

/* --- Footer Styles --- */
footer {
    background-color: var(--footer-bg);
    color: var(--gray); /* Lighter text for dark background */
    padding: 25px 0;
    text-align: center;
    margin-top: 40px; /* Space above footer */
    width: 100%; /* Ensure full width */
}

footer .container {
    /* Container styles already defined */
}

footer p {
    margin: 0;
    font-size: 0.9em;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {


    .header-top {
        padding: 10px 20px;
    }

    .main-nav {
        padding: 0 0px; /* Reduce padding */
        flex-direction: column; /* Stack links and socials */
        align-items: flex-start;
    }

    .nav-links {
        /* Consider making this a toggle menu for small screens */
        width: 100%;
        flex-direction: column;
        align-items: center; /* Center links when stacked */
        padding-bottom: 0px; /* Space below links */
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .nav-links li:first-child {
        border-top: none;
    }

    .nav-links a {
        padding: 8px 0px;
    }

    .dropdown-content {
        position: static; /* Change dropdown behavior */
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.2); /* Slight distinction */
        width: 100%;
    }
    .dropdown:hover .dropdown-content {
        display: block; /* Still display on hover (or click if JS added) */
    }


    .social-links {
        justify-content: center; /* Center social icons */
        padding: 10px 0;
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.1); /* Separator */
    }
    .social-icon {
        margin: 0 10px; /* Adjust spacing */
    }


    .content-block .container {
        flex-direction: column; /* Stack image and text */
        text-align: center;
        gap: 60px;
        padding-top: 20vh;
        padding-bottom: 20vh;
    }

    .content-image-container {
        max-width: 80%; /* Allow image to be wider on mobile */
        margin-bottom: 30px; /* Space below image */
        flex-basis: auto; /* Reset flex basis */
    }

    .slider-btn {
        font-size: 1.5rem;
        padding: 8px 12px;
    }
    .slider-dots {
        bottom: 10px;
    }
    .dot {
        height: 10px;
        width: 10px;
        margin: 0 4px;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 1.8em;
    }

    .header-top {
        flex-direction: column; /* Stack logos */
        padding: 10px;
    }
    .logo-container {
        margin-bottom: 5px;
    }

    .logo {
        max-height: 40px;
    }

    .main-nav {
        padding: 0 5px;
    }
    .nav-links a {
        padding: 10px 10px;
    }

    .social-icon {
        font-size: 1.2em;
        margin: 0 8px;
    }
}

.page-padding {
    padding: 60px 0; /* Adjust padding as needed - matches recommendation from previous step */
    /* Or use 80px 0 if you used that */
}

@media (max-width: 900px) {
    .page-padding{
        margin: 0 30px;
    }

    p, h1, h2, h3, h4{
        text-align: center;
    }
}

.content-section {
    max-width: 900px; /* Constrain text width for readability */
    margin: 0 auto; /* Center the content section within the container */
}

.content-section h1 {
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center; /* Center the main page title */
    font-size: 2.5em; /* Make main title larger */
}

.content-section h2 {
    color: var(--primary-color);
    margin-top: 40px; /* Add space above H2 headings */
    margin-bottom: 20px;
    font-size: 1.8em;
    border-bottom: 2px solid var(--accent-color); /* Add a subtle separator */
    padding-bottom: 5px;
}

.content-section p {
    margin-bottom: 18px; /* Consistent paragraph spacing */
    line-height: 1.7; /* Slightly taller line height for readability */
}

/* List Styling */
.content-section ul {
    margin-top: 10px;
    margin-bottom: 25px;
    padding-left: 25px; /* Indentation for lists */
}

.content-section ul li {
    margin-bottom: 10px; /* Space between list items */
}

.objectives-list {
    list-style-type: disc; /* Use standard bullets for objectives */
}

.external-links-list {
    list-style-type: none; /* No bullets for the links list */
    padding-left: 0; /* Remove default indentation */
}

.external-links-list li {
    margin-bottom: 12px; /* More space between links */
}

.external-links-list strong {
    margin-right: 8px; /* Space after the bolded institution name */
}

.external-links-list a {
    word-break: break-all; /* Prevent long URLs from overflowing */
}


/* Faculty Advisor Section Styling */
.faculty-advisor-section {
    margin: 50px 0; /* More vertical margin around this section */
    padding: 30px;
    background-color: var(--accent-color); /* Light background highlight */
    border-radius: 8px;
    text-align: center; /* Center align content */
}

.faculty-advisor-image {
    max-width: 200px; /* Adjust size as needed */
    height: auto;
    border-radius: 50%; /* Circular image */
    margin: 0 auto 20px auto; /* Center image with space below */
    display: block; /* Ensure margin auto works */
    border: 4px solid var(--white); /* Optional white border */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.faculty-advisor-caption {
    font-size: 1.1em; /* Slightly larger caption text */
    color: var(--text-color);
    max-width: 600px; /* Limit caption width */
    margin: 0 auto; /* Center caption text block */
    line-height: 1.6;
}

.faculty-advisor-caption strong {
    color: var(--primary-color); /* Highlight the name */
}

@media (max-width: 768px) {
    /* ... other existing mobile styles ... */

    .slider-container {
        aspect-ratio: unset; /* Remove the fixed aspect ratio */
        height: 55vh;       /* Set height to 55% of the viewport height */
        /* Optional: Prevent it getting too tall on some devices */
        max-height: 450px;
    }

    /* Optional: Adjust slider button size for mobile */
    .slider-btn {
        font-size: 1.5rem;
        padding: 8px 12px;
    }

    /* Optional: Adjust dot size/spacing for mobile */
    .slider-dots {
        bottom: 15px;
    }
    .dot {
        height: 10px;
        width: 10px;
        margin: 0 5px;
    }
}

@media (max-width: 480px) {
    /* Further refinement for very small screens */
    .slider-container {
        height: 80vh;
        max-height: 400px;
    }
}