/* Mobile Fixes for The Internship Book Website */

/* Fix team page mobile layout issues */
@media (max-width: 768px) {
    /* Make sure team profiles section is visible */
    .team-profiles {
        height: 100vh;
        width: 100vw;
        overflow: hidden;
        position: relative;
        background: var(--bg-color);
        margin-bottom: 0; /* Remove excessive margin */
    }

    /* Fix profile cards to be properly centered and visible */
    .profile-card {
        width: 100vw !important;
        height: 100vh !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 2rem 1rem !important;
        box-sizing: border-box;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative;
    }

    /* Fix profile content layout for mobile */
    .profile-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        gap: 1.5rem !important;
        padding: 0 !important;
    }

    /* Profile image section mobile fixes */
    .profile-image-section {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        margin-bottom: 1rem;
    }

    /* Profile image sizing for mobile */
    .profile-image {
        width: 150px !important;
        height: 150px !important;
        font-size: 3rem !important;
        margin-bottom: 1rem !important;
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    /* Profile text styling for mobile */
    .profile-name {
        font-size: 1.8rem !important;
        margin-bottom: 0.5rem !important;
        color: var(--text-color) !important;
    }

    .profile-role {
        font-size: 1rem !important;
        margin-bottom: 1rem !important;
        color: var(--primary-color) !important;
    }

    /* Profile info section mobile */
    .profile-info {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    /* Profile description mobile */
    .profile-description {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        text-align: center !important;
        color: var(--text-color) !important;
    }

    /* Skills section mobile */
    .profile-skills {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        justify-content: center !important;
        margin-bottom: 1rem !important;
        width: 100% !important;
    }

    .skill-tag {
        font-size: 0.7rem !important;
        padding: 0.3rem 0.8rem !important;
        border-radius: 15px;
        background: var(--primary-color) !important;
        color: white !important;
    }

    /* Navigation controls mobile positioning */
    .slideshow-controls {
        position: fixed !important;
        top: 50% !important;
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        padding: 0 1rem !important;
        z-index: 200 !important;
        pointer-events: none !important;
    }

    .slide-nav {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
        background: rgba(0, 154, 148, 0.9) !important;
        color: white !important;
        border: none !important;
        border-radius: 50% !important;
        cursor: pointer;
        transition: all 0.2s ease;
        pointer-events: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .slide-nav:hover {
        background: var(--primary-color) !important;
        transform: scale(1.1);
    }

    /* Profile counter mobile */
    .profile-counter {
        position: fixed !important;
        top: 1rem !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        background: rgba(255, 255, 255, 0.9) !important;
        padding: 0.5rem 1rem !important;
        border-radius: 15px !important;
        font-weight: 600 !important;
        z-index: 100 !important;
        backdrop-filter: blur(10px);
        font-size: 0.9rem !important;
    }

    [data-theme="dark"] .profile-counter {
        background: rgba(26, 26, 26, 0.9) !important;
        color: #FFFFFF !important;
    }

    /* Progress dots mobile */
    .profiles-progress {
        position: fixed !important;
        bottom: 1.5rem !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important;
        gap: 0.5rem !important;
        z-index: 100 !important;
    }

    .progress-dot {
        width: 8px !important;
        height: 8px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.3) !important;
        transition: all 0.3s ease !important;
        cursor: pointer;
    }

    .progress-dot.active {
        background: var(--primary-color) !important;
        transform: scale(1.3) !important;
    }

    /* Scroll indicator mobile */
    .scroll-indicator {
        position: fixed !important;
        bottom: 4rem !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        background: rgba(255, 255, 255, 0.9) !important;
        padding: 0.5rem 1rem !important;
        border-radius: 20px !important;
        font-size: 0.8rem !important;
        color: var(--primary-color) !important;
        font-weight: 600 !important;
        z-index: 100 !important;
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
        text-align: center;
    }

    [data-theme="dark"] .scroll-indicator {
        background: rgba(26, 26, 26, 0.9) !important;
        color: #FFFFFF !important;
    }

    /* Hidden state for navigation elements */
    .slideshow-controls.hidden,
    .profile-counter.hidden,
    .scroll-indicator.hidden,
    .profiles-progress.hidden {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* Fix the profiles container for horizontal scrolling */
    .profiles-container {
        display: flex !important;
        height: 100vh !important;
        width: calc(100vw * 24) !important; /* 24 profiles */
        align-items: center !important;
        transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
        will-change: transform !important;
    }

    /* Remove any height restrictions that might be hiding content */
    .profiles-wrapper {
        height: 100vh !important;
        overflow: hidden !important;
    }

    /* Ensure team page section doesn't interfere */
    .team-page-section {
        padding: 2rem 0 !important;
        margin-bottom: 0 !important;
    }

    .team-intro {
        text-align: center;
        max-width: 90%;
        margin: 0 auto 2rem;
        padding: 0 1rem;
    }

    .team-intro h1 {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
        color: var(--text-color) !important;
    }

    .team-intro p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        color: var(--text-color) !important;
    }
}

/* Gen Z friendly enhancements */
@media (max-width: 768px) {
    /* Add vibrant animations and effects */
    .profile-image:hover {
        transform: scale(1.05) rotate(1deg) !important;
        box-shadow: 0 15px 40px rgba(0, 154, 148, 0.3) !important;
    }

    .skill-tag:hover {
        transform: translateY(-2px) scale(1.05) !important;
        box-shadow: 0 5px 15px rgba(0, 154, 148, 0.4) !important;
    }

    /* Add subtle gradient backgrounds for Gen Z appeal */
    .profile-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, 
            rgba(0, 154, 148, 0.02) 0%, 
            rgba(0, 196, 184, 0.02) 50%, 
            rgba(0, 230, 214, 0.02) 100%);
        z-index: -1;
        pointer-events: none;
    }

    /* Enhanced button styles */
    .slide-nav {
        box-shadow: 0 4px 15px rgba(0, 154, 148, 0.3), 
                    0 0 0 0 rgba(0, 154, 148, 0.4) !important;
        transition: all 0.3s ease !important;
    }

    .slide-nav:active {
        transform: scale(0.95) !important;
        box-shadow: 0 2px 10px rgba(0, 154, 148, 0.4) !important;
    }

    /* Profile name with subtle animation */
    .profile-name {
        background: linear-gradient(135deg, var(--text-color) 0%, var(--primary-color) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        animation: subtle-pulse 3s ease-in-out infinite;
    }

    @keyframes subtle-pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.8; }
    }

    /* Make progress dots more engaging */
    .progress-dot {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    }

    .progress-dot:hover {
        transform: scale(1.5) !important;
        box-shadow: 0 4px 15px rgba(0, 154, 148, 0.4) !important;
    }
}

