/*  ICAEST-I — Enhancement Layer
    Loaded AFTER style.css / other-styles.css.
    Nothing here changes the original design language, it only polishes it :
    fixes mobile background bugs, anchor offsets, focus states, table overflow
    and adds a couple of small legacy-friendly touches.                       */

/************ Anchor Offset (fixed navbar was hiding section titles) ************/
html {
    scroll-behavior: smooth;
}
#about,
#topics,
#committee,
#submission,
#fee,
#hall,
#contact,
#conprog,
#reg {
    scroll-margin-top: 90px;
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/************ Fixed Backgrounds : broken on iOS / Android, huge zoom on phones ************/
@media (max-width: 992px) {
    header .header-slider .carousel-item:first-of-type,
    header .header-slider .carousel-item:nth-of-type(2),
    header .header-slider .carousel-item:nth-of-type(3),
    header .header-slider .carousel-item:nth-of-type(4),
    header .header-slider .carousel-item:last-of-type,
    header.progHeader,
    header.regHeader,
    header.NFHeader,
    .topics,
    .submission,
    .contactus,
    .footer {
        background-attachment: scroll !important;
        background-position: center center !important;
    }
    .contactus {
        background-size: cover !important;
    }
}

/************ Navigation Bar ************/
nav.navbar {
    -webkit-transition: box-shadow 0.4s ease, padding 0.4s ease;
    transition: box-shadow 0.4s ease, padding 0.4s ease;
}
nav.navbar.scrolled {
    -webkit-box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}
/* Current page marker */
nav ul li.nav-item.current {
    border-bottom: 4px solid #FF8800;
}
nav ul li.nav-item.current > a {
    color: #E07600 !important;
}
@media (max-width: 768px) {
    nav ul li.nav-item.current {
        border-bottom: none;
        background: rgba(255, 136, 0, 0.12);
    }
    nav ul li.nav-item.current > a {
        color: #E07600 !important;
    }
}

/************ Keyboard Focus (was completely invisible : outline:none everywhere) ************/
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.accordion:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #FF8800 !important;
    outline-offset: 2px;
}

/************ Images : keep the legacy fixed heights but stop the squashing ************/
.content .first .about-img,
.second .aims-img,
.slider .carousel-item img,
.hall-slider img {
    -o-object-fit: cover;
    object-fit: cover;
}
.content .third .super img,
.committee .super img {
    -o-object-fit: cover;
    object-fit: cover;
    -o-object-position: top center;
    object-position: top center;
    background: #f2f2f2;
}
img {
    max-width: 100%;
}

/************ Cards : soften the very heavy legacy shadows a little ************/
.topics .topic {
    -webkit-box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    border-radius: 4px;
}
.topics .topic:hover {
    -webkit-box-shadow: 0 18px 26px rgba(0, 0, 0, 0.45);
    box-shadow: 0 18px 26px rgba(0, 0, 0, 0.45);
}
.content .third .super,
.committee .super {
    border-radius: 4px;
}
.submission .single {
    border-radius: 4px;
}

/************ Read More links ************/
.content .first .more,
.content .second .more {
    text-decoration: none;
    background: rgba(255, 136, 0, 0.06);
}
.content .first .more:hover,
.content .second .more:hover {
    background: #FF8800;
    color: #fff !important;
}

/************ Program Tables : they used to overflow the screen on mobile ************/
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 10px 0;
    border-radius: 4px;
    -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.content.conprog table {
    border-collapse: collapse;
    min-width: 560px;
    background: #fff;
}
.content.conprog table th {
    background: #3b3b3b;
    color: #fff;
    font-weight: bold;
    border: 1px solid #3b3b3b;
    white-space: nowrap;
}
.content.conprog table td {
    border: 1px solid #e2e2e2;
    color: #555;
    font-size: 15px;
    vertical-align: middle;
}
.content.conprog table tbody tr:nth-of-type(even) {
    background: #fafafa;
}
.content.conprog table tbody tr:hover {
    background: rgba(255, 136, 0, 0.08);
}
.content.conprog table td:first-child,
.content.conprog table th:first-child {
    width: 60px;
    text-align: center;
    font-weight: bold;
}
.content.conprog table td:last-child {
    white-space: nowrap;
    color: #E07600;
    font-weight: 600;
}
@media (max-width: 576px) {
    .content.conprog table td,
    .content.conprog table th {
        font-size: 13px;
    }
}

/************ Registration Form ************/
.content.reg form .row div {
    -webkit-transition: border-color 0.3s ease;
    transition: border-color 0.3s ease;
}
.content.reg form .row div:focus-within {
    border-color: #FF8800 !important;
}
.content.reg input,
.content.reg select,
.content.reg textarea {
    background: transparent;
    color: #262626;
}
.content.reg form i {
    color: #8a8a8a;
    -webkit-transition: color 0.3s ease;
    transition: color 0.3s ease;
}
.content.reg form .row div:focus-within i {
    color: #FF8800;
}
.content.reg input:invalid:not(:placeholder-shown),
.content.reg textarea:invalid:not(:placeholder-shown) {
    color: #b32b1f;
}
.content.reg button {
    border: none;
}
.content.reg form .row div:nth-child(12) {
    -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/************ Sponsors ************/
.sponsor img {
    height: 90px;
    -o-object-fit: contain;
    object-fit: contain;
    -webkit-filter: grayscale(100%);
    filter: grayscale(100%);
    opacity: 0.75;
    -webkit-transition: all 0.4s ease;
    transition: all 0.4s ease;
}
.sponsor img:hover {
    -webkit-filter: grayscale(0);
    filter: grayscale(0);
    opacity: 1;
}
.sponsors {
    border-top: 1px solid #eee;
}

/************ Footer ************/
/* The underline under the footer headings was dark grey on a black background
   below 768px, so it was simply invisible. */
@media (max-width: 768px) {
    .footer .fifth h4:after {
        background: #FF8800;
    }
}
.footer .fifth h4:after {
    background: #FF8800;
}
.footer .fifth ul li i:hover,
.footer .fifth ul li a:hover i {
    color: #FF8800;
}

/************ Back To Top Button ************/
.to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    width: 46px;
    height: 46px;
    line-height: 44px;
    text-align: center;
    border-radius: 50%;
    border: 1px solid #FF8800;
    background: rgba(0, 0, 0, 0.65);
    color: #FF8800;
    font-size: 18px;
    cursor: pointer;
    outline: none;
    opacity: 0;
    visibility: hidden;
    -webkit-transform: translateY(15px);
    -ms-transform: translateY(15px);
    transform: translateY(15px);
    -webkit-transition: all 0.35s ease;
    transition: all 0.35s ease;
    -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    padding: 0;
}
.to-top.show {
    opacity: 1;
    visibility: visible;
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
}
.to-top:hover {
    background: #FF8800;
    color: #fff;
}
@media (max-width: 576px) {
    .to-top {
        right: 12px;
        bottom: 12px;
        width: 40px;
        height: 40px;
        line-height: 38px;
        font-size: 16px;
    }
}

/************ Hall Slider Controls (they were invisible against bright photos) ************/
.slider .carousel-control-prev,
.slider .carousel-control-next {
    width: 12%;
    background: rgba(0, 0, 0, 0.15);
    opacity: 0.7;
}
.slider .carousel-control-prev:hover,
.slider .carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.4);
    opacity: 1;
}

/************ Misc ************/
::selection {
    background: #FF8800;
    color: #fff;
}
.submission .single h5 + p,
.submission .single p.note {
    font-size: 15px;
}
.content .fee p b {
    color: #3b3b3b;
}
