/* ============================================
   IL MIO IP - TECH IMPROVEMENTS
   Tooltips, header, footer styling
   ============================================ */

/* ============================================
   TOOLTIP SYSTEM - Click to Open with ? Icon
   ============================================ */

/* Tooltip container */
.info-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Question mark icon in circle */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #6291cc;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    user-select: none;
    position: relative;
    z-index: 10;
}

.tooltip-icon:hover {
    background-color: #5080bb;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(98, 145, 204, 0.5);
}

.tooltip-icon:active {
    transform: scale(0.95);
}

.tooltip-icon:focus-visible {
    outline: 3px solid #5b91d5;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(91, 145, 213, 0.3);
}

/* Tooltip content box - horizontal rectangle */
.tooltip-content {
    display: none;
    position: fixed;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #333;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
    min-width: 300px;
    max-width: 500px;
    width: max-content;
    z-index: 99999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25),
                0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid #6291cc;
    animation: tooltipSlideIn 0.3s ease-out;
    font-weight: 400;
    pointer-events: auto;
}

.tooltip-content.active {
    display: block;
}

/* Tooltip slide in animation */
@keyframes tooltipSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close button for tooltip */
.tooltip-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border: none;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.tooltip-close:hover {
    background: #c0392b;
    transform: rotate(90deg);
}

/* Responsive tooltip positioning */
@media (max-width: 768px) {
    .tooltip-content {
        min-width: 250px;
        max-width: calc(100vw - 40px);
        left: 50%;
        transform: translateX(-50%);
    }

    .tooltip-content::before,
    .tooltip-content::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ============================================
   ENHANCED HEADER STYLING
   Clean sticky bar with subtle gradient
   ============================================ */

header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
    border-bottom: none !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15) !important;
}

header img {
    height: 36px !important;
    width: auto !important;
    filter: brightness(0) invert(1);
}

/* ============================================
   ENHANCED FOOTER STYLING
   ============================================ */

.footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f1626 100%) !important;
    color: #e0e0e0 !important;
    padding: 60px 20px 30px !important;
    margin-top: 100px !important;
    position: relative;
    overflow: hidden;
}

/* Footer animated background */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        transparent 0%,
        #5b91d5 25%,
        #6291cc 50%,
        #5b91d5 75%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: footerBorder 3s linear infinite;
}

@keyframes footerBorder {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* Footer grid layout */
.footer .container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Footer company info */
.footer-company-info {
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-company-info p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #ffffff !important;
}

.footer-company-info strong {
    color: #ffffff !important;
    font-weight: 600;
}

/* Footer links grid */
.footer-links {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 30px !important;
    padding: 25px 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    padding: 5px 10px !important;
    margin: 0 !important;
}

.footer-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #5b91d5, #6291cc);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.footer-links a:hover {
    color: #6291cc !important;
    transform: translateY(-2px);
}

.footer-links a:hover::before {
    transform: scaleX(1);
}

/* Footer SEO content */
.footer .seo-content {
    text-align: center !important;
    padding: 25px 20px !important;
    margin: 0 auto !important;
    max-width: 900px !important;
    color: #ffffff !important;
}

.footer .seo-content p {
    margin-bottom: 15px !important;
    font-size: 0.9rem !important;
    line-height: 1.8 !important;
    color: #ffffff !important;
}

.footer .seo-content strong {
    color: #ffffff !important;
}

/* Footer social icons section */
.footer-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 25px 0;
    margin-top: 20px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(98, 145, 204, 0.1);
    border: 2px solid rgba(98, 145, 204, 0.3);
    border-radius: 50%;
    color: #6291cc;
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: rgba(98, 145, 204, 0.2);
    border-color: #6291cc;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(98, 145, 204, 0.3);
}

/* Footer copyright */
.footer-copyright {
    text-align: center;
    padding-top: 25px;
    margin-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: #ffffff !important;
}

.footer-copyright p {
    color: #ffffff !important;
}

/* Footer badge/logo */
.footer-badge {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(91, 145, 213, 0.15), rgba(98, 145, 204, 0.15));
    border: 1px solid rgba(98, 145, 204, 0.3);
    border-radius: 20px;
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.footer-badge:hover {
    background: linear-gradient(135deg, rgba(91, 145, 213, 0.25), rgba(98, 145, 204, 0.25));
    border-color: #6291cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(98, 145, 204, 0.2);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Dark mode overrides for improvements */
[data-theme="dark"] .tooltip-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    border-color: #5b91d5;
}

[data-theme="dark"] .tooltip-icon {
    background-color: #5b91d5;
}

[data-theme="dark"] .tooltip-icon:hover {
    background-color: #4a7ec0;
    box-shadow: 0 0 10px rgba(91, 145, 213, 0.5);
}

/* Footer responsive */
@media (max-width: 768px) {
    .footer {
        padding: 40px 15px 20px !important;
    }

    .footer-links {
        flex-direction: column !important;
        gap: 15px !important;
        text-align: center !important;
    }

    .footer-social {
        gap: 15px;
    }

    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}
