/* style.css - FINAL MASTER (Platinum Corporate) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700&display=swap');

:root {
    /* Corporate Color Palette */
    --corporate-navy: #003366; /* Deep Professional Blue (Hero & Primary) */
    --corporate-accent: #00AEEF; /* Bright Cyan (Highlights) */
    --text-dark: #333333;
    
    /* Legacy/Category Colors */
    --tech-cyan: #008cb3;
    --abroad-purple: #6f42c1;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    color: var(--text-dark);

    /* --- BACKGROUND: Corporate Platinum Gradient --- */
    /* Flows from crisp white to a premium silver-blue mesh */
    background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed; /* Keeps background still while scrolling */
    min-height: 100vh;
}

/* --- Hero Section (The Big Banner) --- */
.hero-section {
    /* DEEP NAVY GRADIENT - "Mesiniaga" Style */
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    background-size: cover;
    background-position: center;
    color: white;
    padding: 120px 0;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* --- Navigation --- */
.navbar {
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.navbar-custom {
    /* Glassmorphism Effect */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.3);
}
.brand-text {
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--corporate-navy);
}
.nav-link {
    font-weight: 600;
    color: #444;
    transition: color 0.3s;
}
.nav-link:hover {
    color: var(--corporate-navy) !important;
}

/* --- Buttons --- */
.btn-primary, .btn-brand {
    background-color: var(--corporate-navy);
    border-color: var(--corporate-navy);
    box-shadow: 0 4px 6px rgba(0, 51, 102, 0.2);
    transition: all 0.3s ease;
    border-radius: 6px; /* Professional rounded corners */
}
.btn-primary:hover, .btn-brand:hover {
    background-color: #002244;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 51, 102, 0.3);
}

/* --- Cards (Clean White Pop) --- */
.card-custom, .feature-card, .why-card {
    background: #f0fdf4;
    border: none;
    border-radius: 12px;
    /* Soft shadow to lift white card off silver background */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-custom:hover, .feature-card:hover, .why-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}
.card-icon-circle {
    width: 80px;
    height: 80px;
    background: #f0f4f8; /* Light grey circle */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--corporate-navy);
}

/* --- Utilities & Typography --- */
.page-content {
    background: transparent !important; /* Shows body gradient */
}
.section-header {
    max-width: 800px;
    margin: auto;
}
.section-eyebrow {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--corporate-accent);
    margin-bottom: 6px;
    font-weight: 700;
}
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--corporate-navy);
}
.object-fit-cover {
    object-fit: cover;
}

/* --- Category Specific Colors --- */
/* Academic (Navy) */
.text-academic { color: var(--corporate-navy) !important; }
.border-academic { border-color: var(--corporate-navy) !important; }
.bg-academic { background-color: var(--corporate-navy) !important; color: white; }

/* Technical (Cyan/Teal) */
.text-tech { color: var(--tech-cyan) !important; } 
.border-technical { border-color: var(--corporate-accent) !important; }
.bg-tech { background-color: var(--corporate-accent) !important; color: white; }

/* Abroad (Purple - kept for compatibility) */
.text-abroad { color: var(--abroad-purple) !important; }
.border-abroad { border-color: var(--abroad-purple) !important; }
.btn-outline-abroad {
    border-color: var(--abroad-purple);
    color: var(--abroad-purple);
}
.btn-outline-abroad:hover {
    background-color: var(--abroad-purple);
    color: #fff;
}

/* --- LOGO FIX (Bigger Logo on Right) --- */
.gps-logo {
    width: 100%;
    max-width: 450px; /* Limits size to 450px on desktop */
    transition: transform 0.3s ease-in-out;
}
.gps-logo:hover {
    transform: scale(1.05);
}

/* --- WhatsApp Float --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: transform 0.3s;
}
.whatsapp-float:hover {
    transform: scale(1.1);
}

/* --- Footer --- */
footer.bg-dark {
    background-color: #111 !important; /* Deep black-grey */
    border-top: 3px solid var(--corporate-accent);
}

/* --- Restored Moving Ticker --- */
.pulse-ticker {
    background: #002244; /* Deep Navy to match your new theme */
    color: #FFD700;      /* Gold text so it stands out */
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    white-space: nowrap;
    padding: 12px 0;
    border-bottom: 3px solid var(--corporate-accent); /* Cyan line for style */
    position: relative;
    z-index: 10;
}

.ticker-content {
    display: inline-block;
    padding-left: 100%;
    /* The animation part: */
    animation: ticker 25s linear infinite; 
}

