/* ==========================================
   BRAVO INSTALAÇÕES - FUTURISTIC FIBER OPTICS CSS
   ========================================== */

:root {
    --bg-dark: #040814;
    --bg-cyber: #080e21;
    --fiber-cyan: #00f0ff;
    --fiber-blue: #0077ff;
    --fiber-purple: #8a2be2;
    --fiber-glow: rgba(0, 240, 255, 0.4);
    --fiber-border: rgba(0, 240, 255, 0.3);
    
    --glass-cyber: rgba(8, 14, 33, 0.85);
    --glass-hover: rgba(12, 22, 50, 0.95);
    
    --text-neon: #e0f7fc;
    --text-cyan: #00f0ff;
    --text-muted: #849cbd;
    
    --radius-capsule: 50px;
    --radius-card: 24px;
    
    --shadow-fiber: 0 0 25px rgba(0, 240, 255, 0.3), inset 0 0 15px rgba(0, 240, 255, 0.1);
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-neon);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 15px 40px;
    background-image: 
        linear-gradient(180deg, rgba(4, 8, 20, 0.75) 0%, rgba(8, 14, 33, 0.92) 100%),
        url('fiber_bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

/* Glowing Fiber Animated Lines Background */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 240, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(138, 43, 226, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Top Nav */
.top-nav {
    width: 100%;
    max-width: 500px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 10px;
    z-index: 10;
}

.nav-btn {
    background: rgba(10, 20, 45, 0.8);
    border: 1px solid var(--fiber-border);
    color: var(--text-neon);
    padding: 10px 16px;
    border-radius: var(--radius-capsule);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(16px);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.nav-btn:hover {
    background: var(--glass-hover);
    border-color: var(--fiber-cyan);
    box-shadow: 0 0 15px var(--fiber-glow);
    transform: translateY(-2px);
    color: #fff;
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--fiber-blue), var(--fiber-purple));
    color: #fff;
    border-color: var(--fiber-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

/* Main Container */
.main-wrapper {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

/* Digital Card Container - Fiber Optics Theme */
.digital-card-container {
    width: 100%;
    background: var(--glass-cyber);
    border: 1px solid var(--fiber-border);
    border-radius: var(--radius-card);
    padding: 30px 24px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-fiber), 0 20px 50px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Fiber Light Border Beam */
.digital-card-container::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 300%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--fiber-cyan), var(--fiber-purple), var(--fiber-cyan), transparent);
    animation: fiberBeam 4s linear infinite;
}

@keyframes fiberBeam {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(50%); }
}

/* Banner / Logo Area */
.logo-header {
    margin-bottom: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--fiber-cyan), transparent);
    box-shadow: 0 0 10px var(--fiber-cyan);
}

.logo-img {
    max-height: 105px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.4));
    transition: transform 0.4s ease;
}

.logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 25px rgba(0, 240, 255, 0.7));
}

/* Profile Section */
.profile-info {
    margin-bottom: 25px;
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
    margin-bottom: 4px;
}

.profile-title {
    font-size: 1rem;
    color: var(--fiber-cyan);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.company-tag {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 1px;
}

/* Fiber Capsule Action Buttons */
.action-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 25px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 14px 22px;
    background: linear-gradient(135deg, rgba(12, 25, 55, 0.8), rgba(6, 12, 28, 0.95));
    border: 1px solid var(--fiber-border);
    border-radius: var(--radius-capsule);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.25), transparent);
    transition: left 0.5s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    border-color: var(--fiber-cyan);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.4), inset 0 0 10px rgba(0, 240, 255, 0.2);
    transform: translateY(-3px) scale(1.01);
    color: #ffffff;
}

.action-btn .btn-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 6px var(--fiber-cyan));
}

.action-btn.btn-whatsapp {
    border-color: rgba(37, 211, 102, 0.4);
    background: linear-gradient(135deg, rgba(10, 50, 25, 0.8), rgba(6, 12, 28, 0.95));
}

.action-btn.btn-whatsapp:hover {
    border-color: #25d366;
    box-shadow: 0 0 25px rgba(37, 211, 102, 0.5), inset 0 0 10px rgba(37, 211, 102, 0.2);
}

.action-btn.btn-vcard {
    background: linear-gradient(135deg, var(--fiber-blue), var(--fiber-purple));
    border: 1px solid var(--fiber-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    justify-content: center;
}

.action-btn.btn-vcard:hover {
    background: linear-gradient(135deg, #0055ff, #a020f0);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
}

/* Services / 4 Pillars Grid */
.services-section {
    width: 100%;
    text-align: left;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 240, 255, 0.2);
}

.services-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--fiber-cyan);
    margin-bottom: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none;
}

.service-badge {
    background: rgba(10, 20, 45, 0.7);
    border: 1px solid rgba(0, 240, 255, 0.2);
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.85rem;
    color: #f0f8ff;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-badge:hover {
    background: rgba(16, 32, 70, 0.9);
    border-color: var(--fiber-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
    transform: translateX(4px);
}

/* QR Code Container */
.qr-box {
    margin-top: 25px;
    background: rgba(6, 12, 28, 0.8);
    border: 1px dashed var(--fiber-border);
    padding: 18px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
}

.qr-canvas-container {
    background: #ffffff;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.qr-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Print View */
.print-card-wrapper {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
}

.physical-card {
    width: 340px;
    height: 190px;
    border-radius: 16px;
    background: #060c1c;
    border: 1px solid var(--fiber-border);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    color: #fff;
    background-image: linear-gradient(135deg, #060c1c 0%, #0f1c3f 100%);
}

.card-label {
    font-size: 0.85rem;
    color: var(--fiber-cyan);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-front {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.card-front .logo-img {
    max-height: 75px;
    margin-bottom: 8px;
}

.card-front .slogan {
    font-size: 0.75rem;
    color: var(--fiber-cyan);
    letter-spacing: 1px;
    text-shadow: 0 0 6px rgba(0,240,255,0.4);
}

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

.card-back-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.card-back-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.card-back-role {
    font-size: 0.8rem;
    color: var(--fiber-cyan);
    font-weight: 600;
    margin-bottom: 6px;
}

.card-back-contact {
    font-size: 0.72rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-back-qr {
    background: #fff;
    padding: 6px;
    border-radius: 8px;
}

/* Edit Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(4, 8, 20, 0.88);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: var(--bg-cyber);
    border: 1px solid var(--fiber-border);
    border-radius: var(--radius-card);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px;
    box-shadow: 0 0 35px rgba(0, 240, 255, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 1.2rem;
    color: var(--fiber-cyan);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--fiber-cyan);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-control {
    background: rgba(10, 20, 45, 0.8);
    border: 1px solid var(--fiber-border);
    border-radius: 12px;
    padding: 10px 14px;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--fiber-cyan);
    box-shadow: 0 0 10px var(--fiber-glow);
}

/* Print Rules */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
        padding: 0 !important;
    }

    .top-nav, .digital-card-container, .card-label, .modal-overlay, .qr-box {
        display: none !important;
    }

    .print-card-wrapper {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 20mm !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 10mm !important;
    }

    .physical-card {
        width: 90mm !important;
        height: 50mm !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        page-break-inside: avoid;
        background: #060c1c !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
