/* Mobile Responsive Fixes */

/* Base typography improvements for mobile */
@media only screen and (max-width: 767px) {
    body {
        font-size: 15px;
        line-height: 1.6;
    }
    
    h1 {
        font-size: 32px;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 28px;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 24px;
        line-height: 1.3;
    }
    
    h4 {
        font-size: 20px;
        line-height: 1.4;
    }
    
    h5 {
        font-size: 18px;
        line-height: 1.4;
    }
    
    h6 {
        font-size: 16px;
        line-height: 1.4;
    }
    
    p {
        margin-bottom: 15px;
    }
}

/* Hide floating cards on mobile */
@media only screen and (max-width: 767px) {
    .floating-cards {
        display: none !important;
    }
    
    .scroll-indicator {
        display: none !important;
    }
}

/* Fix mobile navigation */
@media only screen and (max-width: 991px) {
    .header-area .header-wrapper {
        padding: 15px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .header-area .header-wrapper .logo img {
        max-width: 180px;
    }
    
    .mean-container .mean-bar {
        background: transparent;
        position: static;
        float: none;
        min-height: auto;
    }
    
    .mean-container a.meanmenu-reveal {
        top: 50%;
        transform: translateY(-50%);
        right: 15px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
        padding: 6px 8px;
        width: 24px;
        height: 24px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    [data-theme="light"] .mean-container a.meanmenu-reveal span {
        background: #333;
    }
    
    [data-theme="dark"] .mean-container a.meanmenu-reveal span {
        background: #fff;
    }
    
    .mean-container .mean-nav {
        background: rgba(35, 35, 35, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        margin-top: 20px;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
        max-width: 300px;
        z-index: 9999;
    }
    
    .mean-container .mean-nav ul li a {
        padding: 12px 5%;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 15px;
    }
    
    .oscar-header-4 .mean-container .mean-nav {
        width: calc(100% - 30px);
        right: 15px;
        left: auto;
        top: 100%;
    }
    
    .humberger-menu {
        
        margin-right: 20px;
        margin-top: -30px;
    }
    
    /* Fix mobile menu toggle */
    .humberger-menu span.menutrigger {
        cursor: pointer;
        display: block;
        height: 24px;
        width: 24px;
    }
    
    /* Fix mobile header spacing */
    .header-area.formobile-menu {
        padding: 10px 0;
    }
    
    /* Fix header right section */
    .header-right {
        display: flex;
        align-items: center;
    }
}

/* Fix layout issues on mobile */
@media only screen and (max-width: 767px) {
    .static-main-banner .banner-caption-wrap {
        padding: 100px 0 40px;
        text-align: center;
    }
    
    .static-main-banner .banner-title {
        font-size: 32px;
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .static-main-banner .banner-small-title {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .static-main-banner .banner-caption {
        font-size: 16px;
        margin-bottom: 25px;
        max-width: 100%;
    }
    
    .header-btn {
        display: none;
    }
    
    /* Improve spacing */
    .section, section {
        padding: 50px 0;
    }
    
    /* Fix buttons on mobile */
    .rn-button-style--2,
    .rn-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    /* Center hero content on mobile */
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    /* Improve hero section buttons */
    .hero-buttons {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .hero-buttons .rn-btn {
        margin: 5px;
    }
}

/* Fix for extra small devices */
@media only screen and (max-width: 480px) {
    .static-main-banner .banner-caption-wrap {
        padding: 60px 0 40px;
    }
    
    .static-main-banner .banner-title {
        font-size: 28px;
    }
    
    .static-main-banner .banner-small-title {
        font-size: 20px;
    }
    
    /* Fix button spacing */
    .banner-caption-wrap > .btn:last-of-type {
        margin-left: 10px;
    }
    
    /* Improve spacing for sections */
    .section, section {
        padding: 40px 0;
    }
}

/* Fix for the AI chatbot section on mobile */
@media only screen and (max-width: 767px) {
    .starkly-ai-spotlight {
        padding: 60px 0;
    }
    
    .spotlight-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .spotlight-description {
        font-size: 16px;
        margin-bottom: 25px;
    }
    
    .chat-mockup-container {
        margin-top: 30px;
    }
    
    .chat-interface {
        transform: none !important;
    }
    
    .message-bubble {
        max-width: 260px;
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* Fix for portfolio items on mobile */
@media only screen and (max-width: 767px) {
    .portfolio-item {
        margin-bottom: 30px;
    }
    
    .portfolio-inner {
        padding: 15px;
    }
    
    .portfolio-inner h4 {
        font-size: 18px;
    }
    
    /* Improve grid layout on mobile */
    .row [class*="col-"] {
        margin-bottom: 20px;
    }
    
    /* Fix image responsiveness */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Better spacing for tabs */
    .tab-content {
        margin-top: 20px;
    }
    
    /* Fix spacing for buttons */
    .btn {
        margin-bottom: 10px;
    }
    
    /* Fix spacing for forms */
    .form-group {
        margin-bottom: 15px;
    }
    
    /* Fix spacing for lists */
    ul, ol {
        padding-left: 20px;
        margin-bottom: 15px;
    }
}

/* Fix for footer on mobile */
@media only screen and (max-width: 767px) {
    footer.footer-area {
        padding: 50px 0 30px;
    }
    
    .footer-widget {
        margin-bottom: 30px;
    }
}

/* Fix for very small screens */
@media only screen and (max-width: 360px) {
    .static-main-banner .banner-title {
        font-size: 24px;
    }
    
    .static-main-banner .banner-small-title {
        font-size: 18px;
    }
    
    .banner-caption-wrap > .btn {
        display: block;
        margin: 10px 0 !important;
        width: 100%;
        text-align: center;
    }
    
    .section-heading-2 .title {
        font-size: 28px;
        line-height: 36px;
    }
    
    /* Fix header logo for very small screens */
    .header-area .header-wrapper .logo img {
        max-width: 160px;
    }
}

/* Fix for landscape mode on mobile */
@media only screen and (max-height: 480px) and (orientation: landscape) {
    .static-main-banner .banner-caption-wrap {
        padding: 40px 0 30px;
    }
    
    .static-main-banner .banner-title {
        font-size: 28px;
    }
    
    .static-main-banner .banner-small-title {
        font-size: 20px;
    }
    
    /* Adjust theme toggle position for landscape */
    .theme-toggle-btn {
        bottom: 15px;
        right: 15px;
    }
}
