/* ====================================
   BIRIGUI DIGITAL - CSS MOBILE OPTIMIZED
   ==================================== */

/* Reset e Base */
* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ====================================
   INFO TOPO
   ==================================== */
.info-topo {
    padding: 20px 0;
    text-align: center;
}

.info-topo .data {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.info-topo .saudacao {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* ====================================
   BANNER CARROSSEL
   ==================================== */
.banner-carrossel {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.banner-container {
    position: relative;
    width: 100%;
    min-height: 200px;
    touch-action: pan-y pinch-zoom;
}

.banner-slide {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.banner-slide.active {
    display: block;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: scale(0.98);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* Banner com Imagem - OTIMIZADO PARA 1920x600 */
.banner-com-imagem {
    position: relative;
    width: 100%;
    min-height: 350px;
    max-height: 600px;
}

.banner-com-imagem img {
    width: 100%;
    height: 100%;
    min-height: 350px;
    max-height: 600px;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent;
    color: white;
    padding: 40px 24px 24px;
}

.banner-overlay h3 {
    margin: 0 0 12px 0;
    font-size: 28px;
    line-height: 1.3;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.banner-overlay p {
    margin: 0 0 16px 0;
    font-size: 17px;
    line-height: 1.5;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

/* Banner Texto */
.banner-texto {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 30px;
    text-align: center;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.banner-texto h3 {
    margin: 0 0 16px 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
}

.banner-texto p {
    margin: 0 0 24px 0;
    font-size: 19px;
    line-height: 1.5;
    opacity: 0.95;
    max-width: 600px;
}

/* Botão do Banner */
.btn-banner {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 14px 32px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    touch-action: manipulation;
}

.btn-banner:hover,
.btn-banner:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

/* Botões de Navegação */
.banner-prev, .banner-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    padding: 12px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    touch-action: manipulation;
}

.banner-prev:hover,
.banner-prev:active,
.banner-next:hover,
.banner-next:active {
    background: rgba(0,0,0,0.8);
    transform: translateY(-50%) scale(1.05);
}

.banner-prev {
    left: 12px;
}

.banner-next {
    right: 12px;
}

.banner-prev svg,
.banner-next svg {
    display: block;
}

/* Indicadores (Dots) */
.banner-dots {
    text-align: center;
    padding: 16px 0;
    background: rgba(0,0,0,0.03);
}

.dot {
    height: 10px;
    width: 10px;
    margin: 0 6px;
    background-color: rgba(0,0,0,0.25);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
}

.dot.active {
    background-color: #667eea;
    width: 24px;
    border-radius: 5px;
}

.dot:hover {
    background-color: rgba(102, 126, 234, 0.6);
}

/* ====================================
   SEÇÃO DE ÍCONES
   ==================================== */
.secao-titulo {
    text-align: center;
    padding: 20px 0 10px;
}

.secao-titulo h2 {
    font-size: 22px;
    color: #333;
    font-weight: 700;
    margin: 0;
    position: relative;
    display: inline-block;
}

.secao-titulo h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* ====================================
   GRID DE ÍCONES - HORIZONTAL
   ==================================== */
.icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px;
    padding: 30px 0;
    width: 100%;
}

.app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    padding: 16px 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
    touch-action: manipulation;
    min-height: 120px;
    position: relative;
}

.app-icon:hover,
.app-icon:active {
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-4px);
}

.app-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.app-icon:hover img,
.app-icon:active img {
    transform: scale(1.1);
}

.app-icon span {
    font-size: 13px;
    text-align: center;
    line-height: 1.3;
    font-weight: 500;
    display: block;
    word-wrap: break-word;
    max-width: 100%;
    margin-bottom: 4px;
}

/* Contador de Acessos */
.contador-acessos {
    font-size: 10px;
    color: #999;
    font-weight: 400;
    margin-top: 2px;
}

.app-icon:hover .contador-acessos,
.app-icon:active .contador-acessos {
    color: #667eea;
}

/* Mensagem sem ícones */
.sem-icones {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* ====================================
   MEDIA QUERIES - TABLETS (768px)
   ==================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    
    .info-topo {
        padding: 16px 0;
    }
    
    .info-topo .saudacao {
        font-size: 22px;
    }
    
    .secao-titulo {
        padding: 16px 0 8px;
    }
    
    .secao-titulo h2 {
        font-size: 20px;
    }
    
    .banner-carrossel {
        border-radius: 12px;
        margin: 16px auto;
    }
    
    /* Banner ajustado para tablet */
    .banner-com-imagem {
        min-height: 280px;
        max-height: 400px;
    }
    
    .banner-com-imagem img {
        min-height: 280px;
        max-height: 400px;
    }
    
    .banner-texto {
        min-height: 280px;
        padding: 50px 24px;
    }
    
    .banner-overlay {
        padding: 32px 20px 20px;
    }
    
    .banner-overlay h3 {
        font-size: 24px;
    }
    
    .banner-overlay p {
        font-size: 16px;
    }
    
    .banner-texto h3 {
        font-size: 26px;
    }
    
    .banner-texto p {
        font-size: 17px;
    }
    
    .btn-banner {
        padding: 12px 28px;
        font-size: 15px;
    }
    
    /* Grid ajustado para tablet */
    .icons-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 16px;
        padding: 24px 0;
    }
    
    .app-icon {
        min-height: 110px;
    }
    
    .app-icon img {
        width: 56px;
        height: 56px;
    }
    
    .contador-acessos {
        font-size: 9px;
    }
}

/* ====================================
   MEDIA QUERIES - SMARTPHONES (480px)
   ==================================== */
@media (max-width: 480px) {
    .container {
        padding: 0 8px;
    }
    
    .info-topo {
        padding: 12px 0;
    }
    
    .info-topo .data {
        font-size: 12px;
    }
    
    .info-topo .saudacao {
        font-size: 20px;
    }
    
    .secao-titulo {
        padding: 12px 0 6px;
    }
    
    .secao-titulo h2 {
        font-size: 18px;
    }
    
    .secao-titulo h2::after {
        width: 50px;
        height: 2px;
    }
    
    .banner-carrossel {
        border-radius: 8px;
        margin: 12px auto;
    }
    
    /* Banner otimizado para mobile */
    .banner-com-imagem {
        min-height: 220px;
        max-height: 300px;
    }
    
    .banner-com-imagem img {
        min-height: 220px;
        max-height: 300px;
    }
    
    .banner-texto {
        min-height: 220px;
        padding: 35px 20px;
    }
    
    .banner-overlay {
        padding: 24px 16px 16px;
    }
    
    .banner-overlay h3 {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .banner-overlay p {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .banner-texto h3 {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .banner-texto p {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .btn-banner {
        padding: 11px 24px;
        font-size: 14px;
    }
    
    .banner-prev, .banner-next {
        width: 36px;
        height: 36px;
        padding: 8px;
    }
    
    .banner-prev svg,
    .banner-next svg {
        width: 20px;
        height: 20px;
    }
    
    .banner-prev {
        left: 8px;
    }
    
    .banner-next {
        right: 8px;
    }
    
    .banner-dots {
        padding: 12px 0;
    }
    
    .dot {
        height: 8px;
        width: 8px;
        margin: 0 4px;
    }
    
    .dot.active {
        width: 20px;
    }
    
    /* Grid horizontal para smartphones */
    .icons-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        padding: 20px 0;
    }
    
    .app-icon {
        padding: 12px 6px;
        border-radius: 10px;
        min-height: 100px;
    }
    
    .app-icon img {
        width: 48px;
        height: 48px;
        margin-bottom: 8px;
        border-radius: 10px;
    }
    
    .app-icon span {
        font-size: 11px;
    }
    
    .contador-acessos {
        font-size: 8px;
    }
    
    .sem-icones {
        font-size: 14px;
        padding: 30px 15px;
    }
}

/* ====================================
   MEDIA QUERIES - TELAS PEQUENAS (360px)
   ==================================== */
@media (max-width: 360px) {
    .secao-titulo h2 {
        font-size: 16px;
    }
    
    /* Banner compacto para telas pequenas */
    .banner-com-imagem {
        min-height: 200px;
        max-height: 250px;
    }
    
    .banner-com-imagem img {
        min-height: 200px;
        max-height: 250px;
    }
    
    .banner-texto {
        min-height: 200px;
        padding: 30px 16px;
    }
    
    .banner-overlay h3 {
        font-size: 18px;
    }
    
    .banner-overlay p {
        font-size: 14px;
    }
    
    .banner-texto h3 {
        font-size: 20px;
    }
    
    .banner-texto p {
        font-size: 15px;
    }
    
    /* Grid compacto 3 colunas */
    .icons-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .app-icon {
        min-height: 95px;
        padding: 10px 4px;
    }
    
    .app-icon img {
        width: 44px;
        height: 44px;
    }
    
    .app-icon span {
        font-size: 10px;
    }
    
    .contador-acessos {
        font-size: 8px;
    }
    
    .sem-icones {
        font-size: 13px;
        padding: 25px 10px;
    }
}

/* ====================================
   MODO PAISAGEM EM MOBILE
   ==================================== */
@media (max-width: 768px) and (orientation: landscape) {
    .banner-com-imagem {
        min-height: 180px;
        max-height: 250px;
    }
    
    .banner-com-imagem img {
        min-height: 180px;
        max-height: 250px;
    }
    
    .banner-texto {
        min-height: 180px;
        padding: 24px 20px;
    }
    
    .banner-overlay {
        padding: 16px;
    }
    
    .icons-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

/* ====================================
   DISPOSITIVOS TOUCH
   ==================================== */
@media (hover: none) and (pointer: coarse) {
    .banner-container {
        touch-action: pan-y pinch-zoom;
    }
    
    /* Aumentar área de toque */
    .app-icon {
        min-height: 100px;
        padding: 14px 8px;
    }
    
    .dot {
        height: 12px;
        width: 12px;
        margin: 0 8px;
    }
    
    .dot.active {
        width: 28px;
    }
}

/* ====================================
   OTIMIZAÇÕES PARA BANNER 1920x600
   ==================================== */

/* Desktop Grande (1920px+) */
@media (min-width: 1920px) {
    .banner-com-imagem {
        max-height: 600px;
    }
    
    .banner-com-imagem img {
        max-height: 600px;
    }
    
    .banner-overlay h3 {
        font-size: 32px;
    }
    
    .banner-overlay p {
        font-size: 18px;
    }
}

/* Desktop Médio (1200px - 1919px) */
@media (min-width: 1200px) and (max-width: 1919px) {
    .banner-com-imagem {
        max-height: 500px;
    }
    
    .banner-com-imagem img {
        max-height: 500px;
    }
}

/* Desktop Pequeno (769px - 1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
    .banner-com-imagem {
        max-height: 400px;
    }
    
    .banner-com-imagem img {
        max-height: 400px;
    }
}