/* Ajustes de layout complementares
   Mantem as secoes separadas e evita que o hero/carrossel invada a area Quem Somos. */

.hero {
    min-height: auto;
    overflow: hidden;
    padding-bottom: 150px;
    transform: none !important;
}

.hero-intro {
    padding-top: 10px;
}

.carousel-container {
    height: 620px;
    margin-bottom: 40px;
    padding-top: 20px;
}

.carousel-controls {
    bottom: -25px;
}

.carousel-indicators {
    top: 0;
}

.philosophy-section {
    position: relative;
    z-index: 2;
    padding-top: 150px;
    background: linear-gradient(
        180deg,
        var(--primary-black) 0%,
        rgba(153, 69, 255, 0.02) 50%,
        var(--primary-black) 100%
    );
}

.philosophy-container {
    position: relative;
    z-index: 3;
}

.philosophy-headline,
.philosophy-subheading,
.philosophy-pillars {
    position: relative;
    z-index: 4;
}

/* Cards de tecnologias mais compactos */
.skills-section {
    padding-top: 90px;
}

.skill-categories {
    justify-content: center;
    gap: 16px;
}

.skills-hexagon-grid {
    max-width: 1080px;
    gap: 32px 42px;
    margin-top: 42px;
}

.skill-hexagon {
    width: 180px;
    height: 200px;
}

.hexagon-inner {
    width: 100%;
    height: 100%;
}

.hexagon-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 18px;
    position: relative;
    top: -22px;
    left: -10px;
    transform: rotate(-30deg);
    transform-origin: center;
}

.skill-icon-hex {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    font-size: 42px;
    line-height: 1;
    margin: 0 0 12px;
}

.skill-name-hex {
    width: 100%;
    min-height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 15px;
    line-height: 1.2;
    letter-spacing: 1px;
    margin: 0;
}

.skill-level,
.skill-level-fill,
.skill-percentage-hex {
    display: none !important;
}

@media (max-width: 1024px) {
    .hero {
        padding-bottom: 120px;
    }

    .carousel-container {
        height: 590px;
    }

    .skills-hexagon-grid {
        max-width: 840px;
        gap: 28px 34px;
    }

    .skill-hexagon {
        width: 160px;
        height: 180px;
    }

    .hexagon-content {
        top: -18px;
        left: -8px;
    }
}

