* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --cor-primaria: #e5e5e5;
    --cor-secundaria: #173557;
    --cor-terciaria: #68813d;
    --cor-terciaria-suave: #d4e0bd;
    --cor-texto: #1a1a1a;
    --cor-texto-suave: #2c2c2c;
    --cor-fundo-pagina: #d1d1d1;
    --cor-rodape: #0e2035;
    --cor-fundo-destaque: #d4dde8;
    --cor-borda: #cccccc;
}

body {
    background-color: var(--cor-fundo-pagina);
    font-family: 'Poppins', sans-serif;
}

.verified-icon {
    width: 15px;
    height: 15px;
    fill: var(--cor-secundaria);
    margin-left: 5px;
    display: inline-flex;
    align-self: center;
    flex-shrink: 0;
}

.ig-container {
    max-width: 935px;
    margin: 0 auto;
    padding: 30px 20px;
}

.ig-header {
    position: relative !important;
    display: flex;
    align-items: flex-start;
    margin-bottom: 44px;
    gap: 80px;
    padding: 20px 0;
    background: transparent;
    z-index: 1;
}

.ig-profile-pic-container {
    flex-shrink: 0;
    margin-left: 20px;
}

.ig-profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cor-borda);
    padding: 4px;
    background-color: var(--cor-primaria);
}

.ig-profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    color: var(--cor-texto);
}

.ig-username-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.ig-username {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--cor-texto);
    display: flex;
    align-items: center;
}

.ig-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 20px;
    list-style: none;
}

.ig-stats li {
    font-size: 1rem;
    color: var(--cor-texto);
}

.ig-stats span {
    font-weight: 600;
}

.ig-display-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--cor-texto);
}

.ig-bio p {
    margin: 0;
    color: var(--cor-texto);
    font-size: 0.95rem;
    line-height: 1.5;
}

.ig-tabs {
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--cor-borda);
    margin-bottom: 0;
}

.ig-tab {
    padding: 15px 30px;
    color: #8e8e8e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid transparent;
    margin-top: -1px;
    transition: color 0.2s ease;
}

.ig-tab.active {
    color: var(--cor-texto);
    border-top: 1px solid var(--cor-texto);
}

.ig-tab:hover {
    color: var(--cor-texto-suave);
}

.ig-tab svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.ig-tab span {
    display: none;
}

.ig-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-top: 10px;
}

.ig-post {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background-color: var(--cor-primaria);
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.ig-post::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.35) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.ig-post:hover {
    transform: scale(0.98);
}

.ig-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s ease;
}

.ig-post:hover img {
    filter: brightness(0.85);
}

.ig-carousel-icon,
.ig-video-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    fill: #fff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
    pointer-events: none;
    z-index: 2;
}

.modal-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 35px;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    transition: color 0.2s;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.close-btn:hover {
    color: #ddd;
}

.modal-content {
    background-color: var(--cor-primaria);
    width: 100%;
    max-width: 1100px;
    height: 85vh;
    border-radius: 16px;
    display: flex;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.carousel-wrapper {
    flex: 1.5;
    background-color: #000;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.modal-photo-count {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 16px;
    z-index: 20;
    font-weight: 600;
    pointer-events: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}

.carousel-slide img,
.carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    outline: none;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 16px;
    color: var(--cor-texto);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.nav-btn:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.05);
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

.post-details {
    width: 350px;
    background-color: var(--cor-primaria);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--cor-borda);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--cor-borda);
}

.post-header img,
.post-caption-block img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--cor-borda);
}

