/* Variáveis de Cor Premium (Dark Mode Tech) */
:root {
    --bg-dark: #0B1120;
    --bg-card: #1E293B;
    --bg-card-hover: #334155;
    --primary-blue: #3B82F6;
    --primary-blue-glow: rgba(59, 130, 246, 0.5);
    --accent-orange: #F97316;
    --accent-orange-hover: #EA580C;
    --accent-orange-glow: rgba(249, 115, 22, 0.4);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --glass-bg: rgba(11, 17, 32, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
}

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

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

html {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-dark);
}

body {
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1536px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ================= TYPOGRAPHY ================= */
h1, h2, h3 { letter-spacing: -0.03em; }

/* ================= NAV ================= */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    z-index: 1000;
    background: transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px 0;
}

.navbar.scrolled {
    padding: 15px 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-content {
    display: flex; justify-content: space-between; align-items: center;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.1;
    cursor: pointer;
}

.logo-text-main {
    font-size: 64px;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -2px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
    line-height: 1;
}

.logo-text-sub {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.nav-links { display: flex; gap: 30px; }
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -4px; left: 0;
    background-color: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--text-main); }
.nav-links a:hover::after { width: 100%; }

/* ================= BUTTONS ================= */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600; font-size: 15px;
    cursor: pointer; border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-orange), #EA580C);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-orange-glow);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px var(--accent-orange-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
    transform: translateY(-3px);
}

/* ================= HERO SECTION ================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex; align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('assets/hero_bg.jpg');
    background-size: cover; background-position: center;
    z-index: 0;
    transform: scale(1.05);
    animation: slowZoom 20s infinite alternate;
}

@keyframes slowZoom {
    0% { transform: scale(1.05); }
    100% { transform: scale(1.1); }
}

.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(11, 17, 32, 0.4) 0%, rgba(11, 17, 32, 0.95) 100%);
    z-index: 1;
}

.hero-content {
    position: relative; z-index: 2;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(3.5rem, 5vw, 6.5rem); line-height: 1.1; margin-bottom: 24px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hero-text h1 span { color: var(--accent-orange); }

.hero-text p {
    font-size: clamp(1.1rem, 1.2vw, 1.4rem); color: var(--text-muted);
    margin-bottom: 40px; max-width: 750px; line-height: 1.7;
}

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

/* Status Card floating in Hero */
.floating-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    transform: translateY(0);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.stat-row { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.stat-icon {
    width: 50px; height: 50px; border-radius: 12px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-blue);
    display: flex; justify-content: center; align-items: center;
    font-size: 24px;
}
.stat-info h4 { font-size: 24px; }
.stat-info p { color: var(--text-muted); font-size: 14px; }

/* ================= SERVIÇOS ================= */
.services { padding: 120px 0; position: relative; }

/* Glow effect behind services */
.glow-blob {
    position: absolute; width: 600px; height: 600px;
    background: radial-gradient(circle, var(--primary-blue-glow) 0%, transparent 70%);
    top: -300px; right: -300px; z-index: 0; pointer-events: none; opacity: 0.5;
}

.section-header { text-align: center; margin-bottom: 80px; position: relative; z-index: 1;}
.section-header h2 { font-size: 3rem; margin-bottom: 15px; }
.section-header p { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

.services-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px; position: relative; z-index: 1;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 40px; border-radius: 24px;
    transition: all 0.4s ease;
    position: relative; overflow: hidden;
}

.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.03));
    opacity: 0; transition: opacity 0.4s;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-blue);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.service-card:hover::before { opacity: 1; }

.service-icon-wrapper {
    width: 60px; height: 60px; border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-blue), #1D4ED8);
    display: flex; justify-content: center; align-items: center;
    font-size: 28px; color: #fff; margin-bottom: 24px;
    box-shadow: 0 10px 20px var(--primary-blue-glow);
}

.service-card h3 { font-size: 1.5rem; margin-bottom: 16px; }
.service-card p { color: var(--text-muted); line-height: 1.7; }

/* ================= FEATURE/SOBRE ================= */
.feature-section { padding: 120px 0; background: #080D18; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }

.image-wrapper {
    position: relative; border-radius: 30px; overflow: hidden;
}
.image-wrapper::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    box-shadow: inset 0 0 0 1px var(--glass-border); border-radius: 30px; pointer-events: none;
}
.logistics-img {
    width: 100%; height: 600px;
    background-image: url('assets/services_bg.png');
    background-size: cover; background-position: center;
    transition: transform 0.7s ease;
}
.image-wrapper:hover .logistics-img { transform: scale(1.05); }

.feature-text h2 { font-size: 3rem; margin-bottom: 24px; line-height: 1.2; }
.feature-text p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.8; margin-bottom: 40px; }

.feature-list { list-style: none; display: grid; gap: 20px; }
.feature-list li {
    display: flex; align-items: center; gap: 20px;
    background: var(--bg-card); padding: 20px; border-radius: 16px;
    border: 1px solid var(--glass-border);
}
.feature-list li i {
    color: var(--accent-orange); font-size: 24px;
    background: rgba(249, 115, 22, 0.1); padding: 12px; border-radius: 12px;
}

