/*
========================================
COURSE DETAILS PAGE STYLES (V5 - ENGAGING & ANIMATED)
========================================
*/

/* --- Basic Setup & Master Container --- */
body {
    background-color: #0f172a;
    color: #a8b2d1;
    /* Smoother font rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- NEW: Page Entrance Animation --- */
body.loading::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0f172a;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}
body.loaded::before {
    opacity: 0;
    pointer-events: none; /* Allows clicks to pass through */
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Hero Section with Orchestrated Animations --- */
.course-hero-section { height: 55vh; min-height: 400px; position: relative; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; color: #fff; }
#hero-video-course { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 100%; min-height: 100%; width: auto; height: auto; z-index: 0; object-fit: cover; }
.course-hero-section .hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(15, 23, 42, 1) 0%, rgba(15, 23, 42, 0.5) 100%); z-index: 1; }
.hero-content { position: relative; z-index: 2; }

/* NEW: Keyframes for hero text animation */
@keyframes slideInUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.hero-category { animation: slideInUp 0.6s ease-out 0.5s backwards; }
.course-hero-section h1 { animation: slideInUp 0.6s ease-out 0.7s backwards; }
.hero-description { animation: slideInUp 0.6s ease-out 0.9s backwards; }

.hero-category, .course-hero-section h1, .hero-description { color: #fff; } /* Ensure high contrast */
.hero-category { font-weight: 600; margin-bottom: 0.5rem; letter-spacing: 1px; text-transform: uppercase; color: #38bdf8; }
.course-hero-section h1 { font-size: 2.8rem; font-weight: 700; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); margin-bottom: 1rem; }
.hero-description { max-width: 700px; margin: 0 auto; font-size: 1.1rem; }

/* --- Highlights Bar --- */
.key-highlights-bar { background-color: #112240; border-top: 1px solid #233554; border-bottom: 1px solid #233554; padding: 1rem 0; position: relative; z-index: 5; }
.highlight-container { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 1.5rem; max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.highlight-item { display: flex; align-items: center; gap: 0.8rem; }
.highlight-item i { font-size: 1.5rem; color: #38bdf8; transition: transform 0.3s ease; }
.highlight-item:hover i { transform: scale(1.2) rotate(-10deg); } /* NEW: Icon hover effect */
.highlight-item div { display: flex; flex-direction: column; }
.highlight-item strong { color: #ccd6f6; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
.highlight-item span { font-size: 0.9rem; }

/* ======================================= */
/* Key Highlights Bar - Responsive Fix     */
/* ======================================= */

@media (max-width: 768px) {
  .highlight-container {
    /* Switch from flexbox to a predictable 2x2 grid */
    display: grid;
    grid-template-columns: 1fr 1fr; /* This creates two equal-width columns */
    
    /* The 'gap' property will handle spacing, so we don't need 'justify-content' */
    
    /* Adjust padding for a better fit on mobile */
    padding: 0 1.5rem;

    /* You can adjust the row gap if you want more vertical space */
    row-gap: 2rem;
  }

  .highlight-item {
    /* Ensure items don't have extra space around them and align left */
    justify-self: start; 
  }

  .highlight-item div {
    /* Align text to the left for a cleaner look in the grid */
    text-align: left;
  }
}

/* --- Section Styling & Titles --- */
.course-content-section { padding-top: 4rem; }
.section-title-small { font-size: 1.9rem; color: #ccd6f6; margin-bottom: 2rem; position: relative; display: inline-block; padding-bottom: 8px; }
.section-title-small::after { content: ''; position: absolute; bottom: 0; left: 0; width: 70%; height: 3px; background: linear-gradient(90deg, #38bdf8, #4ade80); transform: scaleX(0); transform-origin: left; transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1); }
/* NEW: Trigger underline animation on scroll */
[data-aos="fade-up"].aos-animate .section-title-small::after { transform: scaleX(1); }

/* --- Enhanced Lists & Grids --- */
.learning-list { list-style: none; padding-left: 0; }
.learning-list li { padding: 0.5rem 0 0.5rem 2rem; position: relative; margin-bottom: 0.5rem; transition: transform 0.2s ease-out, color 0.2s ease-out; }
.learning-list li:hover { transform: translateX(8px); color: #fff; }
.learning-list li::before { content: '\f058'; font-family: 'Font Awesome 5 Free'; font-weight: 900; position: absolute; left: 0; top: 10px; color: #4ade80; font-size: 1.1rem; }

/*
============================================================
--- TOOLS & TECHNOLOGIES (FINAL 2-COLUMN LAYOUT) ---
============================================================
*/

/* 1. The Main Section Wrapper */
#tools-and-tech {
    position: relative;
    background-color: #0a192f; /* The darkest background */
    overflow: hidden;
    padding: 4rem 1rem; /* Padding for the whole section */
}

/* Constellation background effect - No change */
#tools-and-tech::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><defs><pattern id="p" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="2" fill="%23112240"></circle><path d="M0 50h15m70 0h15M50 0v15m0 70v15" stroke-width="1" stroke="%23112240"></path></pattern></defs><rect width="100%" height="100%" fill="url(%23p)"></rect></svg>');
    opacity: 0.5;
    z-index: 0;
}

/* 2. NEW: The Main Padded Content Box */
.tools-container {
    position: relative;
    z-index: 1;
    max-width: 900px; /* Sets the maximum width of the box */
    margin: 3rem auto 0; /* Centers the box and adds space from title */
    background-color: #112240; /* The navy background for the box */
    padding: 3rem; /* Generous padding inside the box */
    border-radius: 12px;
    border: 1px solid #233554; /* Subtle border to define the edge */
}

/* 3. The Main Grid Layout (Modified) */
.tools-logo-grid {
    display: grid;
    /* This creates the explicit 2-column layout */
    grid-template-columns: 1fr 1fr;
    gap: 2rem 3rem; /* 2rem vertical gap, 3rem horizontal gap */
}

/* 4. Individual Item and Hover (No change needed) */
.tool-item {
    display: flex;
    align-items: center;
    gap: 1.7rem;
    cursor: default;
}

.tool-item:hover .tool-logo {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.5);
}

.tool-item:hover span {
    color: #38bdf8;
}

/* 5. Logo & Text Styling (No change needed) */
.tool-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: contain;
    background-color: #ffffff;
    padding: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-item span {
    color: #ccd6f6;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
}

/* 6. Responsive Stacking for Mobile */
@media (max-width: 768px) {
    .tools-container {
        padding: 2.5rem 1.5rem; /* Reduce padding on mobile */
    }
    
    .tools-logo-grid {
        /* Stack to a single column for better readability */
        grid-template-columns: 1fr;
        gap: 2.5rem; /* Single gap value for single column */
    }
}

/* --- Key Specializations Section with Hover --- */
.specializations-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.specialization-item { background-color: rgba(17, 34, 64, 0.5); border-left: 4px solid #38bdf8; border-radius: 8px; padding: 1.5rem; display: flex; gap: 1.5rem; align-items: flex-start; transition: all 0.3s ease; }
.specialization-item:hover { transform: translateX(10px); border-left-color: #4ade80; background-color: #1e293b; }
.specialization-icon { font-size: 1.8rem; color: #38bdf8; padding-top: 5px; transition: transform 0.3s ease; }
.specialization-item:hover .specialization-icon { transform: rotate(-15deg) scale(1.1); } /* NEW: Icon animation */
.specialization-details h4 { margin: 0 0 0.25rem 0; color: #ccd6f6; font-size: 1.1rem; }
.specialization-details p { margin: 0; font-size: 0.9rem; color: #a8b2d1; line-height: 1.5; }

/* --- Polished Accordion --- */
#curriculum-accordion { max-width: 900px; margin: 0 auto; }
.accordion-item { border: 1px solid #233554; border-radius: 8px; margin-bottom: 0.5rem; overflow: hidden; transition: background-color 0.3s ease; }
.accordion-item:hover { background-color: #1e293b; }
.accordion-header { background-color: #112240; padding: 1rem 1.5rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.accordion-header h3 { font-size: 1.1rem; margin: 0; color: #ccd6f6; }
.accordion-icon { font-size: 1rem; transition: transform 0.3s ease-out, color 0.3s ease-out; }
.accordion-content { background-color: #0f172a; max-height: 0; overflow: hidden; transition: max-height 0.5s ease-out, padding 0.5s ease-out; padding: 0 1.5rem; }
.accordion-item.open .accordion-header { background-color: #1e293b; }
.accordion-item.open .accordion-icon { 
    transform: rotate(45deg); /* MODIFIED: Changed from 180deg to 45deg for the plus icon */
    color: #38bdf8;
}
.accordion-item.open .accordion-content { max-height: 600px; padding: 1rem 1.5rem; }
.accordion-content ul li::before {
    content: none !important;
}

/* --- Career & Instructor Cards with Hover Effects --- */
.job-role-item { background-color: #112240; padding: 1rem 1.25rem; border-radius: 8px; border-left: 4px solid #38bdf8; color: #ccd6f6; font-weight: 500; transition: all 0.3s ease; }
.job-role-item:hover { transform: translateX(5px) scale(1.03); background-color: #1e293b; border-left-color: #4ade80; }
.instructor-profile-card { background-color: #112240; border: 1px solid #233554; border-radius: 12px; padding: 2rem; display: flex; align-items: center; gap: 2rem; transition: all 0.3s ease; }
.instructor-profile-card:hover { border-color: #38bdf8; transform: scale(1.02); box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.instructor-image { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid #233554; flex-shrink: 0; transition: transform 0.4s ease; }
.instructor-profile-card:hover .instructor-image { transform: scale(1.05); }

/* --- ENROLLMENT CARD (at the bottom) --- */
.enrollment-card-section { padding-top: 4rem; padding-bottom: 4rem; }
.sidebar-card { background-color: #112240; border: 1px solid #233554; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.sidebar-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px -15px rgba(2, 12, 27, 0.9); }
#sidebar-video { width: 100%; height: 200px; object-fit: cover; }
.sidebar-content { padding: 1.5rem; }

/* NEW: Engaging Button Styles */
.sidebar-content .btn-primary { 
    background: linear-gradient(90deg, #38bdf8, #4ade80);
    background-size: 200% 100%;
    transition: background-position 0.5s ease;
}
.sidebar-content .btn-primary:hover {
    background-position: 100% 0;
}
.sidebar-content .btn-secondary { transition: background-color 0.3s ease, color 0.3s ease; }
.sidebar-content .btn-secondary:hover { background-color: #334155; color: #fff; }

.sidebar-details { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid #233554; }
.features-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    transition: color 0.2s ease; /* ADDED */
}
.features-list li:hover {
    color: #fff; /* ADDED */
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    /* ... existing responsive styles ... */
    .instructor-profile-card { flex-direction: column; text-align: center; gap: 1.5rem; }
}
/*
========================================
--- NEW: EXCITING Specialization Cards (V2) ---
========================================
*/
.ml-specializations-cards-section {
    padding-top: 4rem;
    text-align: center;
}

.section-title-alt {
    font-size: 2.2rem;
    color: #ccd6f6;
    margin-bottom: 2.5rem;
    font-weight: 700;
}

.specialization-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    text-align: left;
}

.specialization-card {
    /* Enable positioning for the pseudo-element */
    position: relative; 
    background: linear-gradient(145deg, #112240, #172a45);
    border-radius: 12px;
    border: 1px solid #233554;
    overflow: hidden; /* Important for the spotlight effect */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* Smoother, custom transition */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                border-color 0.4s ease;
}

/* The Spotlight Pseudo-Element */
.specialization-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* The radial gradient that follows the mouse */
    background: radial-gradient(
        circle at var(--x) var(--y), 
        rgba(56, 189, 248, 0.15), /* Brighter center */
        transparent 25% /* Fade out quickly */
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none; /* Allows clicks to pass through */
}

.specialization-card:hover {
    transform: translateY(-12px) scale(1.02); /* More pronounced lift */
    /* The Neon Glow Effect */
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4), 
                0 0 35px rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.8);
}

/* Make the spotlight visible on hover */
.specialization-card:hover::after {
    opacity: 1;
}

.specialization-card-icon-area {
    background: linear-gradient(145deg, #233554, #1e293b);
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* Keep it above the spotlight */
    z-index: 2;
}

.specialization-card-icon-area i {
    font-size: 2.5rem;
    color: #38bdf8;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.specialization-card:hover .specialization-card-icon-area i {
    transform: scale(1.2) rotate(-15deg);
}

.specialization-card-content {
    padding: 1.5rem;
    position: relative; /* Keep it above the spotlight */
    z-index: 2;
}

.specialization-card-category {
    display: inline-block;
    background-color: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.specialization-card-title {
    font-size: 1.3rem;
    color: #ccd6f6;
    margin: 0 0 0.5rem 0;
    transition: color 0.3s ease;
}

.specialization-card:hover .specialization-card-title {
    color: #fff; /* Make title brighter on hover */
}

.specialization-card-description {
    font-size: 0.95rem;
    color: #a8b2d1;
    line-height: 1.6;
    margin: 0;
}