/* =============================================================
   PSGCAS Institutional Repository - IITH (RAIITH) style
   Install: cfg/static/style/auto/zzz_local.css
   Orange gradient: #f05a25 -> #f48120 -> #f9a61b -> #ffcb04
   ============================================================= */
:root {
  --orange: #f05a25;
  --orange-dk: #d94a17;
  --blue: #0070c0;
  --ink: #1c1c1c;
  --muted: #6b6b6b;
  --line: #eeeeee;
  --bg: #ffffff;
  --grad: linear-gradient(90deg, #f05a25 0%, #f48120 44%, #f9a61b 69%, #ffcb04 89%);
  --sans: Roboto, 'Segoe UI', Arial, Helvetica, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: var(--sans); line-height: 1.55; background: var(--bg); color: var(--ink); overflow-x: hidden; }
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-dk); text-decoration: underline; }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted); font-size: .9rem; }

#wrapper { display: flex; flex-direction: column; min-height: 100vh; }

/* ================= HEADER ================= */
#site-header { background: #fff; position: relative; z-index: 300; height: 100px; }
#header-main { display: flex; align-items: center; gap: 22px; height: 100%; padding: 0 24px; max-width: 1920px; margin: 0 auto; }
#header-logo img { height: 88px; width: auto; display: block; }

#main-nav { flex: 0 1 auto; }
#nav-list { list-style: none; display: flex; align-items: center; gap: 2px; }
.nav-item { position: relative; }
.nav-item > a { display: block; padding: 10px 16px; color: var(--orange); font-size: .92rem; font-weight: 400; text-decoration: none; }
.nav-item > a:hover { color: var(--orange-dk); text-decoration: none; }
.nav-dropdown > .dropdown-toggle::after {
  content: ''; display: inline-block; margin-left: 5px; vertical-align: middle;
  border-top: 4px solid currentColor; border-left: 4px solid transparent; border-right: 4px solid transparent;
}
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 190px; list-style: none;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(0,0,0,.15); z-index: 400;
}
.nav-dropdown:hover > .dropdown-menu, .nav-dropdown:focus-within > .dropdown-menu, .nav-dropdown.open > .dropdown-menu { display: block; }
.dropdown-menu li a { display: block; padding: 9px 18px; color: var(--ink); font-size: .9rem; border-bottom: 1px solid var(--line); }
.dropdown-menu li:last-child a { border: 0; }
.dropdown-menu li a:hover { background: #fff3ee; color: var(--orange); text-decoration: none; }

/* centre wordmark (stands in for the RAIITH logo) */
#header-brand { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; text-decoration: none; line-height: 1.1; }
#header-brand .brand-main { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; font-size: 2.2rem; letter-spacing: .12em; color: #6f7f12; }
#header-brand .brand-sub { font-family: Georgia, serif; font-style: italic; font-size: .72rem; color: #4b7f2a; }

#header-tools { display: flex; align-items: center; gap: 18px; margin-left: auto; }
#header-search-icon { color: var(--orange); display: flex; }
#header-login-top { font-size: .9rem; }
#header-login-top a { color: var(--orange); }
#header-login-top .ep_tm_key_tools { display: flex; list-style: none; gap: 14px; }
#header-lang { font-size: .8rem; }

#nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; background: transparent; border: 1px solid var(--orange); border-radius: 4px; padding: 8px 9px; cursor: pointer; margin-left: auto; }
#nav-toggle span { display: block; width: 22px; height: 2px; background: var(--orange); }

/* ================= BREADCRUMB (orange bar) ================= */
#breadcrumb-bar { background: var(--orange); color: #fff; height: 40px; }
.breadcrumb-inner { max-width: 1228px; margin: 0 auto; padding: 0 20px; height: 100%; display: flex; align-items: center; font-size: .9rem; }
#breadcrumb-bar a { color: #fff; }
#breadcrumb-bar .sep { margin: 0 9px; }
body.page-home #breadcrumb-bar { display: none; }

/* ================= MAIN ================= */
#main-content { flex: 1 1 auto; padding: 28px 20px 56px; }
.ep_tm_page_content { max-width: 1228px; margin: 0 auto; }
h1.ep_tm_pagetitle, h1#page-title {
  font-size: 1.45rem; font-weight: 500; color: var(--ink);
  border-bottom: 2px solid rgba(240,90,37,.35); padding-bottom: 10px; margin-bottom: 24px; position: relative;
}
h1.ep_tm_pagetitle::after, h1#page-title::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 120px; height: 5px; background: var(--orange); }
body.page-home h1#page-title { display: none; }
body.page-home #main-content { padding: 0 0 56px; }
body.page-home .ep_tm_page_content { max-width: none; }

