/* Responsive Styles for Index Page */
/* Mobile-first approach - overrides existing styles only when needed */

/* Mobile Navigation - Pill Style (Segmented Control) */
.mobile-nav {
    display: none;
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 0.5rem;
    z-index: 1000;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
    justify-content: center;
    gap: 0.5rem;
}

.mobile-nav-item {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
    border-radius: 40px;
    white-space: nowrap;
}

.mobile-nav-item:hover {
    color: #4b5563;
}

.mobile-nav-item.active {
    color: #374151;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Mobile Styles (up to 768px) */
@media (max-width: 768px) {

    /* Show mobile nav, hide floating nav */
    .mobile-nav {
        display: flex;
    }

    .floating-nav {
        display: none;
    }

    /* Container - remove top padding so content flows behind nav */
    .container {
        padding: 1rem;
        padding-top: 0;
        margin-top: 0;
    }

    /* Chapter content - single column with top padding for glassmorphic nav */
    .chapter-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding-top: 6rem;
    }

    /* Chapter number - adjust for mobile and ensure it's visible through glassmorphism */
    .chapter-number {
        font-size: 4rem;
        top: -3rem;
        left: 1rem;
        transform: none;
        position: relative;
        z-index: 1;
    }

    /* Timeline - simplified for mobile */
    .story-timeline {
        max-width: 100%;
        margin: 2rem auto 0;
        padding: 0 1rem;
    }

    /* Hide the center timeline line on mobile */
    .timeline-line {
        display: none;
    }

    /* Story items - stack vertically, no alternating */
    .story-item {
        flex-direction: column !important;
        margin-bottom: 3rem;
        text-align: center;
    }

    /* Story marker - center it */
    .story-marker {
        position: relative;
        left: auto;
        transform: none;
        margin-bottom: 1rem;
    }

    .marker-icon {
        width: 50px;
        height: 50px;
        margin: 0 auto;
    }

    /* Story cards - full width on mobile */
    .story-card {
        width: 100% !important;
        max-width: none !important;
        margin: 0;
        padding: 1.5rem;
    }

    /* Adjust story card content for mobile */
    .story-header h3 {
        font-size: 1.1rem;
    }

    .story-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .story-tags {
        gap: 0.4rem;
        justify-content: center;
    }

    .tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    /* Make buttons full width and touch-friendly */
    .test-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
        margin-top: 1rem;
    }

    /* Contact section adjustments */
    .story-conclusion {
        margin-top: 4rem;
        padding: 0 1rem;
    }

    .connect-btn {
        padding: 1.2rem 1.5rem;
        max-width: 100%;
        width: 100%;
    }

    /* Reduce background effects on mobile for performance */
    .story-background .orb {
        opacity: 0.3;
    }

    .floating-particles {
        opacity: 0.5;
    }
}

