/* ===========================================================================
   sgc-site.css — small additions to sgc-theme.css for the live home page.
   sgc-theme.css is kept identical to the designer's file; anything the real
   data needs goes here instead. Load after sgc-theme.css.
   =========================================================================== */

/* Malayalam headings from the news / achievements lists */
.sgc-home .sgc-ml,
.sgc-home .sgc-ml a{font-family:'Baloo Chettan 2',var(--serif);line-height:1.45}

/* Real headlines can be much longer than the design's; keep cards tidy */
.sgc-home .sgc-item h3 a{
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;
}

/* The CMS paragraph keeps its own spacing inside the About block */
.sgc-home .sgc-about p+p{margin-top:10px}

/* Pop-up announcement (admin > home_page > pop up) */
.sgc-home .sgc-popup .modal-dialog{max-width:640px;width:auto;margin:60px auto;padding:0 15px}
.sgc-home .sgc-popup .modal-content{position:relative;border:0;border-radius:12px;overflow:hidden;box-shadow:0 24px 60px rgba(0,0,0,.35)}
.sgc-home .sgc-popup img{width:100%;height:auto}
.sgc-home .sgc-popup-close{
  position:absolute;top:10px;right:10px;z-index:2;width:36px;height:36px;border-radius:50%;
  background:var(--red);color:#fff;display:grid;place-items:center;font-size:16px;
  box-shadow:0 6px 16px rgba(0,0,0,.25);
}
.sgc-home .sgc-popup-close:hover{background:var(--red-dark)}

/* ===========================================================================
   Header + footer on every page (version 1.1)
   =========================================================================== */

/* Academics > Departments fly-out (one level deeper than the design's menus) */
.sgc-home .sgc-sub li.sgc-has-sub{position:relative}
.sgc-home .sgc-sub li.sgc-has-sub>a{display:flex;align-items:center;justify-content:space-between;gap:12px}
.sgc-home .sgc-sub li.sgc-has-sub>a .fa{opacity:.55;font-size:12px;transition:transform .2s}
.sgc-home .sgc-sub2{
  position:absolute;left:100%;top:-9px;min-width:310px;max-height:72vh;overflow-y:auto;z-index:1011;
  background:#fff;border:1px solid var(--line);border-top:2px solid var(--red);
  border-radius:0 12px 12px 12px;box-shadow:0 14px 34px rgba(14,41,71,.14);padding:8px;
  opacity:0;visibility:hidden;transform:translateX(6px);
  transition:opacity .16s,transform .16s,visibility .16s;
}
.sgc-home .sgc-sub li.sgc-has-sub:hover>.sgc-sub2,
.sgc-home .sgc-sub li.sgc-has-sub:focus-within>.sgc-sub2{opacity:1;visibility:visible;transform:none}
@media (max-width:1199px){
  .sgc-home .sgc-sub2{
    position:static;opacity:1;visibility:visible;transform:none;display:none;
    min-width:0;max-height:none;overflow:visible;box-shadow:none;border:0;border-radius:0;
    border-left:2px solid var(--line);margin:2px 0 6px 12px;padding:2px 0 2px 8px;background:transparent;
  }
  .sgc-home .sgc-sub li.sgc-has-sub.sgc-open>.sgc-sub2{display:block}
  .sgc-home .sgc-sub li.sgc-has-sub.sgc-open>a .fa{transform:rotate(90deg)}
}