/* The movement logic */
@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* --- NEW: Page Headers (for About, Services, Events) --- */
.page-header {
    /* Deep Navy Gradient to match the Hero */
    background: linear-gradient(135deg, #003366 0%, #001a33 100%); 
    color: white;
    padding: 100px 0 80px; /* More spacing for grandeur */
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 0; /* Remove gap */
}

/* Add a subtle pattern overlay if you want it to look fancier */
.page-header::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('https://www.transparenttextures.com/patterns/cubes.png'); /* Subtle texture */
    opacity: 0.1;
    pointer-events: none;
}

.page-header h1 {
    font-size: 3rem; /* Bigger title */
    font-weight: 700;
    letter-spacing: -1px;
}

.page-header .lead {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* Enhancing the "About Us" Content Section */
.content-box {
    background: #f0fdf4;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.belief-badge {
    background: #e8f4f8; /* Very light blue instead of green */
    border-left: 5px solid #003366;
    color: #333;
    padding: 20px;
    border-radius: 4px;
}

/* --- Course Card Animations --- */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important;
}

/* =========================================
   NEW COURSE CARD THEMES (Colorful Sections)
   ========================================= */

/* 1. ACADEMIC THEME (Blue) */
.theme-academic .card {
    background-color: #f0f8ff; /* Alice Blue */
    border: 1px solid #cce5ff;
}
.theme-academic .card-title {
    color: #003366; /* Deep Navy */
}
.theme-academic .card-text {
    color: #405d80; /* Blue-Grey */
}
.theme-academic .btn-theme {
    color: #003366;
    border: 1px solid #003366;
    background: transparent;
}
.theme-academic .btn-theme:hover {
    background-color: #003366;
    color: #fff;
}

/* 2. TECHNICAL THEME (Green) */
.theme-technical .card {
    background-color: #f0fdf4; /* Mint */
    border: 1px solid #d1fae5;
}
.theme-technical .card-title {
    color: #065f46; /* Deep Teal */
}
.theme-technical .card-text {
    color: #4b6b5d; /* Green-Grey */
}
.theme-technical .btn-theme {
    color: #065f46;
    border: 1px solid #065f46;
    background: transparent;
}
.theme-technical .btn-theme:hover {
    background-color: #065f46;
    color: #fff;
}

/* 3. INTERNATIONAL THEME (Purple) */
.theme-abroad .card {
    background-color: #faf5ff; /* Lavender */
    border: 1px solid #e9d5ff;
}
.theme-abroad .card-title {
    color: #6b21a8; /* Deep Purple */
}
.theme-abroad .card-text {
    color: #7e6c8f; /* Purple-Grey */
}
.theme-abroad .btn-theme {
    color: #6b21a8;
    border: 1px solid #6b21a8;
    background: transparent;
}
.theme-abroad .btn-theme:hover {
    background-color: #6b21a8;
    color: #fff;
}

/* --- New Services Page Designs --- */

/* Fancy Image Frames with Offset Borders */
.img-frame-tech {
    border-radius: 20px;
    border: 5px solid #fff;
    box-shadow: 10px 10px 0px rgba(40, 167, 69, 0.2); /* Green Shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.img-frame-tech:hover {
    transform: translateY(-5px);
    box-shadow: 15px 15px 0px rgba(40, 167, 69, 0.4);
}

.img-frame-academic {
    border-radius: 20px;
    border: 5px solid #fff;
    box-shadow: -10px 10px 0px rgba(0, 86, 179, 0.2); /* Blue Shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.img-frame-academic:hover {
    transform: translateY(-5px);
    box-shadow: -15px 15px 0px rgba(0, 86, 179, 0.4);
}

/* International Cards with Images */
.card-abroad {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}
.card-abroad:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}
.card-abroad-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    border-bottom: 4px solid #FFD700; /* Gold Accent */
}