@media (max-width: 768px) {
    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        min-width: 0;
    }

    .header {
        position: sticky !important;
        top: 0 !important;
        left: 0;
        right: 0;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 82px !important;
        min-height: 82px !important;
        z-index: 9999;
        overflow: visible !important;
        transform: none !important;
        background: rgba(18, 18, 18, 0.98);
        backdrop-filter: blur(18px);
    }

    .nav-container {
        width: 100% !important;
        max-width: 100% !important;
        height: 82px !important;
        min-height: 82px !important;
        padding: 10px 16px !important;
        display: flex;
        align-items: center;
        overflow: visible !important;
    }

    .logo {
        min-width: 0;
        max-width: calc(100vw - 88px);
        overflow: visible !important;
    }

    .logo-img {
        width: 54px !important;
        height: 54px !important;
        max-width: 54px !important;
        max-height: 54px !important;
        object-fit: contain;
        display: block;
    }

    .logo-icon {
        width: 56px !important;
        height: 56px !important;
        min-width: 56px !important;
        max-width: 56px !important;
        max-height: 56px !important;
        margin-right: 10px !important;
        overflow: visible !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .logo-text {
        font-size: clamp(15px, 4.6vw, 18px);
        letter-spacing: 1.2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .menu-toggle {
        display: flex;
        flex-shrink: 0;
        margin-left: auto;
    }

    .nav-menu {
        position: fixed;
        top: 86px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: calc(100vw - 24px);
        display: none;
        flex-direction: column;
        gap: 4px;
        padding: 14px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 18px;
        background: rgba(18, 18, 18, 0.98);
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        display: block;
        width: 100%;
        padding: 13px 16px;
        text-align: center;
        font-size: 13px;
    }

    .hero,
    .philosophy-section,
    .skills-section,
    .contact-section,
    .footer {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    .hero {
        min-height: auto;
        padding: 32px 16px 64px;
        gap: 22px;
    }

    .hero-intro {
        width: 100%;
        max-width: 100%;
    }

    .hero-eyebrow {
        max-width: 100%;
        font-size: clamp(10px, 2.9vw, 11px);
        letter-spacing: 1.2px;
        padding: 7px 13px;
        margin-bottom: 14px;
        white-space: normal;
    }

    .hero-title {
        max-width: 100%;
        font-size: clamp(27px, 8vw, 36px);
        letter-spacing: 0.7px;
        line-height: 1.07;
        margin-bottom: 18px;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none;
    }

    .hero-subtitle {
        width: 100%;
        max-width: 100%;
        font-size: clamp(14px, 3.7vw, 15px);
        line-height: 1.55;
        margin-bottom: 22px;
        padding: 0 2px;
        overflow-wrap: break-word;
    }

    .hero-actions {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 0;
    }

    .hero-primary-cta,
    .hero-secondary-cta {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 46px;
        padding: 13px 16px;
        font-size: clamp(10.5px, 3vw, 12px);
        letter-spacing: 1px;
        white-space: normal;
        text-align: center;
        margin-left: 0;
        margin-right: 0;
    }

    .carousel-container {
        width: 100%;
        max-width: 100%;
        height: 500px;
        margin-bottom: 0;
        padding-top: 6px;
        perspective: 800px;
        overflow: hidden;
    }

    .carousel-item {
        width: min(280px, calc(100vw - 48px));
        height: 395px;
        max-width: calc(100vw - 48px);
    }

    .carousel-item .card {
        padding: 17px;
        border-radius: 18px;
        overflow: hidden;
    }

    .card-number {
        top: 12px;
        right: 18px;
        font-size: 44px;
    }

    .card-image {
        height: 138px;
        margin-bottom: 13px;
    }

    .card-title {
        font-size: 17px;
        letter-spacing: 0.8px;
        margin-bottom: 9px;
    }

    .card-description {
        font-size: 12.2px;
        line-height: 1.42;
        margin-bottom: 13px;
    }

    .card-tech {
        gap: 6px;
        margin-bottom: 13px;
    }

    .tech-badge {
        font-size: 10px;
        padding: 4px 8px;
    }

    .card-cta {
        width: 100%;
        max-width: 100%;
        padding: 11px 14px;
        font-size: 10.8px;
        letter-spacing: 1px;
        white-space: normal;
    }

    .carousel-controls {
        bottom: -4px;
        gap: 14px;
    }

    .carousel-btn {
        width: 46px;
        height: 46px;
        font-size: 22px;
    }

    .carousel-indicators {
        top: 0;
        gap: 9px;
    }

    .indicator {
        width: 9px;
        height: 9px;
    }

    .philosophy-section {
        padding: 86px 16px 72px;
    }

    .prism-line {
        margin-bottom: 36px;
    }

    .philosophy-headline {
        font-size: clamp(32px, 9vw, 42px);
        letter-spacing: 1px;
        margin-bottom: 20px;
    }

    .philosophy-subheading {
        font-size: 15px;
        line-height: 1.55;
        margin-bottom: 40px;
    }

    .philosophy-pillars {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .pillar {
        padding: 28px 22px;
    }

    .skills-section {
        padding: 82px 14px 70px;
    }

    .section-title {
        font-size: clamp(32px, 9vw, 44px);
        letter-spacing: 1.2px;
        line-height: 1.08;
    }

    .section-subtitle {
        font-size: 14px;
        line-height: 1.45;
        padding: 0 8px;
    }

    .skill-categories {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        margin: 30px auto 0;
    }

    .category-tab {
        width: 100%;
        min-width: 0;
        padding: 12px 8px;
        font-size: clamp(10px, 2.8vw, 11px);
        letter-spacing: 0.8px;
        text-align: center;
        white-space: normal;
    }

    .category-tab:first-child {
        grid-column: 1 / -1;
    }

    .skills-hexagon-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-items: center;
        gap: 26px 14px;
        margin-top: 34px;
        width: 100%;
    }

    .skill-hexagon {
        width: min(132px, 40vw);
        height: min(150px, 45vw);
    }

    .hexagon-content {
        top: -12px;
        left: -6px;
        padding: 18px 12px;
    }

    .skill-icon-hex {
        width: 48px;
        height: 48px;
        font-size: 31px;
        margin-bottom: 8px;
    }

    .skill-name-hex {
        font-size: 11px;
        letter-spacing: 0.5px;
    }

    .contact-section {
        padding: 82px 16px;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 30px;
        width: 100%;
    }

    .contact-info {
        gap: 16px;
    }

    .info-item {
        padding: 18px;
    }

    .contact-form {
        width: 100%;
        padding: 24px 18px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
    }
}

@media (max-width: 420px) {
    .nav-container {
        padding: 9px 14px !important;
    }

    .header,
    .nav-container {
        height: 78px !important;
        min-height: 78px !important;
    }

    .logo-img {
        width: 50px !important;
        height: 50px !important;
        max-width: 50px !important;
        max-height: 50px !important;
    }

    .logo-icon {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        max-width: 52px !important;
        max-height: 52px !important;
    }

    .logo-text {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .nav-menu {
        top: 82px;
    }

    .hero {
        padding-left: 14px;
        padding-right: 14px;
    }

    .hero-title,
    .philosophy-headline,
    .section-title {
        word-break: normal;
    }

    .carousel-item {
        width: min(260px, calc(100vw - 44px));
        height: 382px;
    }

    .carousel-container {
        height: 488px;
    }

    .skills-hexagon-grid {
        gap: 24px 10px;
    }

    .skill-hexagon {
        width: min(124px, 39vw);
        height: min(142px, 44vw);
    }

    .skill-icon-hex {
        font-size: 29px;
    }

    .skill-name-hex {
        font-size: 10.5px;
    }
}

@media (max-width: 360px) {
    .logo-text {
        font-size: 14px;
    }

    .hero-title {
        font-size: 27px;
    }

    .carousel-item {
        width: min(248px, calc(100vw - 36px));
        height: 374px;
    }

    .category-tab {
        font-size: 9.8px;
        padding: 11px 6px;
    }
}
