/* ==========================================================================
   THINKSQUARE TECHNOLOGIES - RESPONSIVE STYLESHEET
   ========================================================================== */

/* --- Base styles for the Hamburger (Hidden on Desktop) --- */
.menu-toggle-cb {
    display: none;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    z-index: 10001;
    position: relative;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #0f172a; /* Dark brand color */
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --------------------------------------------------------------------------
   1. TABLETS & PORTRAIT SMARTPHONES (Max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    
    /* Header layout adapts to mobile */
    header {
        position: fixed;
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        height: 70px;
        border-radius: 0;
        border-top: none;
        border-left: none;
        border-right: none;
        border-bottom: 1px solid rgba(226, 232, 240, 0.8);
        padding: 0 24px; /* Pulls elements closer to the screen edges */
        background: #ffffff;
        display: flex;
        justify-content: space-between; /* Sends logo left, hamburger right */
        align-items: center;
        z-index: 10000;
    }

    .logo img {
        max-height: 35px;
        width: auto;
    }

    /* Display the Hamburger on mobile devices */
    .hamburger {
        display: flex;
    }

    /* Transform navigation to hidden vertical slide-out drawer */
    header nav {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        position: fixed;
        top: 70px; /* Sits directly beneath the header */
        left: 0;
        width: 100%;
        height: 0; /* Starts collapsed */
        background: #ffffff;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 0 24px;
        box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.05);
        border-bottom: 1px solid rgba(226, 232, 240, 0.8);
        opacity: 0;
        pointer-events: none;
        z-index: 9999;
        gap: 0; /* Reset spacing */
    }

    /* Styles for list items inside mobile drawer */
    header nav a {
        width: 100%;
        padding: 18px 0;
        border-bottom: 1px solid rgba(226, 232, 240, 0.5);
        font-size: 1rem;
        font-weight: 500;
        color: #334155;
        display: flex;
        align-items: center;
        gap: 12px;
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        background: transparent !important; /* Resets CTA card view on mobile */
        border-radius: 0;
    }

    header nav a i {
        font-size: 1.15rem;
        color: #0284c7; /* Your brand primary blue */
    }

    /* Reveal the Courses link inside the mobile drawer (hidden on desktop) */
    .nav-courses-mobile {
        display: flex;
    }

    /* The desktop "Courses" pill button is replaced by the drawer link above */
    .nav-auth {
        display: none;
    }

    /* Toggle states based on checkbox */
    .menu-toggle-cb:checked ~ nav {
        height: auto;
        padding-bottom: 25px;
        opacity: 1;
        pointer-events: auto;
    }

    .menu-toggle-cb:checked ~ nav a {
        opacity: 1;
        transform: translateY(0);
    }

    /* Animate standard hamburger bar icons into "X" close icons */
    .menu-toggle-cb:checked + .hamburger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .menu-toggle-cb:checked + .hamburger span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }
    
    .menu-toggle-cb:checked + .hamburger span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* --- CONTENT WRAPPERS --- */
    #hero {
        padding-top: 120px;
        background-position: right;
    }

    /* --- SERVICES 100% GRID WIDTH --- */
    .grid-container {
        grid-template-columns: 1fr !important;
        width: 100%;
        gap: 20px;
    }

    .grid-card {
        width: 100% !important;
    }

    /* --- VERTICAL STACKED FOOTER --- */
    .footer-container {
        grid-template-columns: 1fr !important;
        gap: 30px;
        text-align: left !important;
    }

    .footer-col h4 {
        text-align: left !important;
        margin-bottom: 12px;
    }

    .footer-links li, 
    .footer-address {
        justify-content: flex-start !important;
        text-align: left !important;
    }

    /* 2. PORTFOLIO SLIDER CARD IMAGE FIX */
    .portfolio-item {
        padding: 15px;
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    /* Prevent multiple mockups from stacking and crushing inside a single card */
    .portfolio-image-placeholder, 
    .portfolio-item img {
        width: 100%;
        height: 180px; /* Force a consistent mobile height */
        object-fit: cover; /* Ensures the image crops beautifully instead of compressing squished */
        border-radius: 8px;
        margin: 0 auto;
        display: block;
    }

    /* Adjust the spacing on the slider buttons so they don't cover text */
    .slider-btn {
        width: 36px;
        height: 36px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

}

/* --------------------------------------------------------------------------
   2. SCREEN ADJUSTMENTS FOR LARGE TABLETS (Max-width: 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .courses-split-layout {
        flex-direction: column;
        gap: 40px;
    }
    
    .notify-column {
        position: relative;
        top: 0;
    }
}