/* Apply a global font to the entire page */
body {
    font-family: 'Poppins', sans-serif; /* Clean, modern body text */
    -webkit-font-smoothing: antialiased;
    color: #333;
}

/* Specific font for all Headings */
h1, h2, h3, h4, .showcase-title, .guidance-title {
    font-family: 'Playfair Display', serif; /* Elegant, premium headings */
    font-weight: 700;
}



.career {
  background-image: url('../images/background/about-why.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Refactored Course Showcase Styles */
.course-header {
    padding: 40px 0 20px;
    text-align: center;
    
}

.course-header h1 {
    font-weight: 700;
    color: #0A1F36;
}

.course-showcase {
    padding: 80px 0;
    background-color: #F4F7FB;
    background-image: url('assets/bg-pattern.svg');
    background-size: cover;
}

.course-intro {
    text-align: center;
    margin-bottom: 40px;
}

.course-title {
    font-family: "Playfair Display", serif;
    font-size: 38px;
    color: #123A63;
    margin-bottom: 10px;
}

.course-subtitle {
    color: #6B7280;
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Universal Grid Layout */
.course-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 36px;
}

/* Individual Course Card Styling */
.course-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 25px 15px;
    border: 1px solid rgba(15, 23, 42, .06);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .06);
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .12);
    border-color: #FF8C00; /* Maintained original orange accent */
}

.course-logo-wrapper {
    margin-bottom: 20px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-logo-wrapper img {
    max-width: 120px;
    height: auto;
    object-fit: contain;
}

.course-info {
    flex-grow: 1;
}

.course-name a {
    color: #0A1F36;
    font-size: 15px;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.course-card:hover .course-name a {
    color: #FF8C00;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .course-grid {
        grid-template-columns: 1fr;
    }
}



/* Universal Course Info Styles */
.course-info-section {
    padding: 50px 0;
}

.course-info-header {
    margin-bottom: 30px;
}

.course-info-header h1 {
    padding-bottom: 10px;
    color: #0B2A4A;
    font-size: 30px;
    border-bottom: 2px solid transparent;
    /* Maintained original orange/gold gradient border */
    background: linear-gradient(#ffffff, #ffffff) padding-box, 
                linear-gradient(to right, #FF9800, #FFC107, #FFEB3B) border-box;
}

.course-content-panel {
    gap: 20px;
    border-bottom: 1px solid #0A1F36;
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.course-content-panel h3 {
    color: #0A1F36;
    font-weight: 700;
    margin-bottom: 15px;
}

.course-content-panel p {
    line-height: 1.8;
    color: #444;
    text-align: justify;
    margin-bottom: 15px;
}

/* List Styling */
.course-pathway-list {
    padding-left: 0;
    list-style: none;
}

.course-pathway-sub-list {
    margin-top: 10px;
    padding-left: 20px;
}

.course-pathway-sub-list li {
    list-style: disc; /* Original dot style */
    line-height: 28px;
    margin-bottom: 12px;
    color: #444;
}

.course-pathway-sub-list li strong {
    color: #0B2A4A;
}

/* Universal Guidance Section Styles */
.course-guidance-section {
  padding: 60px 18px;
  background-color: #ffffff;
}

.course-guidance-container {
  max-width: 1200px;
  margin: 0 auto;
}

.course-guidance-header {
  text-align: center;
  margin-bottom: 40px;
}

.course-guidance-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(28px, 3vw, 40px);
  color: #0A1F36;
  margin-bottom: 12px;
}

.course-guidance-subtitle {
  color: #6B7280;
  font-size: 16px;
  max-width: 600px;
  margin: 0 auto;
}

/* Universal Grid Layout */
.course-branch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Universal Card Styling */
.course-branch-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(18, 58, 99, 0.1);
  background: #1E3A5F;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  overflow: hidden;
}

.course-branch-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(18, 58, 99, 0.12);
  border-color: #FF8C00; /* Signature orange hover */
  border-width: 5px;
}

/* Icon Box Styling */
.course-branch-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #123A63;
}

.course-branch-icon-box svg {
  width: 28px;
  height: 28px;
  stroke: #FFF9A8;
}

