/* Modern Industrial Design System for DS Elétrica & Automação */

:root {
    /* Color Palette - Premium Slate & Cyan/Orange Accent */
    --primary: #0ea5e9;
    --primary-light: #38bdf8;
    --accent: #f59e0b;
    /* Amber/Orange */
    --dark-bg: #020617;
    /* Slate 950 - Deepest black/blue */
    --dark-surface: #0f172a;
    /* Slate 900 */
    --dark-surface-hover: #1e293b;
    /* Slate 800 */
    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --white: #ffffff;
    --gray-border: #1e293b;
    /* Slate 800 */

    /* Glows & Shadows */
    --glow-primary: rgba(14, 165, 233, 0.5);
    --glow-accent: rgba(245, 158, 11, 0.4);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.5);

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --container-width: 1200px;
    --section-padding: 100px 0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
}

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

ul {
    list-style: none;
}

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

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: var(--section-padding);
}

.text-gradient {
    background: linear-gradient(90deg, #f8fafc, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.2);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--glow-primary);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary-light);
}

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

.btn-whatsapp {
    background: #25D366;
    color: white;
    font-size: 0.9rem;
    padding: 10px 20px;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

.btn-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    font-size: 0.9rem;
    padding: 10px 20px;
}

.btn-instagram:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 39, 67, 0.4);
}

.btn-whatsapp-lg {
    background: #25D366;
    color: white;
    font-size: 1.2rem;
    padding: 18px 40px;
}

.btn-whatsapp-lg:hover {
    transform: scale(1.05);
}

.btn-block {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 90px;
    background: #000000;
    z-index: 1000;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Glassmorphism Generic Utility */
.glass-panel {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-glass);
    border-radius: 16px;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    height: 90px;
    max-width: 280px;
    /* Largura média para não invadir o menu */
    overflow: hidden;
    /* Corta as margens brancas da imagem que passarem disso */
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    height: 220px;
    /* Força a imagem a ficar gigante (Zoom In) */
    width: auto;
    max-width: none;
    /* Permite que a imagem ultrapasse o limite para ser cortada */
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-list a {
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-list a:hover {
    color: var(--primary-light);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    font-size: 0.9rem;
    padding: 10px 20px;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

.btn-whatsapp-lg {
    background: #25D366;
    color: white;
    font-size: 1.2rem;
    padding: 18px 40px;
}

.hero {
    height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 90px;
    overflow: hidden;
}

.hero video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -1;
    /* Forçar para trás de tudo */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.2));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

.hero-title {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.9);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #e2e8f0;
    margin-bottom: 20px;
    max-width: 600px;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.7);
}

.hero-actions {
    display: flex;
    gap: 20px;
}

/* Services */
.services {
    padding: var(--section-padding);
    background-color: var(--dark-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--primary);
    margin: 0 auto 20px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.service-card {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(14, 165, 233, 0.15);
    background: rgba(30, 41, 59, 0.8);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 86, 179, 0.1);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 25px;
}

.service-image {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.service-card:hover .service-image img {
    transform: scale(1.08);
    /* Zoom out effect over photo */
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-muted);
}

/* Differentials */
.differentials {
    padding: var(--section-padding);
    background: #0A0A0A;
}

.diff-list {
    margin-top: 40px;
}

