/* ================================
   PORTAL.CSS — Landing Page SGPC
   Estilos do portal público:
   navbar, hero, features, about,
   contact, footer, floating CTA,
   alert, toggle
================================ */

/* ---- Alert Sucesso ---- */
.alert-sucesso {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.2rem;
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    border-left: 4px solid #10b981;
    border-radius: 8px;
    color: #065f46;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease;
}

.alert-sucesso svg {
    flex-shrink: 0;
    color: #10b981;
}

.alert-sucesso span {
    flex: 1;
}

.alert-sucesso button {
    background: none;
    border: none;
    color: #065f46;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.6;
    padding: 0;
    line-height: 1;
}

.alert-sucesso button:hover {
    opacity: 1;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Toggle Row ---- */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
}

.toggle-row__info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.toggle-row__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #212529;
}

.toggle-row__sub {
    font-size: 0.78rem;
    color: #6c757d;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-switch__track {
    display: block;
    width: 46px;
    height: 26px;
    background: #ced4da;
    border-radius: 999px;
    transition: background 0.2s ease;
    position: relative;
}

.toggle-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.toggle-switch input:checked + .toggle-switch__track {
    background: #198754;
}

.toggle-switch input:checked + .toggle-switch__track::after {
    transform: translateX(20px);
}

/* ---- Reset e variáveis ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4A90E2;
    --primary-dark: #2E5C8A;
    --accent: #50C0E8;
    --background: #FFFFFF;
    --foreground: #1A1A1A;
    --muted: #F5F5F5;
    --muted-foreground: #666666;
    --border: #E5E5E5;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}

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

/* ================================
   NAVBAR
================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border);
}

.navbar.menu-open {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--foreground);
    text-decoration: none;
    white-space: nowrap;
}

.logo-icon {
    width: 50px;
    height: 40px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

.navbar-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.navbar-menu a {
    color: var(--foreground);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-menu a:hover {
    color: var(--primary);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

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

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

.nav-toggle {
    display: none;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    font-size: 1.9rem;
    line-height: 1;
}

/* ================================
   HERO
================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, #F5F5F5, #E8F4F8, #F0F9FF, #E0F7FF);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    overflow: hidden;
    padding: 6rem 2rem 4rem;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease-out;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1000px;
    text-align: center;
    animation: fadeInUp 0.8s ease 0.2s both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.2);
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.8; }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero h1 .highlight {
    color: var(--primary);
}

.hero p {
    font-size: 1.5rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    padding-top: 3rem;
}

.stat-item {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    margin-top: 0.5rem;
}

/* ================================
   SECTIONS
================================ */
.section {
    padding: 6rem 2rem;
}

.section-muted {
    background: var(--muted);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--muted-foreground);
}

/* ================================
   FEATURES
================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: 16px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    counter-increment: feature-counter;
}

.feature-card::before {
    content: counter(feature-counter);
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 3rem;
    color: rgba(74, 144, 226, 0.1);
    font-weight: bold;
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(74, 144, 226, 0.15);
    border-color: var(--primary);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--muted-foreground);
}

/* ================================
   ABOUT
================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.about-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    width: fit-content;
}

.about-content h2 {
    font-size: 2.5rem;
    font-weight: bold;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.check-icon {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

/* ================================
   CONTACT
================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--border);
}

.contact-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.contact-card p {
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.hours-card {
    background: var(--primary);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
}

.hours-card h3 {
    margin-bottom: 0.5rem;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.badge-item {
    font-size: 0.9rem;
    color: var(--muted-foreground);
}

/* ================================
   FOOTER
================================ */
.footer {
    background: var(--foreground);
    color: var(--background);
    padding: 3rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ================================
   FLOATING CTA
================================ */
.floating-cta {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { transform: translateY(100px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.floating-cta.hidden {
    display: none;
}

/* ================================
   RESPONSIVIDADE
================================ */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .navbar-container {
        flex-wrap: wrap;
    }

    .navbar-menu {
        width: 100%;
        display: none;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
        align-items: flex-start;
        background: rgba(255, 255, 255, 0.95);
        border-top: 1px solid var(--border);
    }

    .navbar-menu.open {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

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

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .feature-card::before {
        display: none;
    }

    .floating-cta {
        bottom: 1rem;
        right: 1rem;
    }

    .trust-badges {
        gap: 1rem;
    }
}
