/* ============================================
   Rastreador de Frota - Custom Styles
   ============================================ */

/* Base Styles */
* {
    box-sizing: border-box;
}

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

/* Critical: Force comparison section to be responsive */
@media (max-width: 768px) {
    section.comparison-section .container div[style*="max-width"] .comparison-grid,
    .comparison-section .comparison-grid,
    div.comparison-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    section.comparison-section .container div[style*="max-width"] .comparison-card,
    .comparison-section .comparison-card,
    div.comparison-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    section.comparison-section .container div[style*="max-width"] .comparison-grid,
    .comparison-section .comparison-grid,
    div.comparison-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    section.comparison-section .container div[style*="max-width"] .comparison-card,
    .comparison-section .comparison-card,
    div.comparison-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}

/* Video Container Responsive */
.video-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.video-container iframe {
    border: none;
    display: block;
}

/* Mobile Footer Fixed */
.mobile-footer-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    background: #fff;
    padding: 12px 16px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    box-sizing: border-box;
}

.mobile-footer-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 100%;
}

.mobile-footer-buttons a {
    flex: 1;
    min-width: 0;
    background: #1e3a8a;
    color: #fff;
    padding: 14px 8px;
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.mobile-footer-buttons a.btn-whatsapp {
    background: #25D366;
}

/* Comparison Section Mobile Responsive */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.comparison-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.comparison-card h3 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.comparison-card ul {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.comparison-card li {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.comparison-card li span {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Force mobile layout - override inline styles */
.comparison-section > .container > div[style*="max-width"] {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* ============================================
   Media Queries - Tablet (768px)
   ============================================ */
@media (max-width: 768px) {
    .mobile-footer-fixed {
        display: block;
    }
    
    body {
        padding-bottom: 80px;
    }
    
    /* Comparison Section - Force single column */
    .comparison-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto !important;
        gap: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Force order: Sem Rastreador first, Com Rastreador second */
    .comparison-card:first-child {
        order: 1 !important;
    }
    
    .comparison-card:last-child {
        order: 2 !important;
    }
    
    .comparison-section {
        padding: 60px 0 !important;
        overflow-x: hidden !important;
    }
    
    .comparison-section .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .comparison-section h2 {
        font-size: 32px !important;
        word-wrap: break-word !important;
        line-height: 1.3 !important;
    }
    
    .comparison-section p {
        font-size: 18px !important;
    }
    
    .comparison-card {
        padding: 30px 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        overflow-x: hidden !important;
    }
    
    .comparison-card h3 {
        font-size: 24px !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        line-height: 1.3 !important;
    }
    
    .comparison-card ul {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .comparison-card li {
        font-size: 15px !important;
        padding: 10px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .comparison-card li span {
        flex: 1 !important;
        min-width: 0 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
    }
    
    /* Override inline styles in mobile */
    .comparison-section > .container > div[style*="max-width"] {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 10px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    .comparison-card[style*="padding: 40px"] {
        padding: 30px 20px !important;
    }
    
    /* Container improvements */
    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 60px 0 50px !important;
    }
    
    .hero-content {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .hero-image {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .hero-image .video-container {
        width: 100% !important;
        max-width: 100% !important;
        padding-bottom: 56.25% !important;
    }
    
    .hero-image h3 {
        font-size: 20px !important;
        margin-bottom: 16px !important;
    }
    
    .hero-image p {
        font-size: 13px !important;
        margin-top: 12px !important;
    }
    
    .hero-title {
        font-size: 32px !important;
        line-height: 1.3 !important;
        margin-bottom: 20px !important;
    }
    
    .hero-subtitle {
        font-size: 18px !important;
        line-height: 1.6 !important;
        margin-bottom: 28px !important;
    }
    
    .hero-cta {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .hero-cta a {
        width: 100% !important;
        padding: 16px 24px !important;
        font-size: 16px !important;
        justify-content: center !important;
        text-align: center !important;
    }
    
    .privacy-badge {
        margin-top: 20px !important;
        font-size: 13px !important;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .stats-grid > div {
        padding: 16px !important;
    }
    
    /* Section Headers */
    .section-header {
        margin-bottom: 40px !important;
        padding: 0 10px !important;
    }
    
    .section-header h2 {
        font-size: 32px !important;
        line-height: 1.3 !important;
        margin-bottom: 12px !important;
    }
    
    .section-header p {
        font-size: 18px !important;
        line-height: 1.6 !important;
    }
    
    /* Grid Sections - Force single column on mobile */
    div[style*="grid-template-columns: repeat"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Cards and boxes */
    [style*="padding: 40px"] {
        padding: 30px 20px !important;
    }
    
    [style*="padding: 30px"] {
        padding: 24px 18px !important;
    }
    
    /* Buttons */
    .btn, a[class*="btn"] {
        padding: 16px 24px !important;
        font-size: 16px !important;
        border-radius: 10px !important;
    }
    
    /* Lists */
    ul, ol {
        padding-left: 20px !important;
    }
    
    li {
        margin-bottom: 8px !important;
        line-height: 1.6 !important;
    }
    
    /* Padding adjustments */
    section {
        padding: 50px 0 !important;
    }
    
    /* Text improvements */
    p {
        line-height: 1.7 !important;
        margin-bottom: 16px !important;
    }
    
    h3 {
        line-height: 1.4 !important;
        margin-bottom: 16px !important;
    }
    
    /* Touch-friendly improvements */
    a, button, input[type="submit"], input[type="button"] {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    /* Improve text alignment */
    .text-center {
        text-align: center !important;
    }
    
    /* Better spacing for cards */
    [style*="border-radius: 16px"], [style*="border-radius: 20px"] {
        margin-bottom: 20px !important;
    }
    
    /* Improve form spacing */
    form {
        gap: 16px !important;
    }
    
    .form-group, form > div {
        margin-bottom: 16px !important;
    }
    
    /* Better icon spacing */
    [style*="font-size: 48px"], [style*="font-size: 56px"] {
        margin-bottom: 16px !important;
    }
    
    /* Improve badge spacing */
    [style*="border-radius: 20px"][style*="display: inline-block"] {
        margin-bottom: 16px !important;
    }
}

/* ============================================
   Media Queries - Mobile (480px)
   ============================================ */
@media (max-width: 480px) {
    .mobile-footer-buttons a {
        font-size: 12px;
        padding: 12px 6px;
    }
    
    /* Comparison Section */
    .comparison-section {
        padding: 40px 0 !important;
        overflow-x: hidden !important;
    }
    
    .comparison-section .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    .comparison-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto !important;
        gap: 16px !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Force order: Sem Rastreador first, Com Rastreador second */
    .comparison-card:first-child {
        order: 1 !important;
    }
    
    .comparison-card:last-child {
        order: 2 !important;
    }
    
    .comparison-section h2 {
        font-size: 28px !important;
        word-wrap: break-word !important;
        line-height: 1.3 !important;
    }
    
    .comparison-card {
        padding: 24px 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }
    
    .comparison-card h3 {
        font-size: 20px !important;
        margin-bottom: 20px !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        line-height: 1.3 !important;
    }
    
    .comparison-card ul {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .comparison-card li {
        font-size: 14px !important;
        padding: 8px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        line-height: 1.5 !important;
    }
    
    .comparison-card li span {
        flex: 1 !important;
        min-width: 0 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
    }
    
    /* Override inline styles in mobile */
    .comparison-section > .container > div[style*="max-width"] {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 8px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    .comparison-card[style*="padding: 40px"] {
        padding: 24px 16px !important;
    }
    
    /* Container padding */
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 50px 0 40px !important;
    }
    
    .hero-content {
        gap: 24px !important;
    }
    
    .hero-image .video-container {
        padding-bottom: 56.25% !important;
        margin-bottom: 12px !important;
    }
    
    .hero-image h3 {
        font-size: 18px !important;
        margin-bottom: 12px !important;
    }
    
    .hero-image p {
        font-size: 12px !important;
        margin-top: 10px !important;
    }
    
    .hero-title {
        font-size: 28px !important;
        line-height: 1.3 !important;
        margin-bottom: 16px !important;
    }
    
    .hero-subtitle {
        font-size: 16px !important;
        line-height: 1.6 !important;
        margin-bottom: 24px !important;
    }
    
    .hero-cta {
        gap: 10px !important;
    }
    
    .hero-cta a {
        padding: 14px 20px !important;
        font-size: 15px !important;
    }
    
    .privacy-badge {
        font-size: 12px !important;
        flex-wrap: wrap !important;
        text-align: center !important;
    }
    
    /* Stats Grid */
    .stats-grid {
        gap: 12px !important;
    }
    
    .stats-grid > div {
        padding: 14px !important;
    }
    
    .stats-grid > div > div:first-child {
        font-size: 28px !important;
    }
    
    .stats-grid > div > div:last-child {
        font-size: 13px !important;
    }
    
    /* Section Headers */
    .section-header {
        margin-bottom: 32px !important;
    }
    
    .section-header h2 {
        font-size: 26px !important;
        line-height: 1.3 !important;
        margin-bottom: 10px !important;
    }
    
    .section-header p {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }
    
    /* Cards */
    [style*="padding: 40px"], [style*="padding: 30px"] {
        padding: 20px 16px !important;
    }
    
    [style*="padding: 24px"] {
        padding: 18px 14px !important;
    }
    
    /* Buttons */
    .btn, a[class*="btn"] {
        padding: 14px 20px !important;
        font-size: 15px !important;
    }
    
    /* Padding adjustments */
    section {
        padding: 40px 0 !important;
    }
    
    /* Text spacing */
    p {
        margin-bottom: 14px !important;
    }
    
    h2, h3 {
        margin-bottom: 12px !important;
    }
    
    /* Form elements */
    input, textarea, select {
        padding: 14px 16px !important;
        font-size: 16px !important;
        border-radius: 10px !important;
    }
    
    /* Gaps in grids */
    [style*="gap: 30px"] {
        gap: 20px !important;
    }
    
    [style*="gap: 40px"] {
        gap: 24px !important;
    }
    
    [style*="gap: 60px"] {
        gap: 30px !important;
    }
    
    /* Reduce gaps further */
    [style*="gap: 20px"] {
        gap: 16px !important;
    }
    
    /* Better card spacing */
    [style*="border-radius: 16px"], [style*="border-radius: 20px"] {
        margin-bottom: 16px !important;
    }
    
    /* Form improvements */
    form {
        gap: 14px !important;
    }
    
    .form-group, form > div {
        margin-bottom: 14px !important;
    }
}

/* ============================================
   Hero Form Placeholder Styles
   ============================================ */
#heroForm input::placeholder {
    color: #fff !important;
    opacity: 0.9;
}

#heroForm input::-webkit-input-placeholder {
    color: #fff !important;
    opacity: 0.9;
}

#heroForm input::-moz-placeholder {
    color: #fff !important;
    opacity: 0.9;
}

#heroForm input:-ms-input-placeholder {
    color: #fff !important;
    opacity: 0.9;
}

/* Final Form Placeholder Styles */
#formFrota input::placeholder {
    color: #fff !important;
    opacity: 0.9;
}

#formFrota input::-webkit-input-placeholder {
    color: #fff !important;
    opacity: 0.9;
}

#formFrota input::-moz-placeholder {
    color: #fff !important;
    opacity: 0.9;
}

#formFrota input:-ms-input-placeholder {
    color: #fff !important;
    opacity: 0.9;
}

/* ============================================
   Button Pulse Animation
   ============================================ */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(37,211,102,0.5);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 35px rgba(37,211,102,0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(37,211,102,0.5);
    }
}

#heroForm button[type="submit"] {
    animation: pulse 2s ease-in-out infinite;
}

#heroForm button[type="submit"]:hover {
    animation: none;
    transform: scale(1.05);
}

/* ============================================
   Video Modal Styles
   ============================================ */
.video-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in-out;
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 0;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease-out;
}

.video-modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-modal-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.video-modal-close {
    background: #ef4444;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.video-modal-close:hover {
    transform: scale(1.1);
}

.video-modal-body {
    padding: 30px;
}

.video-container-modal {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.video-container-modal iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-modal-cta {
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ============================================
   Video Modal Responsive
   ============================================ */
@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .video-modal-header {
        padding: 20px 20px 15px;
    }
    
    .video-modal-header h2 {
        font-size: 22px;
    }
    
    .video-modal-body {
        padding: 20px;
    }
}