.diff-list li {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.icon-accent {
    color: var(--accent);
    flex-shrink: 0;
}

.diff-image img {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.cta-banner {
    padding: 80px 0;
    background: #0f172a;
    /* Slate 900 sólido */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.cta-banner h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.cta-banner p {
    margin-bottom: 30px;
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Sectors Section */
.sectors {
    padding: var(--section-padding);
    background-color: var(--dark-bg);
}

.sectors-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.sector-item {
    background: var(--dark-surface);
    padding: 20px 30px;
    border-radius: 50px;
    border: 1px solid var(--gray-border);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition-smooth);
}

.sector-item:hover {
    border-color: var(--primary);
    background: rgba(0, 86, 179, 0.1);
    transform: translateY(-5px);
}

.sector-item i {
    color: var(--primary-light);
    width: 20px;
}

.sector-item span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* About */
.about {
    padding: var(--section-padding);
}

.tag {
    color: var(--primary-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    margin-bottom: 10px;
    display: inline-block;
}

.about-image img {
    border-radius: 20px;
}

/* Contact */
.contact {
    padding: var(--section-padding);
    background: var(--dark-surface);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    margin-top: 60px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.info-item i,
.info-item svg {
    color: var(--primary-light);
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.info-item h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.info-item p {
    display: none;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px;
    background: var(--dark-bg);
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    color: white;
    outline: none;
    transition: var(--transition-smooth);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
}

/* Footer */
.footer {
    padding: 80px 0 20px;
    background: #050505;
    border-top: 1px solid var(--gray-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer h3 {
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-links li,
.footer-services li {
    margin-bottom: 12px;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--gray-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 991px) {

    .grid-2,
    .contact-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero {
        height: auto;
        min-height: 80vh;
        padding-bottom: 60px;
    }

    .hero-title {
        font-size: 2.6rem;
    }

    .nav {
        display: none;
    }

    .nav.nav-active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--dark-surface);
        padding: 20px;
        border-bottom: 1px solid var(--gray-border);
    }

    .nav.nav-active .nav-list {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .header-cta .btn-whatsapp,
    .header-cta .btn-instagram,
    .hide-mobile {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: block;
    }
}

@media (max-width: 576px) {
    .hero {
        padding-top: 130px;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================= */
/* --- CALCULATOR PAGE STYLES --- */
/* ========================================= */
.calculator-page {
    background: #000000;
}

.calculator-container {
    background: var(--dark-surface);
    border: 1px solid var(--gray-border);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    margin-bottom: 40px;
}

/* Tabs */
.calc-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--gray-border);
    padding-bottom: 10px;
    overflow-x: auto;
}

.calc-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.calc-tab-btn:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.calc-tab-btn.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.4);
}

/* Content */
.calc-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.calc-content.active {
    display: block;
}

.calc-section-h {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--gray-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.calc-section-h i {
    color: var(--primary);
}

/* Inputs & Grid */
.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.calc-field {
    display: flex;
    flex-direction: column;
}

.calc-field label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.calc-field input,
.calc-field select {
    background: #111;
    border: 1px solid #333;
    color: var(--white);
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s;
}

.calc-field input:focus,
.calc-field select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.2);
}

/* Buttons */
.calc-btn-exec {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 18px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    margin-top: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(214, 119, 0, 0.4);
}

.calc-btn-exec:hover {
    background: #e68a00;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(214, 119, 0, 0.6);
}

/* Results Formatting */
.calc-results {
    margin-top: 40px;
    display: none;
}

.calc-res-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.calc-res-card {
    background: #151515;
    border: 1px solid #2a2a2a;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border-left: 4px solid var(--primary);
    transition: transform 0.3s ease;
}

.calc-res-card:hover {
    transform: translateY(-5px);
    border-left-color: var(--accent);
}

.calc-res-card small {
    display: block;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.calc-res-card span {
    display: block;
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.calc-pdf-actions {
    display: flex;
    gap: 15px;
}

/* Guide Styles */
.calc-guide-section {
    margin-bottom: 40px;
}

.calc-guide-card {
    background: var(--dark-surface);
    border: 1px solid var(--gray-border);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.calc-guide-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    color: var(--primary-light);
}

.calc-guide-header h2 {
    font-size: 1.6rem;
    margin: 0;
    color: #fff;
    font-weight: 700;
}

.calc-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.guide-step {
    background: #111;
    padding: 25px;
    border-radius: 10px;
    border-top: 4px solid var(--primary);
    transition: var(--transition-smooth);
}

.guide-step:hover {
    transform: translateY(-5px);
    border-top-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.guide-step h3 {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guide-step p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 15px;
}

.guide-step ul {
    list-style: none;
    padding: 0;
}

.guide-step li {
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-bottom: 8px;
    display: flex;
    align-items: start;
}

.guide-step li::before {
    content: '•';
    color: var(--primary);
    font-weight: bold;
    margin-right: 8px;
}

/* Compact Service Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.service-card {
    background: var(--dark-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 35px 25px;
    border-radius: 16px;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-light);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 15px rgba(14, 165, 233, 0.1);
}

.service-icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid rgba(14, 165, 233, 0.2);
    transition: var(--transition-smooth);
}

.service-card:hover .service-icon-wrapper {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 20px var(--glow-primary);
}

.service-card h3 {
    font-size: 1.35rem;
    color: var(--white);
    margin-bottom: 15px;
    font-weight: 700;
}

.service-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

/* --- Portfolio Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox img {
    max-width: 95%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    animation: lightboxZoom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.lightbox-close:hover {
    opacity: 1;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.portfolio-item img {
    cursor: zoom-in !important;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease !important;
}

.portfolio-item:hover img {
    transform: scale(1.08) !important;
    filter: brightness(1.15);
}