.post-header strong {
    color: var(--cor-texto);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.post-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.post-caption-block {
    display: flex;
    gap: 12px;
}

.post-caption-block img {
    flex-shrink: 0;
}

.post-caption-text {
    font-size: 0.95rem;
    color: var(--cor-texto);
    line-height: 1.5;
}

.post-caption-text strong {
    margin-right: 5px;
    display: inline-flex;
    align-items: center;
}

.post-footer {
    border-top: 1px solid var(--cor-borda);
    padding: 14px 16px;
    background-color: var(--cor-primaria);
}

.post-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.post-actions svg {
    width: 26px;
    height: 26px;
    fill: var(--cor-texto);
    cursor: pointer;
    transition: fill 0.2s;
}

.post-actions svg:hover {
    fill: var(--cor-texto-suave);
}

.post-date {
    font-size: 0.75rem;
    color: #8e8e8e;
    text-transform: uppercase;
    font-weight: 600;
}

.dev-credit {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 0.8rem;
    color: #8e8e8e;
    padding: 30px 20px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.dev-credit:hover {
    color: var(--cor-texto);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .ig-container {
        padding: 10px 0;
    }

    .ig-header {
        display: grid;
        grid-template-columns: 85px 1fr;
        grid-template-areas: "pic username" "pic stats" "bio bio";
        gap: 10px 20px;
        padding: 10px 15px 20px 15px;
        margin-bottom: 0;
    }

    .ig-profile-pic-container {
        grid-area: pic;
        margin: 0;
    }

    .ig-profile-pic {
        width: 85px;
        height: 85px;
    }

    .ig-profile-info {
        display: contents;
    }

    .ig-username-row {
        grid-area: username;
        margin: 0;
        align-self: end;
    }

    .ig-username {
        font-size: 1.2rem;
    }

    .ig-stats {
        grid-area: stats;
        margin: 0;
        gap: 15px;
        justify-content: flex-start;
        align-self: start;
    }

    .ig-stats li {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 0.85rem;
        color: #8e8e8e;
    }

    .ig-stats span {
        color: var(--cor-texto);
        font-size: 1rem;
    }

    .ig-bio {
        grid-area: bio;
        margin-top: 10px;
        font-size: 0.95rem;
    }

    .ig-tabs {
        justify-content: space-around;
        width: 100%;
    }

    .ig-tab {
        padding: 10px;
        flex: 1;
    }

    .ig-grid {
        gap: 4px;
        padding: 4px;
    }

    .ig-post {
        border-radius: 4px;
    }

    .modal-overlay {
        padding: 0;
    }

    .modal-content {
        flex-direction: column;
        height: 100dvh;
        border-radius: 0;
    }

    .carousel-wrapper {
        flex: none;
        height: 50dvh;
    }

    .post-details {
        width: 100%;
        flex: 1;
        border-left: none;
        display: flex;
        flex-direction: column;
    }

    .close-btn {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.5);
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 26px;
        padding-bottom: 3px;
    }

    .modal-photo-count {
        top: 15px;
        left: 15px;
        right: auto;
    }

    .nav-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }
}

.grade-links-sociais {
    display: none;
    flex-direction: column;
    gap: 14px;
    padding: 28px 16px;
    max-width: 580px;
    margin: 0 auto;
    width: 100%;
}

.grade-links-sociais.ativo {
    display: flex;
}

