/* RESET & BASE STYLES */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}
a {
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

/* TOP BAR */
.top-bar {
    background-color: #0a2240;
    color: #ffffff;
    font-size: 13px;
    padding: 8px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.top-bar a { color: #ffffff; margin-right: 15px; }
.top-bar a:hover { color: #ff6b35; }

/* HEADER & NAVIGATION CONTAINER */
.main-header {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.brand-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.college-logo-img {
    height: 70px;
    width: auto;
    object-fit: contain;
    display: block;
}

.brand-text h1 {
    font-size: 14px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    line-height: 1.2;
}
.brand-text h2 {
    font-size: 20px;
    color: #0a2240;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

/* DROPDOWN MENU ENGINE */
.nav-container { display: flex; }
.nav-menu { display: flex; list-style: none; gap: 10px; }
.nav-item { position: relative; padding: 10px 12px; }
.nav-link {
    color: #0a2240;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-item:hover .nav-link { color: #ff6b35; }

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-radius: 4px;
    list-style: none;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease-in-out;
    z-index: 1100;
}
.submenu li { width: 100%; }
.submenu a {
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    display: block;
}
.submenu a:hover {
    background-color: #f7fafc;
    color: #ff6b35;
    padding-left: 24px;
}
.nav-item:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* DYNAMIC HERO IMAGE CAROUSEL CONTAINER */
.hero-banner {
    position: relative;
    height: 85vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #ffffff;
    text-align: center;
    background-color: #0a2240;
}
.hero-slide-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-slide-wrapper.active-slide {
    opacity: 1;
    z-index: 2;
}
.hero-slider-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}
.hero-content {
    position: relative;
    z-index: 5;
    padding: 0 20px;
    max-width: 900px;
}
.hero-banner h3 {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.6);
}
.hero-banner p {
    font-size: 22px;
    max-width: 750px;
    margin: 0 auto;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    opacity: 0.95;
}

/* NOTICE, RESULT, EVENTS TICKER CARDS */
.info-container {
    max-width: 1200px;
    margin: -60px auto 60px auto;
    padding: 0 20px;
    display: grid;
    /* FIX: Changed 300px to min(300px, 100%) to safely handle narrow screen widths */
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 30px;
    position: relative;
    z-index: 10;
}
.info-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.card-header-tag {
    background: #ff6b35;
    color: white;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1.5px;
    text-align: center;
    padding: 15px;
}
.card-body {
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    min-height: 160px;
}
.card-body p { color: #666; font-size: 14px; margin-bottom: 20px; }
.card-btn {
    align-self: center;
    border: 2px solid #2b2d42;
    color: #2b2d42;
    padding: 6px 22px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
}
.card-btn:hover { background: #2b2d42; color: #ffffff; }

/* TWO-COLUMN DASHBOARD */
.dashboard-layout {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}
.principal-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    padding: 40px;
    display: flex;
    gap: 30px;
    align-items: center;
}
.principal-img-frame {
    flex-shrink: 0;
    width: 180px;
    height: 220px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.principal-img-frame img { width: 100%; height: 100%; object-fit: cover; }
.principal-text h3 { color: #0a2240; font-size: 24px; margin-bottom: 5px; }
.principal-text h4 { color: #ff6b35; font-size: 14px; font-weight: 600; text-transform: uppercase; margin-bottom: 15px; }
.principal-text p { color: #4a5568; font-size: 15px; line-height: 1.7; }

.sidebar-panel { display: flex; flex-direction: column; gap: 30px; }
.panel-card { background: white; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); overflow: hidden; }
.panel-title { background: #0a2240; color: white; padding: 12px 20px; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.thought-body { padding: 25px; text-align: center; }
.thought-body p { font-style: italic; color: #2b2d42; font-size: 16px; margin-bottom: 10px; font-weight: 500; }
.thought-body span { color: #ff6b35; font-size: 13px; font-weight: 600; }

/* RECENT EVENT GALLERY CAROUSEL WITH CONTROLS */
.scrolling-card-viewport { 
    width: 100%; 
    height: 220px; 
    position: relative; 
    overflow: hidden; 
}
.mini-slide { 
    position: absolute; 
    width: 100%; 
    height: 100%; 
    background-size: cover; 
    background-position: center; 
    opacity: 0; 
    transition: opacity 0.4s ease-in-out;
}
.mini-slide.active {
    opacity: 1;
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 34, 64, 0.85);
    color: #ffffff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.gallery-nav-btn:hover {
    background: #ff6b35;
    scale: 1.05;
}
.prev-btn { left: 12px; }
.next-btn { right: 12px; }

/* SECTION HEADERS UTILITY */
.section-wrapper { max-width: 1200px; margin: 80px auto; padding: 0 20px; text-align: center; }
.section-title { color: #0a2240; font-size: 32px; margin-bottom: 15px; position: relative; display: inline-block; padding-bottom: 10px; }
.section-title::after { content: ''; position: absolute; width: 50%; height: 4px; background: #ff6b35; bottom: 0; left: 25%; border-radius: 2px; }
.section-subtitle { color: #666; max-width: 700px; margin: 0 auto 40px auto; }

/* INSTITUTE TOPPERS SECTION GRID */
.toppers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 40px; }
.topper-card { background: #ffffff; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); padding: 30px 20px; text-align: center; border-top: 4px solid #0a2240; transition: all 0.3s ease; }
.topper-card:hover { transform: translateY(-5px); border-top-color: #ff6b35; }
.avatar-frame { width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 15px auto; overflow: hidden; border: 3px solid #f0f4f8; }
.avatar-frame img { width: 100%; height: 100%; object-fit: cover; }
.topper-card h4 { color: #0a2240; font-size: 18px; margin-bottom: 4px; }
.topper-card .metric { color: #ff6b35; font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.topper-card .batch { color: #718096; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }

/* INSTRUCTIONAL FACILITIES */
.gallery-grid { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.gallery-item { background: white; border-radius: 6px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); overflow: hidden; width: 45%; min-width: 300px; text-align: left; }
.gallery-item img { width: 100%; height: 240px; object-fit: cover; }
.gallery-desc { padding: 20px; }
.gallery-desc h4 { color: #0a2240; margin-bottom: 8px; }
.gallery-desc p { color: #777; font-size: 14px; }

/* OBJECTIVES ROW SPLIT */
.objectives-row { background: #0a2240; color: white; padding: 80px 5%; display: flex; align-items: center; justify-content: space-between; gap: 50px; flex-wrap: wrap; margin: 80px 0; }
.obj-content { flex: 1; min-width: 300px; }
.obj-content h3 { font-size: 28px; margin-bottom: 25px; border-left: 4px solid #ff6b35; padding-left: 15px; }
.obj-list { list-style: none; }
.obj-list li { margin-bottom: 15px; font-size: 15px; position: relative; padding-left: 25px; }
.obj-list li::before { content: "✓"; color: #ff6b35; font-weight: bold; position: absolute; left: 0; }
.obj-image { flex: 1; min-width: 300px; }
.obj-image img { width: 100%; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.3); }

/* QUICK BANNER LINKS */
.links-bar { background: linear-gradient(135deg, #1d4373 0%, #0a2240 100%); padding: 50px 20px; text-align: center; color: white; }
.links-bar h3 { margin-bottom: 25px; }
.links-flex { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; max-width: 1000px; margin: 0 auto; }
.link-btn { background: white; color: #0a2240; padding: 12px 28px; font-weight: 600; border-radius: 4px; font-size: 14px; }
.link-btn:hover { background: #ff6b35; color: white; }

/* FOOTER MARGINS */
.footer-bottom {
    max-width: 1200px; margin: 50px auto 0 auto; padding-top: 25px; border-top: 1px solid #1a2e44; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 15px;
}

/* RESPONSIVE BREAKPOINTS */
@media(max-width: 992px) {
    .main-header { flex-direction: column; gap: 15px; text-align: center; }
    .nav-menu { width: 100%; justify-content: center; flex-wrap: wrap; gap: 5px; }
    .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; width: 100%; background: #fcfcfc; text-align: center;}
    .dashboard-layout { grid-template-columns: 1fr; }
    .principal-card { flex-direction: column; text-align: center; }
    .hero-banner h3 { font-size: 36px; }
    .hero-banner p { font-size: 16px; }
    .gallery-item { width: 100%; }
}

/* FOOTER BACKGROUND & GRID LAYOUT */
footer { 
    background: #051222; 
    color: #a0aec0; 
    padding: 60px 5% 30px 5%; 
    font-size: 14px; 
}
.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 40px; 
    max-width: 1200px; 
    margin: 0 auto; 
}
.footer-col h5 { 
    color: white; 
    font-size: 16px; 
    margin-bottom: 20px; 
}
.footer-col ul { 
    list-style: none; 
}
.footer-col ul li { 
    margin-bottom: 10px; 
}
.footer-col a { 
    color: #a0aec0; 
}
.footer-col a:hover { 
    color: #ff6b35; 
}

/* FOOTER MARGINS */
.footer-bottom {
    max-width: 1200px; 
    margin: 50px auto 0 auto; 
    padding-top: 25px; 
    border-top: 1px solid #1a2e44; 
    display: flex; 
    justify-content: space-between; 
    flex-wrap: wrap; 
    gap: 15px;
}

