/* ====================================================
   Reset e Estilos Globais
==================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f0f0f0;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

/* ====================================================
   Estilos do Container Principal
==================================================== */
.main-container {
    display: flex;
    flex-direction: row;
    justify-content: center; /* Centraliza o conteúdo no desktop */
    align-items: flex-start;
    padding: 64px 40px;
    max-width: 1300px;
    margin: 0 auto;
}

/* ====================================================
   Estilos do Perfil
==================================================== */
.profile {
    width: clamp(300px, 30%, 420px); /* Largura flexível para se adaptar entre 300px e 420px */
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Mantém alinhado à esquerda */
    text-align: left;
}

.profile img {
    width: 164px;
    height: 164px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.profile h1 {
    font-family: 'Figtree', sans-serif;
    font-size: 40px;
    margin-bottom: 8px;
    text-align: left;
}

.profile p {
    font-size: 19px;
    color: #777;
    width: 100%;
    margin-bottom: 12px;
}

/* ====================================================
   Estilos da Seção de Compartilhamento
==================================================== */
.share-section {
    text-align: left;
    margin-top: 20px;
}

.share-section p {
    font-size: 18px;
    font-weight: bold;
    color: #181818;
    margin-bottom: 10px;
}

.share-section ul {
    display: flex;
    gap: 15px;
    list-style: none;
    justify-content: flex-start;
    padding: 0;
}

.share-section ul li a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: #f0f0f0;
    border-radius: 50%;
    color: #777;
    font-size: 18px;
    text-align: center;
    line-height: 40px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.share-section ul li a:hover {
    background-color: #4093ef;
    color: white;
}

/* Hover específico para o botão Facebook */
.share-section ul li a.facebook:hover {
    background-color: #3b5998; /* Cor do hover do Facebook */
    color: white; /* Cor do ícone em hover */
}

/* Hover específico para o botão Instagram */
.share-section ul li a.instagram:hover {
    background-color: #E1306C; /* Cor do hover do Instagram */
    color: white; /* Cor do ícone em hover */
}

/* Hover específico para o botão Telegram */
.share-section ul li a.telegram:hover {
    background-color: #0088cc; /* Cor do hover do Telegram */
    color: white; /* Cor do ícone em hover */
}

/* ====================================================
   Estilos do Grid de Cards
==================================================== */
.cards-container {
    display: grid;
    grid-template-columns: repeat(2, 390px);
    gap: 40px;
    justify-content: center;
    width: 100%;
}

.grid-item {
    position: relative;
    border-radius: 30px;
    background-color: #fdfdfd;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    padding: 0; /* Remove padding para o fundo da imagem preencher o card */
    text-align: left;
    overflow: hidden;
    width: 390px;
    height: 175px;
    border: 2px solid rgba(24, 24, 24, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Garante que a imagem cubra todo o card sem distorção */
    border-radius: 30px;
}

/* Reels Criativos com imagem específica */
.grid-item.reels-criativos {
    width: 390px;
    height: 390px;
    background-image: url('imagens/impacte-ai-school1.webp');
    background-size: cover;
    background-position: center;
    border: none;
}

/* Criadores do Futuro com imagem específica */
.grid-item.criadores-futuro {
    background-image: url('imagens/newsletter1.webp');
    background-size: cover;
    background-position: center;
    border: none;
}

/* Estilo para Palestras */
.grid-item.palestras {
    color: #fdfdfd;
    border: none;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Alinhado ao topo */
    align-items: flex-start;
    position: relative;
    overflow: hidden; /* Garante que o degradê e o conteúdo não ultrapassem as bordas */
    border: none;
}

.grid-item.palestras::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3169f8, #122230); /* Aplicação do degradê */
    z-index: 1; /* Garante que o degradê fique abaixo do conteúdo */
    opacity: 0.8; /* Leve transparência para ver a imagem por trás */
    border-radius: inherit; /* Mantém o border-radius do card */
}

.grid-item.palestras h3 {
    color: #fdfdfd;
    margin-bottom: 12px;
    margin-top: 0px; /* Remove qualquer margem superior */
    z-index: 2; /* Garante que o texto apareça sobre o fundo */
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.button-wrapper {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 2; /* Para o botão aparecer por cima */
}

.grid-item a {
    display: inline-block;
    padding: 8px;
    font-size: 16px;
    font-weight: normal;
    color: #fdfdfd;
    text-decoration: none;
    border-radius: 30px;
    border: 2px solid #fdfdfd;
    background-color: rgba(24, 24, 24, 0.45);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.grid-item a:hover {
    background-color: rgba(24, 24, 24, 0.65);
    border-color: #fdfdfd;
}

.grid-item.reels-criativos, .grid-item.criadores-futuro {
    background-size: cover;
    background-position: center;
    border-radius: 30px;
    overflow: hidden; /* Garante que a imagem não ultrapasse as bordas */
    position: relative; /* Necessário para o degradê e outros elementos */
}

/* ====================================================
   Estilos do Container das Redes Sociais
==================================================== */
.vertical-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}

.social-container {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-top: 0px;
}

.social-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Alinha os itens à esquerda */
    justify-content: flex-start; /* Inicia o conteúdo no topo */
    width: 175px;
    height: 175px;
    background-color: #fdfdfd;
    border-radius: 30px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    text-align: left; /* Alinha o texto à esquerda */
    padding: 24px;
    border: 2px solid rgba(24, 24, 24, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.social-card img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid rgba(24, 24, 24, 0.15);
}

.social-card .social-name {
    font-size: 14px;
    font-weight: bold;
    color: #181818;
}

.social-card .username {
    font-size: 12px;
    color: rgba(24, 24, 24, 0.4);
}

.tiktok-btn, .youtube-btn, .follow-btn {
    width: 80px;
    height: 30px;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.tiktok-btn {
    background-color: #ea435a;
}

.tiktok-btn:hover {
    background-color: #fe2c55;
}

.youtube-btn {
    background-color: #ff0000;
    border-radius: 30px;
    width: 100px;
}

.youtube-btn:hover {
    background-color: #de0000;
}

.follow-btn {
    background-color: #4093ef;
    border-radius: 8px;
}

.follow-btn:hover {
    background-color: #3383dc;
}

/* ====================================================
   Estilos do Container Horizontal (Instagram e Palestras)
==================================================== */
.horizontal-container {
    display: flex;
    flex-direction: row;
    gap: 40px;
    justify-content: center;
    width: 820px;
}

.instagram-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Alinha o conteúdo à esquerda */
    justify-content: flex-start;
    padding: 24px; /* Igualando o padding ao TikTok e YouTube */
    height: 100%;
    box-sizing: border-box;
}

.instagram-content img {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    border-radius: 12px;
    object-fit: cover;
}

.instagram-content .social-name {
    font-size: 14px;
    font-weight: bold;
    color: #181818;
    margin-bottom: 0px; /* Ajuste igual ao TikTok e YouTube */
}

.instagram-content .username {
    font-size: 12px;
    color: rgba(24, 24, 24, 0.4);
    margin-bottom: 10px;
}

.instagram-content .follow-btn {
    width: 80px;
    height: 30px;
    background-color: #4093ef;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 0px;
}

.instagram-content .follow-btn:hover {
    background-color: #3383dc;
}

/* ====================================================
   Sombras nos botões
==================================================== */

.grid-item a, .tiktok-btn, .youtube-btn, .follow-btn {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Sombra suave */
    transition: box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.grid-item a:hover, .tiktok-btn:hover, .youtube-btn:hover, .follow-btn:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); /* Sombra mais forte ao passar o mouse */
}

.social-card img, .instagram-content img {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ====================================================
   Cursor nos Cards
==================================================== */
.grid-item, .social-card {
    cursor: pointer;
}

/* ====================================================
   Borda no Ícone do TikTok
==================================================== */
.social-card img[src="imagens/tiktok.svg"] {
    border: 2px solid rgba(24, 24, 24, 0.15); /* Borda somente no ícone do TikTok */
    border-radius: 12px;
}

.social-card.youtube img {
    border: none; /* Remove qualquer borda que possa ter sido aplicada ao YouTube */
}

/* ====================================================
   Media Queries para Responsividade
==================================================== */

/* ====================================================
   Desktop View (mais de 1200px)
==================================================== */

@media (min-width: 1201px) {
    .main-container {
        flex-direction: row;
        align-items: flex-start;
        padding: 40px;
        max-width: 1300px;
        margin: 0 auto;
    }

    .profile {
        width: 100%; /* Largura proporcional */
        max-width: 420px; /* Limite máximo de 420px */
        min-width: 350px; /* Largura mínima para telas menores de desktop */
        margin-right: 50px; /* Espaçamento à direita */
    }

    .share-section {
        text-align: left;
    }

    .share-section ul {
        justify-content: flex-start;
    }

    .horizontal-container {
        display: flex;
        flex-direction: row;
        gap: 40px;
        justify-content: center;
        width: 820px;
    }
}

/* ====================================================
   Tablet View (820px - 1200px)
==================================================== */
@media (max-width: 1200px) and (min-width: 820px) {
    .main-container {
        flex-direction: column;
        align-items: center;
        padding-top: 64px;
        padding-bottom: 64px;
        width: 100%;
        max-width: 1300px;
    }

    .profile {
        align-items: center;
        text-align: center;
        margin: 0 auto;
        width: 100%;
        max-width: 420px;
    }

    .profile img {
        margin-bottom: 20px;
    }

    .profile h1, .profile p {
        text-align: center;
        margin-bottom: 12px;
        width: 720px;
    }

    .share-section {
        text-align: center;
        margin-top: 0px;
        margin-bottom: 20px;
    }

    .share-section ul {
        justify-content: center;
        margin: 0 auto;
        gap: 10px;
    }

    .cards-container {
        display: grid;
        grid-template-columns: repeat(2, 390px);
        gap: 40px;
        justify-content: center;
        width: 100%;
    }

    .grid-item {
        width: 390px;
        height: 175px;
    }

    .grid-item.reels-criativos {
        grid-row: span 2;
        width: 390px;
        height: 390px;
    }

    .vertical-container {
        grid-row: span 2;
        grid-column: 2 / 3;
        display: flex;
        flex-direction: column;
        gap: 40px;
        align-items: center;
    }

    .social-container {
        display: flex;
        gap: 40px;
        justify-content: center;
        margin-top: 0px;
    }

    .horizontal-container {
        grid-row: 3 / 4;
        grid-column: 1 / 3;
        display: flex;
        flex-direction: row;
        gap: 40px;
        justify-content: center;
    }
}

/* ====================================================
   Mobile View (menos de 820px)
==================================================== */
@media (max-width: 820px) {
    .main-container {
        flex-direction: column;
        align-items: center;
        padding: 20px;
        width: 100%;
    }

    .profile {
        align-items: center;
        text-align: center;
        margin: 0 auto 20px auto;
        width: 100%;
        max-width: 720px;
    }

    .profile img {
        margin-bottom: 20px;
    }

    .profile h1, .profile p {
        text-align: center;
        margin-bottom: 12px;
    }

    .share-section {
        text-align: center;
        margin-top: 0px;
    }

    .share-section ul {
        justify-content: center;
        margin: 0 auto;
        gap: 15px;
    }

    /* Cards Container */
    .cards-container {
        display: flex;
        flex-direction: column;
        gap: 24px; /* Distância entre os cards ajustada para 24px */
        align-items: center;
        width: 100%;
    }

    /* Permitir que os filhos dos contêineres sejam tratados como filhos diretos */
    .vertical-container,
    .horizontal-container {
        display: contents;
    }

    /* Ordem dos Cards no Mobile */
    .cards-container .reels-criativos {
        order: 1 !important; /* Garantindo que seja o primeiro card */
        width: 374px;
        height: 175px;
        margin: 0;
    }
    
    .cards-container .criadores-futuro {
        order: 2; /* Ajustado para aparecer em segundo */
        width: 374px;
        height: 175px;
        margin: 0;
    }
    
    .cards-container .palestras {
        order: 3; /* Aparece em terceiro */
        width: 374px;
        height: 175px;
        margin: 0;
    }
    
    .cards-container .instagram {
        order: 4; /* Aparece em quarto */
        width: 374px;
        height: 175px;
        margin: 0;
    }
    
    .cards-container .social-container {
        order: 5; /* Aparece por último */
        gap: 24px;
        width: 374px;
        margin: 0;
    }
    
    /* Agrupamento das Redes Sociais no Mobile */
    .social-container {
        gap: 24px;
    }

    /* Caixa de texto da descrição com 390px de largura */
    .profile p {
        width: 390px;
    }

    /* Ajuste das redes TikTok e YouTube no mobile */
    .social-card {
        width: 175px;
        height: 175px;
    }
}