.cartao-link-social {
    display: flex;
    align-items: center;
    padding: 16px 22px;
    background-color: var(--cor-primaria);
    border: 1px solid var(--cor-borda);
    border-radius: 14px;
    text-decoration: none;
    color: var(--cor-texto);
    font-family: 'Poppins', sans-serif;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.cartao-link-social:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.cartao-instagram:hover {
    border-color: #e1306c;
}

.cartao-tiktok:hover {
    border-color: #00f2fe;
}

.cartao-youtube:hover {
    border-color: #ff0000;
}

.cartao-whatsapp:hover {
    border-color: #25d366;
}

.icone-link-social {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 18px;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.detalhes-link-social {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.texto-link-social {
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--cor-texto);
}

.subtexto-link-social {
    font-size: 0.78rem;
    color: #666666;
    margin-top: 1px;
    font-weight: 400;
}

.seta-link-social {
    color: var(--cor-texto-suave);
    opacity: 0.6;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.cartao-link-social:hover .seta-link-social {
    transform: translateX(4px);
    opacity: 1;
}

.botao-alunos {
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

.botao-alunos:hover,
.botao-alunos:hover span {
    color: var(--cor-secundaria) !important;
}

.ig-highlights-container {
    margin-bottom: 24px;
    padding: 0 10px;
    width: 100%;
}

.ig-highlights-scroll {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 8px 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ig-highlights-scroll::-webkit-scrollbar {
    display: none;
}

.ig-highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
}

.ig-highlight-ring {
    width: 77px;
    height: 77px;
    border-radius: 50%;
    padding: 2.5px;
    background: linear-gradient(135deg, #a8a8a8 0%, #d8d8d8 50%, #9e9e9e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.ig-highlight-item:hover .ig-highlight-ring {
    transform: scale(1.04);
    background: linear-gradient(135deg, #787878 0%, #b0b0b0 100%);
}

.ig-highlight-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cor-fundo-pagina);
    background-color: var(--cor-primaria);
}

.ig-highlight-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--cor-texto);
    max-width: 80px;
    text-align: center;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    margin-top: 6px;
}

.modal-overlay-destaques {
    display: none;
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-overlay-destaques.active {
    display: flex;
    opacity: 1;
}

.modal-conteudo-destaque {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 85vh;
    max-height: 820px;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.barra-progresso-historias {
    position: absolute;
    top: 12px;
    left: 10px;
    right: 10px;
    z-index: 30;
    display: flex;
    gap: 4px;
    height: 3px;
}

.trilha-progresso-item {
    flex: 1;
    height: 100%;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 2px;
    overflow: hidden;
}

.preenchimento-progresso-item {
    width: 0%;
    height: 100%;
    background: #ffffff;
    border-radius: 2px;
}

.cabecalho-destaque {
    position: absolute;
    top: 22px;
    left: 12px;
    right: 12px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    pointer-events: none;
}

.info-usuario-destaque {
    display: flex;
    align-items: center;
    gap: 10px;
}

.foto-perfil-destaque {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.texto-usuario-destaque {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.texto-usuario-destaque strong {
    color: #fff;
    font-weight: 600;
}

.texto-usuario-destaque span {
    font-size: 0.75rem;
    opacity: 0.85;
}

.data-historia-destaque {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 6px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.botao-fechar-destaque {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    transition: opacity 0.2s;
    pointer-events: auto;
}

.conteudo-midia-destaque {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

.conteudo-midia-destaque img,
.conteudo-midia-destaque video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.aviso-midia-indisponivel {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 20px;
}

.toque-navegacao {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 35%;
    z-index: 25;
    cursor: pointer;
}

.toque-esquerdo {
    left: 0;
}

.toque-direito {
    right: 0;
}

.botao-nav-destaque {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 35;
    font-size: 14px;
    color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, background 0.2s;
}

.botao-nav-destaque:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.08);
}

.botao-nav-anterior {
    left: 12px;
}

.botao-nav-proximo {
    right: 12px;
}

@media (max-width: 768px) {
    .ig-highlights-container {
        padding: 0 5px;
        margin-bottom: 16px;
    }

    .ig-highlight-ring {
        width: 68px;
        height: 68px;
    }

    .ig-highlight-title {
        font-size: 0.7rem;
    }

    .modal-conteudo-destaque {
        max-width: 100%;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
    }

    .botao-nav-destaque {
        display: none;
    }
}

.etiqueta-localizacao-perfil {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    padding: 3px 8px;
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--cor-texto-suave);
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.etiqueta-localizacao-perfil:hover {
    background-color: rgba(0, 0, 0, 0.08);
    color: var(--cor-secundaria);
}

.etiqueta-localizacao-perfil svg {
    fill: #666666;
    flex-shrink: 0;
    transition: fill 0.2s ease;
}

.etiqueta-localizacao-perfil:hover svg {
    fill: var(--cor-secundaria);
}

.etiqueta-localizacao-story {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: var(--cor-secundaria);
    color: #ffffff;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.2s ease, background-color 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.etiqueta-localizacao-story:hover {
    background: var(--cor-terciaria);
    transform: translateX(-50%) scale(1.05);
}
