/* Critical Above-the-fold CSS - Optimized for Performance */
:root {
    --main-color: #0420d5;
    --main-color-dark: #0318a8;
    --main-color-light: #1a3cb8;
}

/* Font Awesome icon base styles to prevent icon flicker */
.fa, .fas, .far, .fal, .fab {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.fa::before, .fas::before, .far::before, .fal::before, .fab::before {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands";
    font-weight: 900;
}

*,*::before,*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Arial', sans-serif;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #f8f9fa;
    color: #333;
    font-size: 17px;
    line-height: 1.6;
}

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 1%;
    max-width: 1000px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin: 0 15px;
    position: relative;
}

.nav-menu li a {
    text-decoration: none;
    color: #222;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s ease;
    padding: 8px 0;
    position: relative;
}

.nav-menu li a:hover {
    color: var(--main-color);
}

.nav-actions {
    display: flex;
    align-items: center;
}

.login-btn {
    background-color: #f8f9fa;
    color: #0420d5;
    border: 2px solid #0420d5;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    margin-right: 10px;
    transition: all 0.2s ease;
    transform: translate3d(0, 0, 0);
}

.login-btn:hover {
    background-color: #0420d5;
    color: white;
    transform: translate3d(0, -2px, 0);
}

.try-btn {
    background-color: #0420d5;
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    transform: translate3d(0, 0, 0);
}

.try-btn:hover {
    background-color: #0318a8;
    transform: translate3d(0, -2px, 0);
}

/* Hero Section */
.hero {
    background: url('../images/hero-optimized.jpg') center/cover no-repeat;
    color: white;
    padding: 80px 5% 60px;
    text-align: center;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    transform: translate3d(0, 0, 0);
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.5;
    opacity: 0.95;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}

.cta-button {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #0420d5;
    border: none;
    padding: 15px 35px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.cta-button:hover {
    transform: translate3d(0, -3px, 0);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Floating Buttons */
.floating-buttons {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    z-index: 99999 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    padding: 10px 15px !important;
    border-radius: 25px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    border: 2px solid #0420d5 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.floating-btn {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 18px !important;
    border-radius: 20px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
    min-width: 120px !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.floating-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: white;
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25D366 0%, #20b357 100%) !important;
}

.support-btn {
    background: linear-gradient(135deg, #0420d5 0%, #0056b3 100%) !important;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5));
    backdrop-filter: blur(5px);
    will-change: opacity;
    transform: translate3d(0, 0, 0);
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
}

/* Brand Placeholder Styles */
.brand-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80px;
    width: 120px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 0 auto;
}

.brand-placeholder:hover {
    background: linear-gradient(135deg, #0420d5 0%, #0318a8 100%);
    border-color: #0420d5;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(4, 32, 213, 0.3);
}

.brand-placeholder i {
    font-size: 24px;
    color: #6c757d;
    margin-bottom: 6px;
    transition: color 0.3s ease;
}

.brand-placeholder:hover i {
    color: white;
}

.brand-placeholder span {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    text-align: center;
    transition: color 0.3s ease;
}

.brand-placeholder:hover span {
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .cta-button {
        font-size: 16px;
        padding: 12px 24px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .floating-buttons {
        bottom: 20px;
        padding: 8px 12px;
        gap: 8px;
        border-radius: 20px;
    }
    
    .floating-btn {
        padding: 8px 12px;
        min-width: 80px;
        font-size: 13px;
        border-radius: 18px;
    }
    
    .brand-placeholder {
        height: 70px;
        width: 100px;
    }
    
    .brand-placeholder i {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .brand-placeholder span {
        font-size: 11px;
    }
}

/* Simple floating footer with blue line */
footer.floating-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: transparent;
    z-index: 1000;
    border: none;
    box-shadow: none;
    padding: 0;
}

.footer-blue-line {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #0420d5 0%, #1a3cb8 50%, #0420d5 100%);
    border-radius: 0;
}

/* Login form alert messages */
.alert {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Critical: Hide floating action buttons on mobile devices */
@media (max-width: 768px) {
    #floating-action-buttons {
        display: none !important;
        visibility: hidden !important;
    }
    
    .floating-action-buttons {
        display: none !important;
        visibility: hidden !important;
    }
    
    div#floating-action-buttons {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Show floating footer navigation menu on mobile */
    div.floating-footer {
        display: flex !important;
        visibility: visible !important;
    }
    
    /* Show floating footer menu items on mobile */
    .floating-footer-item {
        display: flex !important;
        visibility: visible !important;
    }
    
    /* Hide the simple footer with blue line on mobile */
    footer.floating-footer {
        display: none !important;
        visibility: hidden !important;
    }
}

@media (max-width: 480px) {
    #floating-action-buttons {
        display: none !important;
        visibility: hidden !important;
    }
    
    .floating-action-buttons {
        display: none !important;
        visibility: hidden !important;
    }
    
    div#floating-action-buttons {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Show floating footer navigation menu on mobile */
    div.floating-footer {
        display: flex !important;
        visibility: visible !important;
    }
    
    /* Show floating footer menu items on mobile */
    .floating-footer-item {
        display: flex !important;
        visibility: visible !important;
    }
    
    /* Hide the simple footer with blue line on mobile */
    footer.floating-footer {
        display: none !important;
        visibility: hidden !important;
    }
}