h2, h3 { color: var(--ink); margin: 16px 0 8px; font-weight: 500; }
p { margin-bottom: 10px; }
.ep_latest_tool_list td { padding: 8px 10px; vertical-align: top; font-size: .9rem; border-bottom: 1px solid var(--line); }
.ep_search_result { padding: 14px 16px; background: #fff; box-shadow: 0 1px 5px #ccc; margin-bottom: 14px; }
.ep_search_result:hover { box-shadow: 0 2px 5px 1px #9e9e9e; }
.ep_view_menu ul, .ep_view_col ul { margin-left: 18px; }
input[type=text], input[type=password], select, textarea { border: 1px solid #ccc; padding: 8px 10px; font-family: var(--sans); font-size: .92rem; }
input.ep_form_action_button, input.ep_form_internal_button, .btn-orange {
  background: var(--orange); color: #fff; border: 0; padding: 8px 20px; border-radius: 3px; cursor: pointer; font-size: .95rem; display: inline-block; text-decoration: none;
}
input.ep_form_action_button:hover, .btn-orange:hover { background: var(--orange-dk); color: #fff; text-decoration: none; }

/* ================= HOME HERO ================= */
.home-hero {
  width: 100%; margin-left: 0; height: 400px;
  display: flex; align-items: center; justify-content: center; padding: 0 20px;
  background: url(/style/images/banner.jpg) center/cover no-repeat, linear-gradient(135deg, #20404f, #6b4a2a);
}
.hero-search { display: flex; width: 100%; max-width: 990px; height: 50px; background: #fff; border-radius: 25px; overflow: hidden; border: 1px solid var(--orange); }
.hero-search input[type=text] { flex: 1 1 auto; border: 0; padding: 0 20px; font-size: .9rem; outline: 0; min-width: 0; }
.hero-search select { border: 0; border-left: 1px solid #ddd; background: #fff; font-size: .85rem; padding: 0 12px; width: 165px; outline: 0; }
.hero-search button { width: 82px; border: 0; background: var(--orange); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.hero-search button:hover { background: var(--orange-dk); }

/* ================= ORANGE STRIP ================= */
.home-strip { position: relative; width: 100vw; margin-left: calc(50% - 50vw); background: var(--grad); height: 145px; display: flex; align-items: center; color: #fff; padding: 0 60px; }
#home-stats { list-style: none; display: flex; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
#home-stats::-webkit-scrollbar { display: none; }
#home-stats li { flex: 0 0 16.66%; min-width: 150px; text-align: center; scroll-snap-align: start; }
#home-stats li a { display: flex; flex-direction: column; align-items: center; color: #fff; text-decoration: none; }
.strip-loading { color: #fff; }
.strip-ic { width: 50px; height: 50px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; transition: all .3s; border: 1px solid #fff; }
#home-stats li a:hover .strip-ic { background: transparent; }
#home-stats li a:hover .strip-ic svg { fill: #fff; }
.strip-name { margin-top: 12px; font-size: 1.1rem; }
.strip-num { font-size: .8rem; font-weight: 700; margin-top: 4px; }
.strip-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #fff; font-size: 2rem; cursor: pointer; opacity: .85; padding: 8px 14px; }
.strip-prev { left: 8px; } .strip-next { right: 8px; }
.strip-arrow:hover { opacity: 1; }

/* ================= HOME BODY ================= */
.home-body { display: flex; gap: 40px; max-width: 1560px; margin: 0 auto; padding: 16px 30px 0; }
.home-main { flex: 1 1 0; min-width: 0; }
.home-side { flex: 0 0 332px; padding-top: 50px; }

.home-tabs { display: flex; border-bottom: 1px solid #ddd; margin-bottom: 8px; }
.home-tabs .tab { background: none; border: 0; padding: 10px 17px; font-size: 1.2rem; font-family: var(--sans); color: var(--ink); cursor: pointer; position: relative; }
.home-tabs .tab.active { color: var(--orange); border: 1px solid #ddd; border-bottom: 0; background: #fff; margin-bottom: -1px; }
.home-tabs .tab.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--orange); }
.tab-panel { display: none; } .tab-panel.active { display: block; }

.home-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 12px 0 18px; }
.home-card { background: #fff; border: 1px solid var(--line); box-shadow: 0 5px 25px rgba(185,203,255,.2); text-align: center; padding: 10px 12px 0; }
.card-img { display: flex; height: 120px; align-items: center; justify-content: center; }
.card-glyph { font-size: 4rem; color: #555; filter: grayscale(1); }
.home-card h3 { font-size: 1.15rem; font-weight: 400; margin: 6px 0 16px; }
.home-card h3 a { color: #1f4d99; }
.card-counts { list-style: none; border-top: 1px solid var(--line); padding: 8px 0; display: flex; justify-content: center; font-weight: 600; color: #888; font-size: .85rem; }
.card-counts .ic { margin-right: 8px; color: #000; }

.orange-rule { border-bottom: 5px solid var(--orange); margin: 4px 0 18px; }
.recent-head { font-size: 1.35rem; margin: 0 0 14px; }
.recent-item { background: #fff; box-shadow: 0 1px 5px #ccc; padding: 14px 18px; margin: 0 0 14px; transition: box-shadow .4s; }
.recent-item:hover { box-shadow: 0 2px 5px 1px #9e9e9e; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 4px; font-size: .75rem; font-weight: 600; background: #17a2b8; color: #fff; }
.recent-item .item-title { display: block; font-size: 1.1rem; margin: 6px 0; color: #207698; }
.load-more-wrap { text-align: center; margin: 22px 0; }

/* Filter sidebar */
.side-tabs { display: flex; gap: 18px; border-bottom: 1px solid #ccd6e6; margin-bottom: 20px; font-size: 1.2rem; }
.side-tabs .active { padding-bottom: 8px; border-bottom: 3px solid var(--blue); color: var(--ink); margin-bottom: -1px; }
.side-tabs a { color: #666; }
details.filter { background: #f6f6f6; margin-bottom: 18px; }
details.filter summary { list-style: none; cursor: pointer; padding: 9px 17px; font-size: 1.05rem; color: var(--ink); display: flex; justify-content: space-between; }
details.filter summary::-webkit-details-marker { display: none; }
details.filter summary::after { content: '+'; font-size: 1.3rem; line-height: 1; }
details.filter[open] summary::after { content: '\2212'; }
.filter-list { list-style: none; padding: 4px 16px 12px; }
.filter-list li { padding: 4px 0; font-size: .92rem; }
.filter-list a { color: var(--ink); display: flex; gap: 8px; }
.filter-list .pill { margin-left: auto; order: 2; background: #6c757d; color: #fff; border-radius: 10px; padding: 0 8px; font-size: .75rem; }
.filter-list .more a { color: #0070c0; text-decoration: underline; }

/* ================= LOGIN CARD ================= */
body.page-login #main-content { background: #fff; }
body.page-login h1#page-title { display: none; }
body.page-login .ep_tm_page_content {
  margin: 10px auto; padding: 24px;
  background: linear-gradient(180deg, #f05a25 0%, #c2562e 40%, #4a4a4a 100%);
  color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.35); text-align: center;
}
body.page-login .ep_tm_page_content a { color: #fff; }
body.page-login .ep_tm_page_content::before {
  content: 'Please log in'; display: block; font-size: 1.6rem; margin-bottom: 18px;
}
body.page-login table, body.page-login tbody, body.page-login tr, body.page-login td, body.page-login th { display: block; width: 100%; text-align: left; }
body.page-login input[type=text], body.page-login input[type=password] { width: 100%; height: 40px; margin: 4px 0 12px; border: 1px solid #aab; background: #fff; color: #333; }
body.page-login input.ep_form_action_button { width: 100%; height: 40px; background: #b9532b; border: 0; color: #fff; }
body.page-login label, body.page-login .ep_form_field_name { color: #fff; font-size: .9rem; }

/* ================= FOOTER ================= */
#site-footer { background: var(--grad); color: #fff; padding: 30px 25px 22px; margin-top: auto; }
.footer-social { display: flex; justify-content: center; gap: 12px; margin-bottom: 4px; }
.soc { width: 30px; height: 30px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; text-decoration: none; }
.soc:hover { color: #fff; text-decoration: none; opacity: .85; }
.soc-fb { background: #3b5998; } .soc-ig { background: #e1306c; } .soc-in { background: #0a66c2; } .soc-x { background: #000; }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: .95rem; margin-top: 4px; }
.footer-row a { color: #fff; }

/* ================= RESPONSIVE ================= */
@media (max-width: 1200px) {
  #header-brand .brand-main { font-size: 1.6rem; }
  #header-brand .brand-sub { display: none; }
  .home-side { flex-basis: 280px; }
}
@media (max-width: 900px) {
  #site-header { height: auto; }
  #header-main { flex-wrap: wrap; padding: 8px 14px; gap: 8px; }
  #header-logo img { height: 56px; }
  #header-brand { order: 2; flex: 1 1 auto; align-items: flex-start; }
  #nav-toggle { display: flex; order: 3; }
  #header-tools { order: 4; width: 100%; justify-content: flex-end; }
  #main-nav { order: 5; width: 100%; display: none; }
  #main-nav.open { display: block; }
  #nav-list { flex-direction: column; align-items: stretch; }
  .nav-item > a { border-bottom: 1px solid var(--line); }
  .dropdown-menu { position: static; box-shadow: none; border: 0; background: #fff3ee; }
  .nav-dropdown:hover > .dropdown-menu { display: none; }
  .nav-dropdown.open > .dropdown-menu { display: block; }
  .home-hero { height: 260px; }
  .hero-search { flex-wrap: wrap; height: auto; border-radius: 12px; }
  .hero-search input[type=text] { flex-basis: 100%; height: 46px; }
  .hero-search select { flex: 1 1 40%; height: 42px; width: auto; border-top: 1px solid #ddd; }
  .hero-search button { height: 42px; }
  .home-strip { padding: 0 36px; height: 130px; }
  #home-stats li { flex-basis: 33.33%; }
  .home-body { flex-direction: column; padding: 12px 14px 0; gap: 10px; }
  .home-side { flex: 1 1 auto; padding-top: 0; }
  .home-cards { grid-template-columns: 1fr; }
  .footer-row { justify-content: center; text-align: center; }
}
@media print {
  #site-header, #site-footer, #breadcrumb-bar, #nav-toggle, .ep_noprint { display: none !important; }
  body { font-size: 11pt; color: #000; }
}

/* ================= KEPT SITE RULES ================= */
body[data-page="empid"] .ep_view_menu ul { column-count: 5; column-gap: 30px; }
#ep_eprint_view_panel_0 { overflow-x: auto; overflow-y: auto; max-width: 100%; }
#ep_eprint_view_panel_0 table { min-width: 1200px; border-collapse: collapse; }


/* =====================================================================
   FULL-WIDTH OVERRIDES  (beats EPrints' default boxed layout, auto-3.4.x.css)
   ===================================================================== */
html, body {
  width: 100% !important; max-width: none !important; min-width: 0 !important;
  margin: 0 !important; padding: 0 !important;
  height: auto !important; min-height: 100vh;
  background: #fff !important; box-shadow: none !important; border: 0 !important;
}
#wrapper, body > #wrapper {
  width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important;
  background: #fff !important; box-shadow: none !important; border: 0 !important;
}
#site-header, #breadcrumb-bar, #site-footer, #main-content {
  width: 100% !important; max-width: none !important; margin-left: 0 !important; margin-right: 0 !important;
  box-shadow: none !important; border-left: 0 !important; border-right: 0 !important;
}
#site-header { border-bottom: 0 !important; }
#header-main { max-width: none !important; width: 100% !important; }

/* hero + strip: true edge-to-edge */
.home-hero, .home-strip { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
body.page-home #main-content, body:has(.home-hero) #main-content { padding: 0 0 56px !important; }
body.page-home .ep_tm_page_content, body:has(.home-hero) .ep_tm_page_content {
  max-width: none !important; width: 100% !important; margin: 0 !important; padding: 0 !important;
}
body.page-home #breadcrumb-bar, body:has(.home-hero) #breadcrumb-bar { display: none !important; }
body.page-home h1#page-title, body:has(.home-hero) h1#page-title { display: none !important; }

/* header text must not wrap */
.nav-item > a, #header-login-top a, #header-login-top li { white-space: nowrap; }
#header-login-top .ep_tm_key_tools { margin: 0; padding: 0; }
#header-login-top .ep_tm_key_tools li { border: 0 !important; padding: 0 !important; margin: 0 !important; }
#header-login-top .ep_tm_key_tools li + li { border-left: 1px solid #ddd !important; padding-left: 12px !important; }

/* footer: no dark line, full gradient */
#site-footer { background: var(--grad) !important; padding: 28px 40px 20px !important; }
.ep_tm_footer, #site-footer .ep_tm_footer {
  border: 0 !important; background: transparent !important; box-shadow: none !important;
  padding: 0 !important; margin: 0 !important; color: #fff !important; width: 100%;
}
.footer-row { max-width: 1560px; margin: 8px auto 0; }

/* inner pages: comfortable readable width */
body:not(.page-home):not(:has(.home-hero)) .ep_tm_page_content { max-width: 1228px; margin: 0 auto; }

/* ---- login card: stacked, full-width fields ---- */
body.page-login .ep_tm_page_content form,
body.page-login .ep_tm_page_content form * { float: none !important; box-sizing: border-box; }
body.page-login .ep_tm_page_content form label,
body.page-login .ep_tm_page_content form th,
body.page-login .ep_tm_page_content form td,
body.page-login .ep_tm_page_content form div,
body.page-login .ep_tm_page_content form span { display: block !important; width: 100% !important; text-align: left; padding: 0 !important; background: none !important; border: 0 !important; }
body.page-login .ep_tm_page_content form input[type=text],
body.page-login .ep_tm_page_content form input[type=password] {
  display: block !important; width: 100% !important; height: 42px; margin: 4px 0 14px !important;
  padding: 0 12px !important; background: #fff !important; border: 1px solid #b5b5b5 !important; color: #333;
}
body.page-login .ep_tm_page_content form input[type=submit],
body.page-login .ep_tm_page_content form button {
  display: block !important; width: 100% !important; height: 42px; margin: 6px 0 !important;
  background: #b9532b !important; color: #fff !important; border: 0 !important; cursor: pointer;
}
body.page-login .ep_tm_page_content form input[type=submit]:hover { background: #a14624 !important; }
body.page-login .ep_tm_page_content > p { color: #fff; font-size: .85rem; margin: 0 0 14px; }