/* ================= CTA ================= */
.cta-section {
    padding: 100px 0; text-align: center; position: relative;
    background: url('assets/hero_bg.jpg') center/cover;
    background-attachment: fixed;
}
.cta-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(11, 17, 32, 0.85); backdrop-filter: blur(5px);
}
.cta-content { position: relative; z-index: 2; }
.cta-content h2 { font-size: 3.5rem; margin-bottom: 20px; }
.cta-content p { color: var(--text-muted); font-size: 1.2rem; margin-bottom: 40px; }

/* ================= FOOTER ================= */
.footer { border-top: 1px solid var(--glass-border); padding: 80px 0 30px; background: var(--bg-dark); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 60px; margin-bottom: 60px; }
.footer-brand h3 { font-size: 2rem; background: linear-gradient(to right, var(--text-main), var(--primary-blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 20px; }
.footer-brand p { color: var(--text-muted); line-height: 1.6; max-width: 300px; }
.footer h4 { margin-bottom: 24px; font-size: 1.2rem; }
.footer a { color: var(--text-muted); text-decoration: none; display: block; margin-bottom: 12px; transition: color 0.3s; }
.footer a:hover { color: var(--accent-orange); }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid var(--glass-border); color: #64748B; }

/* ================= MODAL ================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(10px);
    display: flex; justify-content: center; align-items: center;
    z-index: 2000; opacity: 0; visibility: hidden; transition: all 0.4s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-content {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    width: 90%; max-width: 800px; border-radius: 24px; padding: 50px;
    position: relative; transform: scale(0.95) translateY(20px); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.modal-overlay.active .modal-content { transform: scale(1) translateY(0); }

.modal-close {
    position: absolute; top: 24px; right: 24px; background: rgba(255,255,255,0.05);
    border: none; width: 40px; height: 40px; border-radius: 50%;
    color: var(--text-muted); cursor: pointer; transition: all 0.3s;
    display: flex; justify-content: center; align-items: center; font-size: 20px;
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--text-main); transform: rotate(90deg); }

.modal-header { text-align: center; margin-bottom: 40px; }
.modal-header h2 { font-size: 2.5rem; margin-bottom: 10px; }
.modal-header p { color: var(--text-muted); font-size: 1.1rem; }

.modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

.portal-card {
    background: rgba(11, 17, 32, 0.5); border: 1px solid var(--glass-border);
    border-radius: 20px; padding: 40px 30px; text-decoration: none; color: var(--text-main);
    transition: all 0.3s; text-align: center; display: flex; flex-direction: column; align-items: center;
}
.portal-card:hover {
    background: var(--bg-card-hover); border-color: var(--primary-blue);
    transform: translateY(-10px); box-shadow: 0 20px 40px var(--primary-blue-glow);
}
.portal-card.secondary:hover {
    border-color: var(--accent-orange); box-shadow: 0 20px 40px var(--accent-orange-glow);
}

.portal-icon {
    width: 80px; height: 80px; border-radius: 20px;
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(59,130,246,0.05));
    color: var(--primary-blue); display: flex; justify-content: center; align-items: center;
    font-size: 32px; margin-bottom: 24px; border: 1px solid rgba(59,130,246,0.3);
}
.portal-card.secondary .portal-icon {
    background: linear-gradient(135deg, rgba(249,115,22,0.2), rgba(249,115,22,0.05));
    color: var(--accent-orange); border-color: rgba(249,115,22,0.3);
}

.portal-text h3 { font-size: 1.5rem; margin-bottom: 10px; }
.portal-text p { color: var(--text-muted); line-height: 1.5; }

/* ================= ANIMATIONS (OBSERVER) ================= */
.hidden-scroll { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.show-scroll { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 992px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-buttons { justify-content: center; }
    .floating-card { display: none; }
    .feature-grid { grid-template-columns: 1fr; }
    .modal-body { grid-template-columns: 1fr; }
    .logo-text-main { font-size: 48px; }
}
@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .nav-links { display: none; }
    .logo-text-main { font-size: 32px; letter-spacing: -1px; }
    .logo-text-sub { font-size: 11px; letter-spacing: 2px; }
    .nav-actions .btn { padding: 10px 14px; font-size: 13px; }
    .nav-actions .btn span { display: none; } /* Oculta texto, mostra só ícone no telemóvel */
    .hero-text h1 { font-size: 2.2rem; }
    .hero-text p { font-size: 0.95rem; }
    .hero-buttons { flex-direction: column; width: 100%; gap: 10px; }
    .hero-buttons .btn { width: 100%; justify-content: center; }
    .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .container { padding: 0 15px; }
    .logo-text-main { font-size: 24px; }
    .hero-text h1 { font-size: 1.8rem; line-height: 1.1; }
}

/* ================= LOGIN MODAL PREMIUM ================= */

/* Make the modal itself feel more premium */
.modal-content {
    background: linear-gradient(160deg, #141e33 0%, #0f1829 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.modal-header h2 {
    font-size: 2.2rem;
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Input groups */
.input-modern-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-modern-group label {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 18px;
    color: #475569;
    font-size: 15px;
    transition: color 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 17px 18px 17px 50px;
    border-radius: 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #f1f5f9;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.input-wrapper input:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

.input-wrapper input:focus {
    border-color: var(--primary-blue);
    background: rgba(59, 130, 246, 0.06);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.input-wrapper:focus-within i {
    color: var(--primary-blue);
}

.input-wrapper input::placeholder {
    color: rgba(148, 163, 184, 0.4);
    font-size: 14px;
}

/* Divider */
.login-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 6px 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
}

.login-divider span {
    color: #475569;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}