/* Tablet Styles (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {

    /* Move floating nav to top-right on tablet */
    .floating-nav {
        top: 2rem;
        right: 2rem;
        flex-direction: row;
        gap: 2rem;
    }

    /* Adjust container padding */
    .container {
        padding: 1.5rem;
    }

    /* Timeline adjustments for tablet */
    .story-timeline {
        max-width: 700px;
    }

    .story-card {
        width: calc(45% - 0.5rem) !important;
        max-width: 300px !important;
    }

    /* Slightly smaller chapter number */
    .chapter-number {
        font-size: 6rem;
    }
}

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }

    .story-timeline {
        max-width: 900px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .test-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .connect-btn {
        padding: 1.5rem 2rem;
    }

    /* Larger touch targets */
    .nav-item,
    .mobile-nav-item {
        padding: 1rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Landscape phone adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .chapter-number {
        font-size: 3rem;
    }

    .chapter-title {
        font-size: 2rem;
    }

    .story-conclusion {
        margin-top: 2rem;
    }

    /* Reduce vertical spacing in landscape */
    .story-item {
        margin-bottom: 2rem;
    }
}

/*
 ========================================
   AWS Slides Mobile Responsive Styles
   ======================================== */

@media (max-width: 768px) {

    /* AWS Slides Container */
    .aws-slides-container {
        padding: 0;
    }

    /* AWS Slide - Flexbox layout for fixed title */
    .aws-slide {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 1rem !important;
    }

    .slide-content {
        max-width: 100%;
        padding: 1rem;
        text-align: center;
        overflow-y: auto;
        max-height: calc(100vh - 200px);
        -webkit-overflow-scrolling: touch;
    }

    /* Typography - Scale down for mobile */
    .slide-title {
        font-size: 1.8rem !important;
        margin-bottom: 1rem !important;
    }

    .slide-subtitle {
        font-size: 1.2rem !important;
        margin-bottom: 0.75rem !important;
    }

    .slide-description {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1.5rem !important;
    }

    /* Title Slide */
    .title-slide {
        padding: 2rem 1.5rem !important;
        border-radius: 16px !important;
    }

    .title-slide .slide-title {
        font-size: 2.2rem !important;
    }

    /* Growth Slide */
    .timeframe {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    .growth-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 0 !important;
    }

    .growth-item {
        padding: 1.5rem 1rem !important;
    }

    .growth-percentage {
        font-size: 2.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .company-name {
        font-size: 1.1rem !important;
    }

    .growth-numbers {
        font-size: 1rem !important;
    }

    .growth-metric {
        font-size: 0.85rem !important;
    }

    /* Problem Slide */
    .problems-list {
        padding: 0 1rem !important;
        text-align: left !important;
    }

    .problem-item {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }

    .problem-conclusion {
        font-size: 1rem !important;
        margin-top: 1.5rem !important;
        padding: 1rem !important;
    }

    /* Quote Slide */
    .slide-quote {
        font-size: 1.2rem !important;
        line-height: 1.6 !important;
        padding: 1.5rem 1rem !important;
        margin: 1.5rem 0 !important;
    }

    .quote-attribution {
        font-size: 0.95rem !important;
    }

    /* Solution Slide */
    .solution-image-container {
        margin-top: 1.5rem !important;
        padding: 0 !important;
    }

    .solution-image {
        max-width: 100% !important;
        border-radius: 12px !important;
    }

    /* Strategy Slide - Stack layout */
    .strategy-layout {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .strategy-text {
        width: 100% !important;
        padding: 0 !important;
    }

    .strategy-image {
        width: 100% !important;
        margin-top: 1rem !important;
    }

    .strategy-img {
        max-width: 100% !important;
        border-radius: 12px !important;
    }

    .strategy-bullets {
        padding: 0 !important;
        text-align: left !important;
    }

    .strategy-bullet-item {
        margin-bottom: 1.5rem !important;
        padding: 1rem !important;
    }

    .bullet-title {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .bullet-description {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    /* Strategy Cards Grid (fallback layout) */
    .strategy-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .strategy-card {
        padding: 1.5rem !important;
    }

    .strategy-card-title {
        font-size: 1.1rem !important;
    }

    .strategy-card-description {
        font-size: 0.9rem !important;
    }

    /* Target Users Slide - Stack layout */
    .target-users-layout {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .target-users-text {
        width: 100% !important;
        padding: 0 !important;
    }

    .target-users-image {
        width: 100% !important;
        margin-top: 1rem !important;
    }

    .target-users-img {
        max-width: 100% !important;
        border-radius: 12px !important;
        margin-bottom: 1rem !important;
    }

    .users-list {
        padding: 0 !important;
        text-align: left !important;
    }

    .user-item {
        font-size: 0.95rem !important;
        padding: 1rem !important;
        margin-bottom: 0.75rem !important;
    }

    .user-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }

    .user-text {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    /* Navigation - Touch-friendly */
    .aws-slides-nav {
        padding: 1rem !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .slide-progress {
        font-size: 1rem !important;
        order: 1;
    }

    .nav-buttons {
        gap: 0.75rem !important;
        width: 100% !important;
        order: 2;
    }

    .nav-btn {
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
        flex: 1 !important;
        min-height: 48px !important;
    }

    /* Close Button - Larger touch target */
    .aws-close-btn {
        top: 1rem !important;
        right: 1rem !important;
        width: 48px !important;
        height: 48px !important;
        font-size: 2rem !important;
    }
}

/* Tablet adjustments (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .slide-content {
        max-width: 700px;
        padding: 1.5rem;
    }

    .slide-title {
        font-size: 2.5rem !important;
    }

    .slide-subtitle {
        font-size: 1.5rem !important;
    }

    .slide-description {
        font-size: 1.1rem !important;
    }

    .growth-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .strategy-layout,
    .target-users-layout {
        flex-direction: column !important;
        gap: 2rem !important;
    }

    .strategy-text,
    .target-users-text {
        width: 100% !important;
    }

    .strategy-image,
    .target-users-image {
        width: 100% !important;
    }
}