/* List Styling */
.custom-list li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}
.custom-list li::before {
    content: "•";
    color: var(--corporate-accent);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* --- Course Page Image Styling --- */

.course-card-img {
    height: 220px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Hover Effect: Zoom image slightly */
.hover-lift:hover .course-card-img {
    transform: scale(1.05);
}

/* Color-Coded Borders for Images */
.theme-academic .course-card-img {
    border-bottom: 5px solid #003366; /* Navy Border for Academic */
}

.theme-technical .course-card-img {
    border-bottom: 5px solid #28a745; /* Green Border for TVET */
}

.theme-abroad .course-card-img {
    border-bottom: 5px solid #6f42c1; /* Purple Border for International */
}

/* --- Header Logo Fix --- */
.navbar {
    /* Reduce vertical spacing so the header doesn't get too tall */
    padding-top: 0.5rem !important; 
    padding-bottom: 0.5rem !important;
}

.navbar-brand img {
    /* Ensure logo stays crisp and respects the height set in HTML */
    max-height: 65px; 
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05); /* Subtle zoom on hover */
}

/* --- Performance Fixes --- */
img {
    content-visibility: auto; /* Helps browser skip rendering off-screen images */
    max-width: 100%;
    height: auto;
}

.course-card-img, .card-abroad-img, .img-frame-tech, .img-frame-academic {
    /* Prevent layout shifts while loading */
    background-color: #eee; 
    display: block;
}

/* --- Slim Header with Big Logo --- */
.navbar {
    padding-top: 0px !important;    /* Removes top space */
    padding-bottom: 0px !important; /* Removes bottom space */
    min-height: 80px;               /* Just enough for the 75px logo */
}

.navbar-brand {
    padding-top: 5px;
    padding-bottom: 5px;
}

.navbar-brand img {
    max-height: 75px;  /* Ensures strict size control */
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05); /* Slight zoom on hover */
}

/* --- Custom Icon Image Styling --- */
.icon-wrap img {
    width: 60%;       /* Adjust icon size inside the circle */
    height: 60%;
    object-fit: contain;
}

/* Ensure the wrapper is a circle */
.icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px; /* Center it */
}

/* --- Founder Content Text Frame --- */
.founder-content-frame {
    background-color: #f0fdf4;
    /* The Navy Blue Border you requested */
    border: 3px solid #003366; 
    /* Rounded corners to match the theme */
    border-radius: 20px; 
    /* Space inside the frame so text breathes */
    padding: 40px; 
    /* Subtle shadow for depth */
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    height: 100%;
    position: relative;
}

/* Optional: Mobile adjustment to reduce padding on small screens */
@media (max-width: 768px) {
    .founder-content-frame {
        padding: 25px;
    }
}

/* --- Premium Founder Frame (Navy Style) --- */
.founder-frame {
    /* 1. Thick White Matte Border */
    border: 12px solid #ffffff;
    
    /* 2. Professional Rounded Corners */
    border-radius: 15px;
    
    /* 3. The "Frame" Effect: Solid Dark Blue Block Shadow */
    /* This creates the illusion of a heavy navy frame behind the photo */
    box-shadow: 15px 15px 0px #003366; 
    
    /* 4. Sizing & Fit */
    width: 100%;
    height: 500px; /* Fixed height for a perfect portrait ratio */
    object-fit: cover; /* Prevents stretching */
    
    /* 5. Smooth Animation */
    transition: all 0.3s ease;
}

/* Hover Effect */
.founder-frame:hover {
    /* Image lifts up slightly */
    transform: translate(-5px, -5px);
    
    /* Shadow grows to keep the frame grounded */
    box-shadow: 20px 20px 0px #003366; 
}

/* 3. Founder Portrait Frame */
.founder-frame {
    border: 10px solid #fff;
    border-radius: 20px;
    box-shadow: 20px 20px 0px rgba(0, 51, 102, 0.15);
    transition: all 0.3s ease;
    object-fit: cover;
    height: 500px;
    width: 100%;
}
.founder-frame:hover {
    transform: translateY(-10px);
    box-shadow: 25px 25px 0px rgba(0, 51, 102, 0.25);
}

/* 4. Certificate Frames (UPDATED) */
.cert-wrapper {
    flex: 0 1 200px; max-width: 220px; margin: 10px;
}
.cert-frame {
    /* Glassmorphism effect */
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-radius: 8px; transition: all 0.3s ease;
}
.cert-frame img {
    display: block; width: 100%; height: auto;
    border: 1px solid #f0f0f0;
}
.cert-frame:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 51, 102, 0.15);
    border-color: var(--corporate-navy);
}

/* NEW: Glass Section Background */
.section-glass {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* --- Partner/Collaboration Section Styles --- */
.partner-wrapper {
    flex: 0 1 280px; /* Slightly wider than certs for horizontal logos */
    max-width: 300px;
    margin: 15px;
}

.partner-frame {
    /* Mild Green Background to match your new theme */
    background-color: #f0fdf4; 
    padding: 25px;
    /* Soft border */
    border: 1px solid #e0e6ed;
    /* Soft shadow */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    
    /* Center the logo perfectly */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px; /* Fixed height for uniformity */
}

.partner-frame img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Ensures logos don't get stretched */
    /* Removed inner border for logos so transparent PNGs look clean */
}

