/* ===================================
   Apple-Inspired Design System
   GG Serviços - Premium Tech Website
   =================================== */

/* CSS Variables */
:root {
    /* Colors - Minimalist Palette */
    --color-primary: #1d1d1f;
    --color-secondary: #86868b;
    --color-accent: #0071e3;
    --color-accent-hover: #0077ed;
    --color-bg: #ffffff;
    --color-bg-alt: #f5f5f7;
    --color-text: #1d1d1f;
    --color-text-light: #86868b;
    --color-border: #d2d2d7;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 80px;
    --spacing-xxl: 120px;

    /* Layout */
    --container-wide: 1200px;
    --container-narrow: 800px;
    --nav-height: 48px;

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: 17px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

/* Container Utilities */
.container-wide {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===================================
   Navigation
   =================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background: rgba(6, 26, 73, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background: rgba(6, 26, 73, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-container {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    padding: 10px 0;
}

.nav-logo .logo-img {
    height: 60px;
    width: auto;
    transition: var(--transition-smooth);
}

.nav-menu {
    display: flex;
    gap: var(--spacing-lg);
    list-style: none;
    align-items: center;
}

.nav-link {
    font-size: 14px;
    font-weight: var(--font-weight-regular);
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: rgba(255, 255, 255, 1);
}

.nav-cta {
    background: var(--color-accent);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
}

.nav-cta:hover {
    background: var(--color-accent-hover);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: white;
    transition: var(--transition-smooth);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ===================================
   Hero Section
   =================================== */

.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 0;
    background: #f8f9fa;
    position: relative;
    margin-top: 90px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 50%;
    height: 100%;
    background: url('../images/hero-professional.jpg') center center/cover;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
    padding: var(--spacing-xxl) var(--spacing-xl);
    text-align: left;
    z-index: 2;
    position: relative;
}

.hero-title {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--color-text-light);
    font-weight: var(--font-weight-regular);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-start;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--spacing-lg);
    left: 25%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--color-text-light);
    font-size: 24px;
    z-index: 2;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* Fade-in animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.fade-in-delay {
    opacity: 0;
    animation: fadeIn 1s ease 0.3s forwards;
}

.fade-in-delay-2 {
    opacity: 0;
    animation: fadeIn 1s ease 0.6s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ===================================
   Buttons
   =================================== */

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 113, 227, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}

.btn-secondary:hover {
    background: var(--color-accent);
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 17px;
}

/* ===================================
   Feature Highlight
   =================================== */

.feature-highlight {
    padding: 0;
    background: white;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    width: 100%;
    height: 400px;
}

.feature-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
}

/* Background images for each feature - horizontal orientation */
.feature-item:nth-child(1) {
    background: url('../images/feature-security.jpg') center center/cover;
    background-position: center 35%;
}

.feature-item:nth-child(2) {
    background: url('../images/feature-performance.jpg') center center/cover;
    background-position: center 45%;
}

.feature-item:nth-child(3) {
    background: url('../images/feature-support.jpg') center center/cover;
    background-position: center 40%;
}

/* Overlay that becomes transparent on hover */
.feature-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(6, 26, 73, 0.8);
    transition: var(--transition-smooth);
    z-index: 1;
}

.feature-item:hover::before {
    background: rgba(6, 26, 73, 0.15);
}

/* Content container */
.feature-item>* {
    position: relative;
    z-index: 2;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-lg);
}

.feature-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--spacing-md);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    transition: var(--transition-smooth);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.feature-item:hover .feature-icon {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: scale(1.15);
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.4);
}

.feature-item h3 {
    font-size: 22px;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-xs);
    color: white;
    transition: var(--transition-smooth);
}

.feature-item:hover h3 {
    color: var(--color-text);
    transform: translateY(-5px);
}

.feature-item p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    transition: var(--transition-smooth);
    max-width: 280px;
}

.feature-item:hover p {
    color: var(--color-text-light);
}

/* ===================================
   Solutions Grid (Bento)
   =================================== */

.solutions-overview {
    padding: var(--spacing-xxl) 0;
    background: white;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 280px);
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.bento-item {
    border-radius: 24px;
    padding: var(--spacing-lg);
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background-size: cover;
    background-position: center;
}

/* Background Images for Bento */
.bento-item:nth-child(1) {
    background-image: url('../images/bento-cftv.jpg');
}

.bento-item:nth-child(2) {
    background-image: url('../images/bento-cabling.jpg');
}

.bento-item:nth-child(3) {
    background-image: url('../images/bento-fiber.jpg');
}

.bento-item:nth-child(4) {
    background-image: url('../images/bento-alarm.jpg');
}

.bento-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(1, 6, 20, 0.9) 0%, rgba(1, 6, 20, 0.2) 60%, transparent 100%);
    z-index: 1;
    transition: var(--transition-smooth);
}

.bento-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.bento-item:hover::before {
    background: linear-gradient(to top, rgba(1, 6, 20, 0.95) 0%, rgba(1, 6, 20, 0.4) 60%, transparent 100%);
}

.bento-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-item.medium {
    grid-column: span 2;
}

