/* ========================================
   LMS Visão Seguros - CSS Global
   Mobile-First Responsive Design
   ======================================== */

/* ========================================
   1. RESET & VARIÁVEIS
   ======================================== */

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

:root {
    /* Paleta de cores baseada em LMS Visão */
    --primary-color: #0066cc;
    --primary-dark: #004d99;
    --primary-light: #3385d6;
    --secondary-color: #00a86b;
    --secondary-dark: #008556;

    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #6a6a6a;
    --text-white: #ffffff;

    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-gray: #e9ecef;
    --bg-dark: #212529;

    --border-color: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --transition: all 0.3s ease;
    --border-radius: 8px;
    --max-width: 1200px;
}

/* ========================================
   2. TIPOGRAFIA & BASE
   ======================================== */

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

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

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

button {
    font-family: var(--font-primary);
    cursor: pointer;
    border: none;
    background: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ========================================
   3. UTILITÁRIOS
   ======================================== */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-medium);
    text-align: center;
    margin-bottom: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

/* ========================================
   4. HEADER
   ======================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.header-top {
    background-color: var(--primary-color);
    color: var(--text-white);
    padding: 8px 0;
    font-size: 0.875rem;
}

.header-top-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.header-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.header-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-white);
}

.header-contact-item:hover {
    opacity: 0.8;
}

.header-social {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--text-white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.social-icon__img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.social-icon__img.instagram {
    width: 20px;
    height: 20px;
}

/* Navbar */

.header-main {
    padding: 16px 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.navbar-brand .logo {
    max-height: 50px;
    width: auto;
}

.navbar-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
}

.hamburger {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

.navbar-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--bg-white);
    padding: 80px 24px 24px;
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
    overflow-y: auto;
}

.navbar-menu.active {
    display: flex;
    flex-direction: column;
    gap: 0;
    right: 0;
}

.navbar-menu li {
    border-bottom: 1px solid var(--border-color);
}

.nav-link {
    display: block;
    padding: 16px 0;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-item-dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 0.75rem;
    margin-left: 4px;
    transition: var(--transition);
}

.dropdown-menu {
    padding-left: 16px;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease, visibility 0.3s;
}

.nav-item-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    max-height: 500px;
}

.dropdown-menu li {
    border: none;
}

.dropdown-menu a {
    padding: 12px 0;
    font-size: 0.938rem;
    color: var(--text-medium);
}

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

.btn-primary-nav {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 24px;
    background-color: var(--secondary-color);
    color: var(--text-white);
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
}

.btn-primary-nav:hover {
    background-color: var(--secondary-dark);
}

/* ========================================
   5. FOOTER
   ======================================== */

.footer {
    background-color: var(--bg-dark);
    color: var(--text-white);
}

.footer-main {
    padding: 60px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.footer-logo {
    max-width: 150px;
    margin-bottom: 16px;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 12px;
}

.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

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

.footer-contact li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.footer-contact .icon {
    font-size: 1.25rem;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-partners {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 40px 0;
}

.partners-title {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-items: center;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

@media (min-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        max-width: 550px;
    }
}

@media (min-width: 1024px) {
    .partners-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        max-width: 700px;
    }
}

.partner-logo {
    max-height: 45px;
    max-width: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0.8;
    transition: var(--transition);
}

.partner-logo:hover {
    opacity: 1;
}

.partner-logo-bg {
    background-color: #ffffff;
    padding: 8px;
    border-radius: 4px;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 24px 0;
}

.footer-bottom-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-legal {
    display: flex;
    gap: 12px;
    align-items: center;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-legal a:hover {
    color: var(--text-white);
}

.separator {
    color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   6. FLOATING ELEMENTS
   ======================================== */

.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

.whatsapp-icon {
    font-size: 2rem;
}

.back-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--text-white);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 999;
    transition: var(--transition);
}

.back-to-top.visible {
    display: flex;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-4px);
}

.back-to-top span {
    font-size: 1.5rem;
}