/* Path overrides for SVGs */
.course-branch-icon-box svg path, 
.course-branch-icon-box svg rect, 
.course-branch-icon-box svg circle {
    stroke: #FFF9A8; 
}

.course-branch-card:hover .course-branch-icon-box svg {
    stroke: #ffffff;
    filter: drop-shadow(0 0 5px #FFF9A8);
    transition: all 0.3s ease;
}

/* Text Content */
.course-branch-name {
  font-weight: 700;
  font-size: 16px;
  color: #FFF9A8;
  margin-bottom: 4px;
}

.course-branch-tag {
  font-size: 13px;
  color: #FFFFFF;
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .course-branch-grid {
    grid-template-columns: 1fr;
  }
  .course-branch-card {
    padding: 16px;
  }
}




/* =========================================
   🔥 FINAL OPTIMIZED MOBILE VIEW (EDUTECH)
   ========================================= */
@media (max-width: 768px) {

    /* 1. FIX HEADER GAP */
    main, 
    .course-showcase, 
    .course-header,
    .edutech-course-section,
    section:first-of-type {
        margin-top: 60px !important;
        padding-top: 15px !important;
        padding-bottom: 0px !important;
    }

    /* 2. HEADING FIX */
    h1, 
    .course-title, 
    .edutech-blog-section-title, 
    .course-guidance-title {
        font-size: 1.4rem !important;
        line-height: 1.2 !important;
        margin-top: 0 !important;
        margin-bottom: 4px !important;
        text-align: center !important;
    }

    /* SUBTITLE */
    .course-subtitle, 
    .edutech-blog-section-header-center p,
    .course-intro {
        font-size: 14px !important;
        margin-bottom: 10px !important;
        padding: 0 15px !important;
        text-align: center;
    }

    /* 3. GRID LAYOUT */
    .course-grid, 
    .course-branch-grid,
    .edutech-course-layout {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 12px !important;
        padding: 0 15px !important;
        margin-top: 5px !important;
    }

    /* REMOVE ROW BREAK ISSUE */
    .edutech-course-row {
        display: contents !important;
    }

    /* 4. CARD FIX (🔥 MAIN FIX) */
    .course-card, 
    .course-branch-card,
    .edutech-course-card {
        flex: 0 1 calc(50% - 12px) !important;
        max-width: calc(50% - 12px) !important;
        min-width: 140px !important;

        height: 140px !important;              /* 🔥 SAME HEIGHT */
        padding: 10px !important;

        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        align-items: center !important;

        box-sizing: border-box !important;
        overflow: hidden !important;
        margin-bottom: 0 !important;
    }

    /* CENTER LAST CARD */
    .course-card:last-child:nth-child(odd),
    .course-branch-card:last-child:nth-child(odd),
    .edutech-course-card:last-child:nth-child(odd) {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* 5. LOGO FIX */
    .course-logo-wrapper {
        height: 50px !important;
        width: 100% !important;

        display: flex;
        align-items: center;
        justify-content: center;

        margin-bottom: 5px !important;
        overflow: hidden !important;
    }

    .course-logo-wrapper img {
        max-height: 45px !important;
        max-width: 100% !important;
        object-fit: contain !important;
    }

    /* 6. TEXT FIX */
    .course-name a, 
    .edutech-course-name {
        font-size: 0.8rem !important;
        font-weight: 600 !important;

        text-align: center;
        line-height: 1.2;

        display: -webkit-box;
        -webkit-line-clamp: 2;   /* max 2 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

}

/* =========================================
   🔥 EXTRA SMALL DEVICES (VERY SMALL PHONES)
   ========================================= */
@media (max-width: 350px) {

    .course-card, 
    .course-branch-card, 
    .edutech-course-card {
        flex: 0 1 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

}





/* --- Global Mobile Optimization for Info Sections (Max 768px) --- */
@media (max-width: 768px) {

    /* 1. Fix Overlap: Bring section safely below the logo/header */
    .course-info-section, 
    .course-guidance-section,
    .course-content-panel {
        margin-top: 70px !important;   /* slightly reduced from 80 */
        padding-top: 0 !important;
        padding-bottom: 10 !important;  /* removed bottom gap */
    }

    /* 2. REMOVE GAP BETWEEN SECTIONS */
    .course-info-section {
        margin-bottom: 18px !important;
    }

    .course-content-panel {
        margin-top: 8px !important;
    }

    /* Extra tight control when stacked */
    .course-info-section + .course-content-panel {
        margin-top: 5px !important;
    }

    /* 3. Heading Style */
    .course-info-header h1, 
    .course-guidance-title, 
    #what-is-eng-title { 
        border-top: none !important;
        border-bottom: 2px solid #FF9800 !important;
        display: inline-block !important;
        padding-bottom: 2px !important;
        margin-bottom: 0 !important;
        font-size: 1.5rem !important;
        text-align: center !important;
        width: auto !important;
    }

    /* 4. Wrapper Adjustment */
    .course-info-header {
        margin-bottom: 4px !important;  /* tighter than before */
        text-align: center !important;
    }

    /* 5. Typography */
    .course-content-panel p, 
    .course-info-section p, 
    .course-guidance-subtitle,
    .course-pathway-sub-list li {
        font-size: 14px !important;
        line-height: 1.5 !important;
        text-align: justify !important;
        color: #444 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        margin-bottom: 10px !important;
    }

    /* 6. Bullet Points Alignment */
    .course-pathway-list,
    .course-pathway-sub-list {
        padding-left: 16px !important;
        text-align: justify !important;
        margin-top: 2px !important;
        margin-bottom: 6px !important;
    }

    .course-pathway-sub-list li {
        margin-bottom: 6px !important;
        display: list-item !important;
    }

    /* 7. REMOVE HIDDEN EXTRA SPACE (important fix) */
    section {
        margin-bottom: 0 !important;
    }

    p:last-child {
        margin-bottom: 0 !important;
    }

}


/* --- Optimized Mobile View: Courses & Branches Guidance (2-per-row) --- */
@media (max-width: 768px) {

    /* 1. Container: Tighten top gap and enforce vertical grid */
    .course-guidance-section {
        padding-top: 10px !important;    /* Tightens gap from section above */
        padding-bottom: 20px !important;
        margin-top: 0 !important;
    }

    .course-guidance-header {
        margin-bottom: 15px !important;  /* Closes gap between text and cards */
        text-align: center !important;
    }

    .course-guidance-title {
        font-size: 1.4rem !important;
        margin-top: 0 !important;
        margin-bottom: 5px !important;   /* Pulls subtitle closer to title */
    }

    .course-guidance-subtitle {
        font-size: 14px !important;
        margin: 0 !important;
        line-height: 1.4 !important;
    }

    /* 2. Grid: Force 2-columns with Offset Spacing */
    .course-branch-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; 
        grid-auto-flow: row !important;
        gap: 10px !important; /* Slightly tighter gap to allow for right-side space */
        
        /* ADJUSTED PADDING: Less on left (8px), More on right (25px) */
        padding: 0 8px 0 25px !important; 
        
        margin-top: 12px !important;
        overflow-x: hidden !important; 
        height: auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 3. Card Design: Balanced for readability */
    .course-branch-card {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;

        padding: 15px 10px !important;
        border-radius: 12px !important;
        gap: 8px !important;
        min-height: 130px !important; /* Tall enough for content visibility */
        background: #1E3A5F !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    /* 4. Icon Box: Compact and clean */
    .course-branch-icon-box {
        width: 40px !important;
        height: 40px !important;
        border-radius: 10px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        margin-bottom: 5px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .course-branch-icon-box svg {
        width: 20px !important;
        height: 20px !important;
        stroke: #FFF9A8 !important;
    }

    /* 5. Text Styling */
    .course-branch-name {
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        color: #FFF9A8 !important;
        margin: 0 !important;
    }

    .course-branch-tag {
        font-size: 0.7rem !important;
        opacity: 0.9 !important;
        color: #FFFFFF !important;
        margin-top: 2px !important;
    }

    /* 6. Centering the final card if odd */
    .course-branch-card:last-child:nth-child(odd) {
        grid-column: 1 / span 2 !important;
        width: calc(50% - 6px) !important; /* Matches size of other cards */
        margin: 0 auto !important;
    }
}