/* Responsive Styles */

/* Large Screens */
@media (max-width: 1200px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-video,
    .demo-video {
        padding-bottom: 56.25%;
    }

    /* Contact responsive */
    .contact-container {
        max-width: 90%;
    }

    /* Footer responsivo */
    .footer-main {
        gap: var(--spacing-lg);
    }

    /* Carrossel responsivo */
    .carousel-prev,
    .carousel-next {
        width: 38px;
        height: 38px;
    }
}

/* Medium Screens */
@media (max-width: 992px) {
    .hero-content {
        text-align: center;
        margin: 0 auto;
    }

    .nav-menu {
        gap: 1rem;
    }

    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contact responsive */
    .contact-container {
        max-width: 95%;
    }

    /* Footer responsivo */
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }

    .footer-col.links-col {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-md);
    }

    .footer-col.contact-col {
        grid-column: span 2;
        margin-top: var(--spacing-lg);
    }

    .footer-newsletter {
        padding: var(--spacing-lg);
        max-width: 90%;
    }

    /* Carrossel responsivo */
    .carousel-nav {
        padding: 0 15px;
    }

    .carousel-prev,
    .carousel-next {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}

/* Small Screens */
@media (max-width: 768px) {
    section {
        padding: var(--spacing-md) 0;
        margin: var(--spacing-xs) 0;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero-video,
    .demo-video {
        margin-top: 20px;
        padding-bottom: 56.25%;
    }

    .hero-video {
        max-width: 100%;
    }

    .demo-video {
        max-width: 100%;
    }

    .time-comparison {
        flex-direction: column;
        gap: 20px;
    }

    /* Carrossel responsivo */
    .carousel-nav {
        top: auto;
        bottom: 40px;
        transform: none;
        justify-content: center;
        gap: 15px;
    }

    .carousel-prev,
    .carousel-next {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .carousel-indicators {
        bottom: 10px;
    }

    .testimonial {
        padding: var(--spacing-lg) var(--spacing-md) var(--spacing-3xl);
    }

    .footer__legal-divider {
        display: none;
        /* Oculto apenas no mobile */
    }

    /* Sub-pages Mobile Improvements (Literacia Digital, Produtos e Serviços) */
    .hero-sub {
        padding-top: 100px !important;
    }

    .hero-literacia-custom {
        padding-top: 160px !important; /* Increased to avoid header overlap */
        min-height: auto !important;
    }

    .sub-grid {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-md) !important;
        width: 100% !important;
        display: grid !important;
    }

    .feature-item-sub {
        padding: 1.5rem !important;
    }

    .sub-section {
        padding: var(--spacing-xl) 1rem !important;
    }

    .sub-section h2 {
        font-size: 1.5rem !important;
    }

    /* "Como o programa funciona" Section specific fix */
    div[style*="background: var(--primary-color)"],
    .sub-section {
        padding: 1.5rem 0.75rem !important; /* Minimized padding to maximize content width */
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        border-radius: var(--border-radius) !important;
    }

    /* Fix for cut-off text in lists (mentoria, entregáveis, etc) */
    .sub-section li {
        font-size: 1rem !important; 
        line-height: 1.5 !important;
        margin-bottom: 15px !important;
        display: flex !important;
        flex-wrap: wrap !important; /* Forces wrap if content is too long for one line */
        align-items: flex-start !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        text-align: left !important;
        width: 100% !important;
    }

    .sub-section li i {
        margin-top: 5px !important;
        flex-shrink: 0 !important;
    }

    .hero-literacia-custom .hero__title {
        font-size: 2.2rem !important;
    }

    .hero-literacia-custom .hero__subtitle {
        text-align: center !important;
        max-width: 100% !important;
    }

    .hero-literacia-custom .hero__list {
        font-size: 0.95rem !important; /* Smaller text for list items */
        padding: 1.25rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Force modules cards to fit */
    .feature-item-sub {
        padding: 1rem !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        flex: 0 0 100% !important;
    }

    .feature-item-sub h3 {
        font-size: 1.2rem !important;
        min-height: auto !important;
    }

    .feature-item-sub p {
        font-size: 1rem !important;
        min-height: auto !important;
    }

    .card-header h3 {
        font-size: 1.1rem !important;
    }

    /* Prevent horizontal scroll and force wrap */
    html, body {
        overflow-x: hidden !important;
        position: relative !important;
        width: 100% !important;
    }

    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    p, span, li, h1, h2, h3, h4, a {
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        white-space: normal !important;
    }

    .indicado-para {
        padding: 8px !important;
        margin-top: 10px !important;
    }

    .indicado-para p {
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
    }
}

/* Extra Small Screens */
@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .navbar-brand img {
        max-width: 120px;
    }

    .hero-content {
        padding: 1rem 0;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .social-icons {
        gap: 10px;
    }

    .social-icon {
        width: 35px;
        height: 35px;
    }
}

/* Services Grid Responsiveness - Atualizado para 6 serviços */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
    }
}

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}