/* Hover Animation (Like Certs) */
.partner-frame:hover {
    transform: translateY(-8px); /* Lifts up */
    box-shadow: 0 15px 30px rgba(0, 51, 102, 0.15);
    border: 2px solid #003366; /* Navy border appears on hover */
}

/* =====================================
   SERVICES & EVENTS – Mild Green Cards
   ===================================== */

/* Apply only inside Services & Events pages */
.services-page .card,
.services-page .card-custom,
.services-page .feature-card,
.events-page .card,
.events-page .card-custom,
.events-page .feature-card {
    background-color: #f0fdf4 !important; /* Mild green */
    border-radius: 14px;
    padding: 32px; /* More breathing space */
}

/* Improve vertical spacing between cards */
.services-page .row > [class*="col"],
.events-page .row > [class*="col"] {
    margin-bottom: 24px;
}

/* ===== PREMIUM EVENT CARD ===== */

.events-page .card{
    max-width: 900px;        /* controls whole card size */
    margin: 0 auto;          /* center it */
    border-radius: 20px;
    overflow: hidden;
    background:#eef3f1;
    transition: 0.3s;
}

.events-page .card:hover{
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

/* IMAGE SIZE */
.events-page .card img{
    height: 200px;          /* SMALLER */
    width: 100%;
    object-fit: cover;

    border-radius: 14px;
    margin: 12px;
}

/* Fix column spacing */
.events-page .col-md-4{
    display:flex;
    align-items:center;
}

/* Reduce text padding */
.events-page .card-body{
    padding: 20px 10px 20px 10px;
}

/* Make card softer */
.events-page .card{
    border-radius: 18px;
    background:#eef3f1; /* soft modern grey */
}

/* Mobile fix */
@media (max-width:768px){
    .events-page .card img{
        height:200px;
    }
}

.hover-lift {
    transition: 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.card {
    border-radius: 18px;
}

.card img {
    height: 260px;
}

@media (max-width:768px){
    .card img{
        height:200px;
    }
}

.perak-roadshow-section {
    background: #eef4ef;
    padding: 60px 0 80px;
}

.perak-roadshow-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
}

.perak-roadshow-subtitle {
    text-align: center;
    color: #64748b;
    max-width: 760px;
    margin: 0 auto 40px;
    line-height: 1.7;
    font-size: 1rem;
}

.perak-event-card {
    background: #f4faf4;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.05);
    height: 100%;
}

.perak-event-card .row {
    min-height: 100%;
}

.perak-event-image-wrap {
    padding: 26px 20px 26px 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.perak-event-image {
    width: 100%;
    max-width: 360px;
    border-radius: 14px;
    display: block;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
}

.perak-event-body {
    padding: 30px 30px 30px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.perak-badge {
    display: inline-block;
    background: #16a34a;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
    box-shadow: 0 6px 14px rgba(22, 163, 74, 0.2);
}

.perak-event-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 16px;
}

.perak-event-meta {
    margin-bottom: 16px;
}

.perak-event-meta p {
    margin-bottom: 8px;
    color: #334155;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.perak-event-description {
    color: #1e293b;
    font-size: 1.02rem;
    line-height: 1.7;
    margin-bottom: 24px;
    max-width: 95%;
}

.perak-event-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #159447;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    padding: 13px 28px;
    font-weight: 700;
    font-size: 1rem;
    transition: 0.3s ease;
    width: fit-content;
    min-width: 210px;
}

.perak-event-btn:hover {
    background: #11783a;
    color: #fff;
    transform: translateY(-2px);
}

.perak-event-btn:focus {
    color: #fff;
}

.perak-event-spacing {
    margin-bottom: 28px;
}

@media (max-width: 991px) {
    .perak-event-title {
        font-size: 1.7rem;
    }

    .perak-event-image-wrap {
        padding: 22px 22px 10px 22px;
    }

    .perak-event-body {
        padding: 10px 22px 24px 22px;
    }
}

@media (max-width: 767px) {
    .perak-roadshow-section {
        padding: 45px 0 60px;
    }

    .perak-roadshow-title {
        font-size: 1.7rem;
    }

    .perak-roadshow-subtitle {
        font-size: 0.95rem;
        margin-bottom: 26px;
        padding: 0 10px;
    }

    .perak-event-title {
        font-size: 1.45rem;
    }

    .perak-event-meta p,
    .perak-event-description {
        font-size: 0.95rem;
    }

    .perak-event-btn {
        width: 100%;
        min-width: unset;
    }

    .perak-event-image {
        max-width: 100%;
    }
}