/*
=============================================================
TRILOGIX INSTITUTE WEBSITE
File: courses.css
Purpose: Main course directory styling.
Maintenance note: Related rules and logic are grouped and documented by feature.
=============================================================
*/

/*
STYLE ORGANIZATION
- Base/component rules define the default desktop presentation.
- State classes such as .active, .show, and :hover control interactions.
- Media queries near the relevant rules adapt the layout for tablet and mobile screens.
*/

/* Courses page — aligned with index-preview and about-preview */
.courses-hero{min-height:650px}
.courses-hero .about-hero-overlay{background:linear-gradient(90deg,rgba(3,23,65,.94) 0%,rgba(5,49,120,.80) 48%,rgba(2,29,78,.35) 100%)}
.courses-campus-section{background:linear-gradient(180deg,#f7faff 0%,#eef5ff 48%,#fff 100%);position:relative;overflow:hidden}
.courses-campus-section::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.42;background-image:linear-gradient(rgba(31,111,222,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(31,111,222,.055) 1px,transparent 1px);background-size:48px 48px}
.courses-campus-section>.container-page{position:relative;z-index:1}
/* The course-category design now lives inside the existing campus program area. */
.campus-course-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:2rem;margin-bottom:2.8rem}
.campus-course-heading .section-subtitle{max-width:760px}
.course-campus-tabs{display:flex;flex-wrap:wrap;gap:.55rem;padding:.42rem;border:1px solid #d5e2f2;border-radius:16px;background:rgba(255,255,255,.76);box-shadow:0 14px 34px rgba(10,53,120,.08);backdrop-filter:blur(12px)}
.course-campus-tab{display:inline-flex;align-items:center;justify-content:center;gap:.55rem;border:0;border-radius:11px;background:transparent;padding:.76rem 1.02rem;color:#61708a;font-size:.8rem;font-weight:800;white-space:nowrap;transition:.25s ease}
.course-campus-tab img{width:22px;height:15px;object-fit:cover;border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.08)}
.course-campus-tab:hover,.course-campus-tab.active{background:#fff;color:#0754c5;box-shadow:0 8px 20px rgba(7,65,155,.11)}
.campus-program-block{padding:2.2rem 0 3.35rem;scroll-margin-top:105px}
.campus-program-block+.campus-program-block{border-top:1px solid #dbe7f5;padding-top:3.8rem}
.campus-program-block.is-hidden{display:none}
.campus-program-title{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1rem;margin-bottom:1.5rem}
.campus-flag{width:58px;height:58px;display:grid;place-items:center;border:1px solid #d8e5f5;border-radius:16px;background:#fff;box-shadow:0 10px 24px rgba(8,55,135,.08)}
.campus-flag img{width:35px;height:24px;object-fit:cover;border-radius:3px}
.campus-program-title span{display:block;color:#1762ca;font-size:.69rem;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.campus-program-title h3{margin:.28rem 0 .3rem;font-size:clamp(1.3rem,2.2vw,1.8rem);color:#10213e}
.campus-program-title p{margin:0;color:#6b7890;font-size:.9rem}
.campus-view-link{display:inline-flex;align-items:center;justify-content:flex-end;gap:.45rem;justify-self:end;margin-left:auto;color:#0754c5;font-size:.82rem;font-weight:800;white-space:nowrap;transition:.25s ease}
.campus-view-link:hover{color:#003d98;transform:translateX(3px)}
/* Premium category cards inspired by the index-page Course Categories section. */
.program-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.program-card{position:relative;min-height:154px;display:grid;grid-template-columns:52px minmax(0,1fr) 22px;align-items:center;column-gap:1rem;border:1px solid #d4e1f1;border-radius:18px;background:rgba(255,255,255,.94);padding:2.05rem 1.25rem 1.25rem;color:#17233a;box-shadow:0 12px 34px rgba(10,52,121,.065);transition:.28s ease;overflow:hidden}
.program-card::before{content:"";position:absolute;left:0;top:50%;width:4px;height:54px;transform:translateY(-50%);background:linear-gradient(180deg,#1464df,#55a8ff);transition:.28s ease}
.program-card::after{content:var(--card-index);position:absolute;right:1rem;top:.78rem;color:#9aacbf;font-size:.68rem;font-weight:800;letter-spacing:.08em}
.program-card:hover{transform:translateY(-5px);border-color:#3b82f6;background:linear-gradient(135deg,#0b49ad 0%,#075fc9 55%,#0671d8 100%);box-shadow:0 24px 50px rgba(7,84,197,.28);color:#fff}
.program-card:hover::before{height:100%;background:rgba(255,255,255,.9)}
.program-card:hover::after{color:rgba(255,255,255,.62)}
.program-icon{width:52px;height:52px;display:grid;place-items:center;border:1px solid #cfe1f8;border-radius:15px;background:#edf5ff;color:#0754c5;font-size:1.15rem;margin:0}
.program-card>div{min-width:0}
.program-card h4{margin:0;color:#17233a;font-size:1rem;line-height:1.3}
.program-card p{margin:.45rem 0 .58rem;color:#68778f;font-size:.78rem;line-height:1.55}
.program-card small{display:block;color:#1762ca;font-size:.66rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.program-card>i{position:static;justify-self:end;align-self:end;color:#9badc5;transition:.25s}
.program-card:hover .program-icon{border-color:rgba(255,255,255,.32);background:rgba(255,255,255,.14);color:#fff}
.program-card:hover h4,.program-card:hover p,.program-card:hover small{color:#fff}
.program-card:hover p{color:rgba(255,255,255,.78)}
.program-card:hover small{color:rgba(255,255,255,.9)}
.program-card:hover>i{color:#fff;transform:translate(2px,-2px)}
.courses-cta-section{padding-top:1rem!important}
.courses-cta{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:2rem;border-radius:28px;padding:3.25rem;background:radial-gradient(circle at 88% 15%,rgba(101,223,255,.28),transparent 30%),linear-gradient(135deg,#041d52,#0752bc);box-shadow:0 28px 70px rgba(4,43,111,.23);color:#fff}
.courses-cta::after{content:"";position:absolute;inset:0;pointer-events:none;opacity:.15;background-image:linear-gradient(rgba(255,255,255,.18) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.18) 1px,transparent 1px);background-size:40px 40px}
.courses-cta>*{position:relative;z-index:1}.courses-cta h2{max-width:650px;margin:.4rem 0 .8rem;color:#fff;font-size:clamp(1.8rem,3vw,2.55rem)}.courses-cta p{max-width:650px;margin:0;color:rgba(235,245,255,.78);line-height:1.75}.courses-cta-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.75rem;min-width:max-content}

/* Responsive breakpoint: adjusts the related component for this viewport range. */
@media(max-width:1199.98px){
  .campus-course-heading{grid-template-columns:1fr;align-items:start}
  .course-campus-tabs{width:max-content;max-width:100%}
  .program-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Responsive breakpoint: adjusts the related component for this viewport range. */
@media(max-width:991.98px){
  .courses-cta{align-items:flex-start;flex-direction:column}
  .courses-cta-actions{justify-content:flex-start;min-width:0}
}

/* Responsive breakpoint: adjusts the related component for this viewport range. */
@media(max-width:767.98px){
  .courses-hero{min-height:590px}
  .course-campus-tabs{width:100%;display:grid;grid-template-columns:1fr;justify-items:start;align-items:stretch;gap:.35rem;padding:.4rem}
  .course-campus-tab{width:100%;justify-content:flex-start;text-align:left;padding:.72rem .85rem}
  .campus-program-title{grid-template-columns:1fr}
  .campus-view-link{grid-column:1;margin-top:.25rem;justify-self:start;margin-left:0}
  .program-card-grid{grid-template-columns:1fr}
  .program-card{min-height:148px;padding:1.95rem 1rem 1.1rem;grid-template-columns:48px minmax(0,1fr) 20px;column-gap:.85rem}
  .program-icon{width:48px;height:48px}
  .courses-cta{padding:2rem;border-radius:22px}
  .courses-cta-actions{width:100%;flex-direction:column}
  .courses-cta-actions a{width:100%}
}