.bento-icon {
    position: absolute;
    top: var(--spacing-lg);
    left: var(--spacing-lg);
    font-size: 32px;
    color: white;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bento-content {
    position: relative;
    z-index: 2;
}

.bento-content h3 {
    font-size: 22px;
    margin-bottom: 8px;
    color: white;
    font-weight: var(--font-weight-semibold);
}

.bento-content p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    font-size: 14px;
}

/* Fix for narrow boxes */
.bento-item:not(.large) h3 {
    font-size: 18px;
}

/* ===================================
   Differentiators Section
   =================================== */

.differentiators {
    padding: var(--spacing-xxl) 0;
    background: #f5f5f7;
}

.diff-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.diff-item {
    background: white;
    padding: var(--spacing-xl);
    border-radius: 24px;
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.diff-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.diff-item i {
    color: var(--color-accent);
    font-size: 32px;
    margin-bottom: var(--spacing-md);
    display: block;
}

.diff-item h4 {
    font-size: 20px;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}

.diff-item p {
    font-size: 15px;
    color: var(--color-text-light);
    line-height: 1.6;
}

/* ===================================
   Segments Section
   =================================== */

.segments {
    padding: var(--spacing-xxl) 0;
    text-align: center;
    background: white;
}

.segments-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.segment-tag {
    padding: 14px 28px;
    background: #f0f2f5;
    border-radius: 50px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    transition: var(--transition-smooth);
    font-size: 15px;
    border: 1px solid transparent;
}

.segment-tag:hover {
    background: var(--color-accent);
    color: white;
    transform: translateY(-3px);
}

/* ===================================
   Solutions Section
   =================================== */

.solutions {
    background: white;
}

.solution-block {
    padding: var(--spacing-xxl) 0;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.solution-block.visible {
    opacity: 1;
    transform: translateY(0);
}

.solution-block:nth-child(even) {
    background: var(--color-bg-alt);
}

.solution-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.solution-reverse {
    display: block;
    /* Placeholder to keep the class available for future specific styling */
}


.solution-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
}

.solution-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.solution-description {
    font-size: 18px;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.solution-features {
    list-style: none;
    margin-bottom: var(--spacing-md);
}

.solution-features li {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    font-size: 16px;
    color: var(--color-text);
}

.solution-features i {
    color: var(--color-accent);
    font-size: 14px;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--color-accent);
    font-weight: var(--font-weight-medium);
    font-size: 16px;
}

.link-arrow:hover {
    gap: 12px;
}

.link-arrow i {
    transition: var(--transition-smooth);
}

.solution-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.placeholder-visual {
    width: 100%;
    aspect-ratio: 1;
    background: var(--color-bg-alt);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: var(--color-border);
}

/* ===================================
   About Section
   =================================== */

.about {
    padding: var(--spacing-xxl) 0;
    background: white;
}

.about-content {
    text-align: center;
}

.section-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    color: var(--color-accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.section-text {
    font-size: 18px;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.stat-item {
    text-align: center;
    opacity: 0;
    transform: scale(0.9);
    transition: var(--transition-smooth);
}

.stat-item.visible {
    opacity: 1;
    transform: scale(1);
}

.stat-number {
    font-size: 56px;
    font-weight: var(--font-weight-bold);
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 15px;
    color: var(--color-text-light);
}

/* ===================================
   CTA Section
   =================================== */

.cta-section {
    padding: var(--spacing-xxl) 0;
    background: var(--color-bg-alt);
    text-align: center;
}

.cta-title {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.cta-text {
    font-size: 20px;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===================================
   Footer
   =================================== */

.footer {
    background: #dadada;
    color: #061a49;
    padding: var(--spacing-xl) 0 var(--spacing-md);
    border-top: 1px solid rgba(6, 26, 73, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-logo {
    height: 48px;
    width: auto;
    margin-bottom: var(--spacing-sm);
    display: block;
}

.footer-text {
    font-size: 14px;
    opacity: 0.8;
}

.footer-col h4 {
    color: #061a49;
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-sm);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-col a {
    font-size: 14px;
    opacity: 0.8;
    color: #061a49;
    transition: var(--transition-smooth);
}

.footer-col a:hover {
    opacity: 1;
    color: var(--color-accent);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(6, 26, 73, 0.1);
}

.footer-bottom p {
    font-size: 12px;
    opacity: 0.6;
    color: #061a49;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 992px) {

    .solution-content,
    .solution-reverse .solution-content {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .solution-reverse .solution-image {
        order: 2;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 90px;
        right: -100%;
        width: 100%;
        max-width: 300px;
        height: calc(100vh - 90px);
        background: rgba(6, 26, 73, 0.98);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--spacing-md);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
        transition: right 0.3s ease;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu.active {
        right: 0;
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-bottom: var(--spacing-xl);
    }

    .hero::before {
        position: relative;
        width: 100%;
        height: 400px;
        order: 2;
    }

    .hero-content {
        padding: var(--spacing-lg) var(--spacing-md);
        text-align: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .scroll-indicator {
        left: 50%;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        height: auto;
    }

    .bento-item {
        height: 250px;
    }

    .bento-item.large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .bento-item.medium {
        grid-column: span 2;
    }

    .stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-item,
    .bento-item.large,
    .bento-item.medium {
        grid-column: span 1;
        grid-row: span 1;
        height: 220px;
    }
}