* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', 'Poppins', sans-serif;
}

header {
    font-family: 'Rajdhani', sans-serif;
    width: 100%;
    background: #270D5C;
    display: flex;
    align-items: center;
    border-bottom: 2px solid black;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    z-index: 100;
    gap: 12px;
    padding: clamp(6px, 1.2vw, 14px) clamp(12px, 2.5vw, 28px);
}

header img {
    height: clamp(48px, 6vw, 80px);
    width: auto;
    max-height: 80px;
    flex-shrink: 0;
}

header h1 {
    margin: 0;
    padding: 0;
    font-size: clamp(20px, 3.5vw, 40px);
    font-weight: bold;
    color: #FFFF;
    flex: 0 1 auto;
    min-width: 180px;
}

header a {
    color: inherit;
    text-decoration: none;
}

/* Mobile nav toggle (hamburger) */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.4);
    background: transparent;
    color: white;
    cursor: pointer;
}
.nav-toggle .bar {
    width: 24px;
    height: 2px;
    background: #fff;
    display: block;
    border-radius: 1px;
}

.navbar {
    display: flex;
    flex-grow: 2;
    justify-content: space-evenly;
    overflow: hidden;
    font-size: clamp(16px, 1.9vw, 22px);
    gap: clamp(4px, 1vw, 18px);
}

.navbar a {
    float: left;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    vertical-align: auto;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.dropdown {
    float: left;
    overflow: hidden;
    transition: 0.2s ease;
}

.dropdown .dropbtn {
    font-size: 100%;
    border: none;
    outline: none;
    color: white;
    padding: 14px 16px;
    background-color: inherit;
    font-family: inherit;
    margin: 0;
    transition: 0.2s ease;
    cursor: pointer;
}

.navbar a:hover, .dropbtn:hover {
    text-shadow: #dddddd 1px 1px 5px;
    transition-duration: 0.2s;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 180px;
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
    z-index: 1;
}

/* Show on hover or focus for accessibility (desktop) */
.dropdown:focus-within .dropdown-content,
.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    float: none;
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: background-color 0.2s ease;
}

.dropdown-content a:hover {
    background-color: #ddd;
}

/* Footer */
.footer {
    font-family: 'Rajdhani', sans-serif;
    border-top: 2px solid black;
    box-shadow: 0 8px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    padding: 50px;
    margin-top: 50px;
    margin-bottom: 50px;
}
.footer-content {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
    background: #270D5C;
    color: white;
    padding: clamp(20px, 5vw, 50px);
    gap: clamp(12px, 3vw, 30px);
}

.footer-item {
    display: flex;
    flex: 1;
    min-width: 240px;
    justify-content: center;
    align-items: center;
}
.footer-content h2 {
    font-size: clamp(20px, 3vw, 32px);
}

.footer-content h3 {
    padding: 5px 5px 5px 0;
    margin: 5px 5px 5px 0;
    font-size: clamp(14px, 2.2vw, 18px);
}

.footer-left {
    flex-direction: row;
    gap: 12px;
}

.footer-left-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-left img {
    width: clamp(56px, 12vw, 104px);
    flex: 0 0 auto;
    max-width: 120px;
}

.footer-middle {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    color: white;
}

.footer-middle a, .footer-right a {
    text-decoration: none;
    color: white;
}

.footer-middle a:hover, .footer-right a:hover {
    text-decoration: underline;
}
.footer-right {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    color: white;
}

.footer-right-item {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    padding: 5px;
    margin: 2px;
}

.footer-right-item img {
    max-width: 100%;
    padding: 0 3px 2px 2px;
    margin: 0 3px 2px 2px;
}

/* Footer credit line */
.footer-content::after {
    content: "Site Developed by Innovations Dept, IIC, VIT Vellore";
    flex-basis: 100%;
    text-align: center;
    margin-top: 12px;
    font-size: clamp(12px, 1.4vw, 16px);
    opacity: 0.9;
}

/* Responsive navigation & footer */
@media (max-width: 900px) {
    header {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {text-align: center;}

    header img {
        height: 44px;
    }
    .nav-toggle {
        display: flex;
        margin-left: auto;
    }
    .navbar {
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s ease, opacity 0.2s ease;
        background: #270D5C;
    }
    .navbar.open {
        max-height: 70vh;
        opacity: 1;
        visibility: visible;
        padding-bottom: 8px;
    }
    .navbar a, .dropdown .dropbtn {
        width: 100%;
        text-align: left;
        padding: 12px 16px;
    }
    /* disable hover open on mobile, use JS-added .open */
    .dropdown:hover .dropdown-content {
        display: none;
    }
    .dropdown.open .dropdown-content {
        display: block;
        position: static;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.98);
    }

    .footer-item {
        min-width: 100%;
        justify-content: flex-start;
        margin: 6px 0;
    }
    .footer-left {
        align-items: flex-start;
    }
    .footer-left img {
        width: 48px;
        max-width: none;
    }
}

@media (max-width: 600px) {
    header {
        gap: 8px;
    }
    header h1 {
        width: 100%;
        text-align: left;
    }
    .footer-content {
        padding: clamp(18px, 6vw, 32px);
    }
    .footer-item {
        align-items: flex-start;
    }
    .footer-left-text h2,
    .footer-left-text h3 {
        text-align: left;
    }
    .footer-content::after {
        margin-top: 6px;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .navbar, .dropdown, .dropdown-content, .navbar a, .dropbtn {
        transition: none !important;
    }
}