/* ========================================
   7. FORMULÁRIOS
   ======================================== */

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-control.error {
    border-color: #dc3545;
}

.form-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 4px;
    display: none;
}

.form-error.visible {
    display: block;
}

/* Mensagens de feedback do formulário */
.form-message {
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    display: none;
    animation: slideDown 0.3s ease-out;
}

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

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-left: 4px solid #28a745;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
}

.form-message::before {
    font-weight: bold;
    margin-right: 8px;
}

.form-message.success::before {
    content: "✓ ";
}

.form-message.error::before {
    content: "✕ ";
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    cursor: pointer;
    background-color: var(--bg-white);
}

/* ========================================
   8. CARDS
   ======================================== */

.card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 24px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.card-text {
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ========================================
   9. GRID SYSTEMS
   ======================================== */

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* ========================================
   10. ANIMAÇÕES
   ======================================== */

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

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   11. RESPONSIVE - TABLET (768px+)
   ======================================== */

@media (min-width: 768px) {
    .header-top-content {
        flex-direction: row;
        justify-content: space-between;
    }

    .header-contact {
        flex-direction: row;
        gap: 24px;
    }

    .section {
        padding: 80px 0;
    }

    .section-title {
        font-size: 2.5rem;
    }

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

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 48px;
    }

    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ========================================
   12. RESPONSIVE - DESKTOP (1024px+)
   ======================================== */

@media (min-width: 1024px) {
    .container {
        padding: 0 32px;
    }

    .navbar-toggle {
        display: none;
    }

    .navbar-menu {
        display: flex !important;
        position: static;
        flex-direction: row;
        align-items: center;
        width: auto;
        height: auto;
        padding: 0;
        box-shadow: none;
        gap: 32px;
    }

    .navbar-menu li {
        border: none;
    }

    .nav-link {
        padding: 8px 0;
    }

    .nav-item-dropdown {
        position: relative;
    }

    .nav-item-dropdown .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--bg-white);
        box-shadow: var(--shadow-md);
        padding: 12px 0;
        min-width: 220px;
        border-radius: var(--border-radius);
        margin-top: 8px;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, max-height 0.3s ease;
        pointer-events: none;
    }

    .nav-item-dropdown:hover .dropdown-menu,
    .nav-item-dropdown.show .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 500px;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-item-dropdown:hover .dropdown-arrow,
    .nav-item-dropdown.show .dropdown-arrow {
        transform: rotate(180deg);
    }

    .dropdown-menu li {
        padding: 0 20px;
        border: none !important;
    }

    .dropdown-menu a {
        padding: 10px 0;
        display: block;
    }

    .btn-primary-nav {
        margin-top: 0;
    }

    .section {
        padding: 100px 0;
    }

    .section-title {
        font-size: 3rem;
    }

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

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

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}

/* ========================================
   13. UTILITIES & HELPERS
   ======================================== */

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

.text-left {
    text-align: left;
}

/* ========================================
   14. MOBILE IMPROVEMENTS
   ======================================== */

/* Melhorias para telas pequenas */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 15px;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    /* Ajustes de botões para mobile */
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
        width: 100%;
        max-width: 100%;
    }

    /* Melhorar espaçamento de cards */
    .card {
        margin-bottom: 20px;
    }

    .card-body {
        padding: 20px;
    }

    /* Ajustes de formulários */
    .form-control {
        padding: 10px 12px;
        font-size: 16px; /* Evita zoom no iOS */
    }

    select.form-control {
        font-size: 16px; /* Evita zoom no iOS */
    }

    /* WhatsApp e back-to-top buttons */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        left: 20px;
    }

    /* Ajustes de grid para telas muito pequenas */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Garantir responsividade em orientação paisagem mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-banner {
        min-height: auto;
        padding: 60px 0;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }
}

.text-right {
    text-align: right;
}

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 24px;
}

.mt-32 {
    margin-top: 32px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mb-32 {
    margin-bottom: 32px;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}
