/* assets/css/style.css */

/* Import Space Grotesk (Square BT alternative) + fallbacks */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Chakra+Petch:wght@400;700&family=Rubik:wght@400;500;700&display=swap');

/* Global */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body { /*Original: #471224, #993366*/

    font-family: 'Space Grotesk', 'Chakra Petch', 'Rubik', sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #24243e 100%);
    min-height: 100vh;
    margin: 0;
    color: #fff;
    overflow-x: hidden;
}

.profile-dropdown{
    background: linear-gradient(180deg, /*#993366*/ #0f0c29 0%, /*#641932*/#24243e 100%);
}

/* Featured Customization */
.btn-danger{
    background: red !important;
}

/* Glassmorphism Base */
.glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.glass:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.25);
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    border-radius: 0px;
}

/* Hero */
.hero {
    position: relative;
    padding: 150px 0;
    text-align: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('https://www.madrostds.com//uploads/6ab4e0c79974f_69c026ea0ece2_17741956325933.jpg') center/cover no-repeat;
    opacity: 0.3;
    border-radius: 0;
}

/* Cohort Cards */
.cohort-card {
    height: 100%;
    overflow: hidden;
}

.countdown {
    font-size: 1.1rem;
    font-weight: 600;
    color: #a0e7ff;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
footer a {
    text-decoration: underline;
}

/* Responsive left margin for admin main content */
/* Mobile & Tablet (below 992px): no margin */
/* Desktop (992px and above): 280px margin for fixed sidebar */
.ms-admin-sidebar {
    margin-left: 0;
}

/* Large screens and up (desktops, large tablets in landscape) */
@media (min-width: 992px) {
    .ms-admin-sidebar {
        margin-left: 280px !important;
    }
}

/* Optional: Extra breathing room on very large screens */
@media (min-width: 1200px) {
    .ms-admin-sidebar {
        margin-left: 300px !important; /* Slightly more space if desired */
    }
}

/* =========================
   MOBILE OVERFLOW FIXES
   ========================= */
@media (max-width: 575px) {

    html, body {
        width: 100%;
        overflow-x: hidden;
    }

    .glass {
        transform: none !important;
        max-width: 100%;
    }

    .glass:hover {
        transform: none !important;
    }

    table {
        width: 100% !important;
        table-layout: fixed;
        word-wrap: break-word;
    }

    th, td {
        white-space: normal !important;
    }

    .tw-100{
    	min-width: 100px;
    }

    .tw-200{
        min-width: 200px;
    }

    .tw-long{
        min-width: 350px;
    }

    canvas {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Prevent hidden fixed sidebar from causing overflow on mobile */
@media (max-width: 991px) {
    .d-none.d-lg-block {
        display: none !important;
    }
}
/* ==================================================
   MOBILE & TABLET RESPONSIVENESS (FINAL, CANONICAL)
   Applies to phones AND tablets (portrait + landscape)
   ================================================== */

/* ---------- GLOBAL WIDTH & OVERFLOW CONTROL ---------- */
@media (max-width: 991px) {

    html, body {
        width: 100%;
        overflow-x: hidden;
    }
	
	/* Sections */
	/* FIX: Force sections to contain animated elements */
    section {
        overflow: hidden !important;
        position: relative !important;
    }

    /* FIX: Reduce or kill the vertical translation push that spawns the temporary scrollbars */
    .fade-in, 
    [data-aos^="fade"] {
        transform: translateY(0px) !important; /* Minimal push on mobile */
        transition-duration: 400ms !important;   /* Snappier load to prevent lag */
    }
    
    .fade-in.visible,
    .aos-animate {
        transform: translateY(0) !important;
    }

    /* Containers */
    .container,
    .container-fluid {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Main content wrapper */
    .ms-admin-sidebar {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Glass cards */
    .glass {
        max-width: 100%;
        transform: none !important;
    }

    .glass:hover {
        transform: none !important;
    }

    /* Charts */
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Long text safety 
    p, span, small, a {
        word-break: break-word;
        overflow-wrap: anywhere;
    }*/

    /* Buttons & badges */
    .btn,
    .badge {
        max-width: 100%;
        white-space: normal;
    }

    /* Progress bars */
    .progress {
        max-width: 100%;
        overflow: hidden;
    }

    .progress-bar {
        white-space: nowrap;
    }
}

/* ---------- SIDEBAR SAFETY (NON-DESKTOP) ---------- */
@media (max-width: 991px) {

    /* Ensure fixed desktop sidebar never contributes to width */
    .d-none.d-lg-block {
        display: none !important;
    }
}

/* ---------- TABLE SCROLL (PHONES + TABLETS) ---------- */
@media (max-width: 991px) {

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        table-layout: auto !important;
        width: auto !important;
        min-width: 100%;
    }

    th, td {
        white-space: nowrap;
    }
}

/* ================================
   MOBILE DROPDOWN OVERFLOW FIX
   ================================ */
@media (max-width: 991px) {

    /* Remove glass effects from dropdowns on mobile */
    .dropdown-menu.glass {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(255, 255, 255, 0.3) !important;
        box-shadow: 0 10px 25px rgba(0,0,0,0.35) !important;
        transform: none !important;
    }

    /* Ensure dropdown is viewport-bound */
    .dropdown-menu {
        position: fixed !important;
        right: 10px !important;
        left: auto !important;
        max-width: calc(100vw - 20px) !important;
    }
}

/* ================================
   NAVBAR DROPDOWN ESCAPE FIX
   ================================ */

/* Allow dropdowns to escape navbar */
.navbar {
    overflow-y: visible !important;
}

/* Ensure dropdown floats above everything */
.navbar .dropdown-menu {
    z-index: 1080 !important; /* higher than navbar (1030) */
}

/* Navbar Logo */
.logo-img {
    height: 36px;
    width: auto;
}

/* Brand text */
.brand-text {
    font-size: 1.25rem;
    white-space: nowrap;
}

/* Mobile tweaks */
@media (max-width: 576px) {
    .logo-img {
        height: 28px;
    }

    .brand-text {
        font-size: 1.05rem;
    }
}