/* Homepage mobile improvements for Gen Z */
@media (max-width: 768px) {
    /* What/Why/How section mobile fixes */
    .question-navigation {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.5rem !important;
        margin-bottom: 2rem !important;
    }

    .question-nav-btn {
        width: 80px !important;
        height: 60px !important;
        line-height: 1.2 !important;
        padding: 0.5rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.9rem !important;
        border-radius: 10px !important;
        background: var(--card-bg) !important;
        border: 2px solid var(--border-color) !important;
        color: var(--text-color) !important;
        transition: all 0.3s ease !important;
    }

    .question-nav-btn.active {
        background: var(--primary-color) !important;
        color: white !important;
        border-color: var(--primary-color) !important;
        transform: scale(1.05) !important;
    }

    .question-visual {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-bottom: 1.5rem !important;
    }

    .question-image {
        height: 120px !important;
        width: auto !important;
        border-radius: 10px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    }

    /* Teams section mobile fixes */
    .teams-columns {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 2rem !important;
        width: 100% !important;
    }

    .teams-row {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 1rem !important;
        width: 100% !important;
    }

    .award-item {
        width: 120px !important;
        height: 100px !important;
        padding: 0.5rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        background: var(--card-bg) !important;
        border-radius: 15px !important;
        border: 2px solid var(--border-color) !important;
        transition: all 0.3s ease !important;
    }

    .award-item:hover {
        transform: translateY(-5px) scale(1.05) !important;
        border-color: var(--primary-color) !important;
        box-shadow: 0 10px 25px rgba(0, 154, 148, 0.2) !important;
    }

    .team-icon {
        height: 30px !important;
        width: auto !important;
        margin-bottom: 0.5rem !important;
    }

    .award-item h4 {
        font-size: 0.8rem !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        color: var(--text-color) !important;
    }

    /* Friends section mobile */
    .friend-grid {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 2rem !important;
        width: 100% !important;
    }

    .friends-grid {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 1rem !important;
        width: 100% !important;
        max-width: 350px !important;
    }

    .friend-logo {
        padding: 0.5rem !important;
        height: 80px !important;
        width: 80px !important;
        background: var(--card-bg) !important;
        border: 2px solid var(--border-color) !important;
        border-radius: 12px !important;
        transition: all 0.3s ease !important;
    }

    .friend-logo:hover {
        transform: translateY(-3px) scale(1.05) !important;
        border-color: var(--primary-color) !important;
        box-shadow: 0 8px 20px rgba(0, 154, 148, 0.2) !important;
    }

    .friend-img {
        height: 50px !important;
        width: auto !important;
        max-width: 100% !important;
        object-fit: contain !important;
    }
}

/* Additional responsive improvements */
@media (max-width: 480px) {
    .profile-image {
        width: 120px !important;
        height: 120px !important;
        font-size: 2.5rem !important;
    }

    .profile-name {
        font-size: 1.5rem !important;
    }

    .profile-description {
        font-size: 0.85rem !important;
    }

    .skill-tag {
        font-size: 0.65rem !important;
        padding: 0.25rem 0.6rem !important;
    }

    .slide-nav {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
    }

    .question-nav-btn {
        width: 70px !important;
        height: 50px !important;
        font-size: 0.8rem !important;
    }

    .award-item {
        width: 100px !important;
        height: 80px !important;
    }

    .team-icon {
        height: 25px !important;
    }

    .award-item h4 {
        font-size: 0.7rem !important;
    }
}