/* search row: submit arrow next to the close button */
.sgc-home .sgc-searchbar .sgc-searchgo{
  width:34px;height:34px;border-radius:50%;display:grid;place-items:center;
  background:var(--red);color:#fff;flex:none;transition:background .15s;
}
.sgc-home .sgc-searchbar .sgc-searchgo .fa{color:#fff;font-size:14px}
.sgc-home .sgc-searchbar .sgc-searchgo:hover{background:var(--red-dark)}
.sgc-home .sgc-searchbar input::-webkit-calendar-picker-indicator{opacity:.4}

/* developer credit in the footer bar */
.sgc-home .sgc-fbar .sgc-credit{display:inline-block;margin-left:8px;padding-left:10px;border-left:1px solid rgba(255,255,255,.18)}
.sgc-home .sgc-fbar .sgc-credit a{color:rgba(255,255,255,.75)}
.sgc-home .sgc-fbar .sgc-credit a:hover{color:#fff}

/* mobile contact bar (phones only), kept from the previous footer */
.sgc-home .sgc-mobilebar{display:none}
@media (max-width:767px){
  .sgc-home .sgc-mobilebar{
    display:flex;position:fixed;left:0;right:0;bottom:0;z-index:95;
    background:var(--navy-deep);border-top:2px solid var(--red);
    box-shadow:0 -8px 22px rgba(6,20,38,.25);padding-bottom:env(safe-area-inset-bottom);
  }
  .sgc-home .sgc-mobilebar a{
    flex:1 1 0;display:flex;flex-direction:column;align-items:center;gap:3px;
    padding:8px 4px 7px;color:#fff;font-size:10.5px;font-weight:600;letter-spacing:.02em;
    border-right:1px solid rgba(255,255,255,.1);
  }
  .sgc-home .sgc-mobilebar a:last-child{border-right:0}
  .sgc-home .sgc-mobilebar .fa{font-size:17px;color:#fff}
  .sgc-home .sgc-mobilebar a:hover,.sgc-home .sgc-mobilebar a:focus{background:rgba(255,255,255,.08);color:#fff}
  body{padding-bottom:58px}
  .sgc-home a.scrollToTop{bottom:74px;right:16px}
  .sgc-home .sgc-fbar .sgc-credit{display:block;margin:6px 0 0;padding:0;border:0}
}

/* ===========================================================================
   Search results page (search.php)
   =========================================================================== */
.sgc-home.sgc-searchpage{background:#fff}
/* the old theme pads every "section > .container"; the search page sets its own spacing */
.sgc-home .sgc-search-hero>.container,.sgc-home .sgc-search-body>.container{padding-top:0;padding-bottom:0}
.sgc-home .sgc-search-hero{position:relative;background:var(--navy-deep);color:#fff;padding:46px 0 40px;overflow:hidden}
.sgc-home .sgc-search-hero:before{
  content:"";position:absolute;top:0;right:0;bottom:0;left:0;
  background:radial-gradient(circle at 88% 20%,rgba(156,28,31,.35),rgba(156,28,31,0) 45%);
}
.sgc-home .sgc-search-hero .container{position:relative}
.sgc-home .sgc-search-hero .sgc-eyebrow{color:#ffb9a6}
.sgc-home .sgc-search-hero .sgc-eyebrow:after{background:#ffb9a6}
.sgc-home .sgc-search-hero h1{color:#fff;font-size:32px;line-height:1.2;margin-bottom:20px;word-break:break-word}
.sgc-home .sgc-search-big{display:flex;align-items:center;gap:10px;max-width:720px;background:#fff;border-radius:10px;padding:6px 6px 6px 18px;box-shadow:0 16px 40px rgba(0,0,0,.25)}
.sgc-home .sgc-search-big .fa-search{color:var(--muted);font-size:17px}
.sgc-home .sgc-search-big input{flex:1;min-width:0;border:0;outline:none;box-shadow:none;font-size:16px;color:var(--navy);padding:10px 0;background:none;height:auto}
.sgc-home .sgc-search-big button{background:var(--red);color:#fff;font-weight:600;font-size:13px;padding:12px 20px;border-radius:7px;transition:background .15s}
.sgc-home .sgc-search-big button:hover{background:var(--red-dark)}
.sgc-home .sgc-search-summary{margin-top:16px;font-size:13px;color:rgba(255,255,255,.8)}
.sgc-home .sgc-search-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.sgc-home .sgc-search-chips a{display:inline-flex;align-items:center;gap:7px;padding:6px 13px;border-radius:30px;border:1px solid rgba(255,255,255,.3);font-size:12px;font-weight:600;color:#fff;transition:background .15s,border-color .15s}
.sgc-home .sgc-search-chips a b{font-weight:700;color:#ffb9a6}
.sgc-home .sgc-search-chips a:hover,.sgc-home .sgc-search-chips a.sgc-on{background:#fff;color:var(--navy);border-color:#fff}
.sgc-home .sgc-search-chips a.sgc-on b,.sgc-home .sgc-search-chips a:hover b{color:var(--red)}

.sgc-home .sgc-search-body{padding:38px 0 54px}
.sgc-home .sgc-search-group{margin-bottom:34px}
.sgc-home .sgc-search-group .sgc-head{border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:6px}
.sgc-home .sgc-search-group .sgc-head h2 small{font-family:var(--sans);font-size:12px;color:var(--muted);letter-spacing:0;text-transform:none;margin-left:4px}
.sgc-home .sgc-search-list li{padding:14px 0;border-bottom:1px solid var(--line-soft)}
.sgc-home .sgc-search-list li:last-child{border-bottom:0}
.sgc-home .sgc-search-title{font-family:var(--serif);font-size:17px;line-height:1.35;color:var(--navy);font-weight:500}
.sgc-home .sgc-search-title:hover{color:var(--red)}
.sgc-home .sgc-search-meta{font-size:12px;color:var(--muted);margin-top:4px}
.sgc-home .sgc-search-snippet{font-size:13.5px;line-height:1.65;color:var(--ink);margin-top:6px;max-width:80ch}
.sgc-home .sgc-searchpage mark,.sgc-home.sgc-searchpage mark{background:#fdecc8;color:inherit;padding:0 2px;border-radius:2px}

/* no results / empty search */
.sgc-home .sgc-search-empty{max-width:760px;margin:0 auto;text-align:center;padding:20px 0}
.sgc-home .sgc-search-empty .sgc-empty-icon{width:84px;height:84px;margin:0 auto 18px;border-radius:50%;display:grid;place-items:center;background:#f8f2f2;color:var(--red);font-size:34px}
.sgc-home .sgc-search-empty h2{font-size:26px;margin-bottom:10px}
.sgc-home .sgc-search-empty p{color:var(--muted);font-size:14px}
.sgc-home .sgc-search-tips{display:inline-block;text-align:left;margin:18px auto 6px;font-size:13.5px;color:var(--ink)}
.sgc-home .sgc-search-tips li{display:flex;gap:9px;margin-bottom:7px}
.sgc-home .sgc-search-tips .fa{color:var(--red);margin-top:4px}
.sgc-home .sgc-search-popular{margin-top:26px}
.sgc-home .sgc-search-popular h3{font-family:var(--sans);font-size:11px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--muted);margin-bottom:14px}
.sgc-home .sgc-search-popular .sgc-links{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
.sgc-home .sgc-search-popular .sgc-links a{display:inline-flex;align-items:center;gap:8px;padding:9px 15px;border:1px solid var(--line);border-radius:8px;font-size:13px;font-weight:600;color:var(--navy);transition:border-color .15s,color .15s,background .15s}
.sgc-home .sgc-search-popular .sgc-links a .fa{color:var(--red)}
.sgc-home .sgc-search-popular .sgc-links a:hover{border-color:var(--red);color:var(--red);background:#fdf8f8}
.sgc-home .sgc-search-empty .btn{margin-top:26px}

@media (max-width:767px){
  .sgc-home .sgc-search-hero{padding:32px 0 28px}
  .sgc-home .sgc-search-hero h1{font-size:25px}
  .sgc-home .sgc-search-big{padding-left:12px}
  .sgc-home .sgc-search-big button{padding:11px 14px}
  .sgc-home .sgc-search-title{font-size:16px}
}

/* Inner pages also load an older Font Awesome (css-plugin-collections.css) that lacks
   newer icons such as fa-user-o. The header, footer and search page use their own copy
   of Font Awesome 4.7 under a separate name, so the old one can never replace it. */
@font-face{
  font-family:'SGCFontAwesome';
  /* Font Awesome 4.7.0 files bundled with the redesign (public_data/fonts holds an older version) */
  src:url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),
      url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),
      url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype');
  font-weight:normal;font-style:normal;font-display:block;
}
.sgc-home .fa{font-family:'SGCFontAwesome' !important}

/* ===========================================================================
   Main menu = the previous site menu (template/sgc/menu.php), new look
   =========================================================================== */

/* items the old menu showed on phones only (NIRF, Feedback, Infodesk, Login …) */
@media (min-width:1200px){
  .sgc-home .sgc-nav>li.sgc-mobile-only{display:none}
}

/* the hidden phone-only items sit at the end of the list, so right-align the
   dropdowns of the last three visible items (Resources, IQAC, Admissions)
   instead of the last three list items */
.sgc-home .sgc-nav>li:nth-last-child(-n+3) .sgc-sub{left:0;right:auto}
.sgc-home .sgc-nav>li:nth-child(n+7) .sgc-sub{left:auto;right:0}

/* nested lists (About College, Departments, Programmes, Student Support):
   from the 4th item on there is no room on the right, so open to the left */
.sgc-home .sgc-nav>li:nth-child(n+4) .sgc-sub2{
  left:auto;right:100%;border-radius:12px 0 12px 12px;transform:translateX(-6px);
}

/* the previous menu has longer labels than the design's; keep one line */
@media (min-width:1200px) and (max-width:1399px){
  .sgc-home .sgc-masthead .container{gap:10px}
  .sgc-home .sgc-brand img{height:56px;max-width:230px}
  .sgc-home .sgc-nav>li>a{padding-left:6px;padding-right:6px;font-size:12px;gap:4px}
  .sgc-home .sgc-nav>li.sgc-current>a:after{left:6px;right:6px}
}

/* long dropdowns stay inside the window on short laptop screens */
@media (min-width:1200px){
  .sgc-home .sgc-sub2{max-height:calc(100vh - 160px)}
}
