/*
Theme Name: tdhost
Theme URI: https://www.tdhost.com.br
Author: Thállissom Dutra
Author URI: https://www.tdhost.com.br
Description: Tema corporativo moderno para empresa de Hosting, desenvolvido com Tailwind CSS.
Version: 1.0.0
Text Domain: tdhost
*/

body { font-family: 'Inter', sans-serif; }

/* Prevent horizontal scroll on mobile caused by decorative elements */
html, body {
    overflow-x: hidden;
}

/* Logo container responsive */
.logo-container {
    width: 180px;
}

@media (max-width: 767px) {
    .logo-container {
        width: 140px;
    }
}

/* Mega Menu Styles */
.group:hover .group-hover\:block { display: block; }
.group:hover .group-hover\:visible { visibility: visible; }
.group:hover .group-hover\:opacity-100 { opacity: 1; }

/* Ensure SVGs are visible */
svg, svg path {
  max-width: 100%;
}

/* VPS Backup Animations */
@keyframes upload-flow {
    0% { top: 100%; height: 0; opacity: 0; }
    50% { opacity: 1; }
    100% { top: -20%; height: 100%; opacity: 0; }
}
.animate-upload-flow {
    animation: upload-flow 1.5s infinite linear;
}

@keyframes float-up {
    0% { transform: translateY(20px); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(-60px); opacity: 0; }
}
.animate-float-up {
    animation: float-up 2.5s infinite ease-out;
}
.delay-700 { animation-delay: 0.7s; }
.delay-1000 { animation-delay: 1.4s; }

/* Upload Simulation Animations */
@keyframes packet-travel {
    0% { left: 15%; opacity: 0; transform: scale(0.5) translateY(-50%); }
    10% { opacity: 1; transform: scale(1) translateY(-50%); }
    80% { opacity: 1; transform: scale(1) translateY(-50%); }
    90% { left: 85%; opacity: 0; transform: scale(0.5) translateY(-50%); }
    100% { left: 85%; opacity: 0; transform: scale(0.5) translateY(-50%); }
}
.animate-packet-travel {
    animation: packet-travel 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes progress-fill-scale {
    0% { transform: scaleX(0); }
    10% { transform: scaleX(0.1); }
    30% { transform: scaleX(0.4); }
    60% { transform: scaleX(0.7); }
    90% { transform: scaleX(0.95); }
    100% { transform: scaleX(1); }
}
.animate-progress-fill {
    animation: progress-fill-scale 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes number-slide-fixed {
    0%, 5% { transform: translateY(0); }
    10%, 15% { transform: translateY(-1.5rem); }
    20%, 35% { transform: translateY(-3.0rem); }
    40%, 45% { transform: translateY(-4.5rem); }
    50%, 55% { transform: translateY(-6.0rem); }
    60%, 65% { transform: translateY(-7.5rem); }
    70%, 75% { transform: translateY(-9.0rem); }
    80%, 85% { transform: translateY(-10.5rem); }
    90%, 100% { transform: translateY(-12.0rem); }
}
.animate-scroll-fixed {
    animation: number-slide-fixed 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.animate-data-stream {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

@keyframes gradient-x {
    0%, 100% {
        background-size: 200% 200%;
        background-position: left center;
    }
    50% {
        background-size: 200% 200%;
        background-position: right center;
    }
}
.animate-gradient-x {
    animation: gradient-x 3s ease infinite;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* Show WhatsApp only on mobile and tablet (up to 1024px) */
@media (max-width: 1023px) {
    .whatsapp-float {
        display: flex;
    }
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

.whatsapp-icon {
    width: 35px;
    height: 35px;
    fill: white;
}

/* Mobile Menu Improvements */
#mobile-menu {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    /* Fix Chrome animation issue */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform, opacity;
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Hide WhatsApp button when mobile menu is open */
body.mobile-menu-open .whatsapp-float {
    display: none !important;
}

/* ============================================
   NEW PROFESSIONAL MOBILE MENU STYLES
   ============================================ */

/* Mobile Menu Overlay - Fullscreen */
.mobile-menu-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100vh !important;
    height: 100dvh !important; /* Dynamic viewport height - melhor para mobile */
    z-index: 99999 !important;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
    transform: translateX(100%) !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    visibility: hidden;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-overlay.active {
    transform: translateX(0) !important;
    visibility: visible;
}

/* Mobile Menu Container */
.mobile-menu-container {
    min-height: 100%;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height */
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    padding-bottom: env(safe-area-inset-bottom, 2rem); /* Safe area para iPhones com notch */
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.2s ease;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile Menu Navigation */
.mobile-menu-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Mobile Menu Section */
.mobile-menu-section {
    border-radius: 12px;
    overflow: hidden;
}

/* Mobile Menu Category Button */
.mobile-menu-category {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.mobile-menu-category:hover,
.mobile-menu-category.active {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-category.active .category-arrow {
    transform: rotate(90deg);
}

/* Mobile Menu Icon Box */
.mobile-menu-icon-box {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

/* Mobile Menu Submenu */
.mobile-menu-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 3.5rem;
}

.mobile-menu-submenu.active {
    max-height: 500px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Mobile Menu Link */
.mobile-menu-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-menu-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

/* Mobile Menu Dot */
.mobile-menu-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Mobile Menu Direct Link */
.mobile-menu-direct-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.mobile-menu-direct-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Menu CTA Button */
.mobile-menu-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(249, 115, 22, 0.4);
    transition: all 0.2s ease;
}

.mobile-menu-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(249, 115, 22, 0.5);
}

/* Mobile Menu Contact Buttons */
.mobile-menu-contact {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.mobile-menu-contact-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.mobile-menu-contact-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Hamburger Menu Icon Animation */
.mobile-menu-icon {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mobile-menu-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #374151; /* gray-700 */
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger color when header is scrolled */
#main-header.header-scrolled .mobile-menu-icon span {
    background-color: #e5e7eb; /* gray-200 */
}

/* Hamburger to X animation */
body.mobile-menu-open .mobile-menu-icon span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: #374151;
}

body.mobile-menu-open .mobile-menu-icon span:nth-child(2) {
    opacity: 0;
}

body.mobile-menu-open .mobile-menu-icon span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: #374151;
}

/* Logo SVG - clean rendering without effects */
#header-logo,
.custom-logo,
.custom-logo-link img {
    /* Remove any blur or shadow effects */
    filter: none !important;
    -webkit-filter: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    /* Clean sharp rendering */
    image-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Responsive logo sizing - keep original proportions */
@media (max-width: 767px) {
    #header-logo,
    .custom-logo,
    .custom-logo-link img {
        height: 28px !important;
        width: auto !important;
    }
    
    .logo-container {
        width: auto !important;
    }
}

/* Better border for mobile menu items */
.border-l-3 {
    border-left-width: 3px;
}

/* Header Scroll State - Isolated from dropdowns */
#main-header.header-scrolled {
    background-color: rgba(15, 23, 41, 0.95);
    border-color: transparent;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Menu buttons when header is scrolled - ONLY direct children buttons */
#main-header.header-scrolled > div > div > nav > .group > button,
#main-header.header-scrolled > div > div > nav > a {
    color: #e5e7eb !important; /* text-gray-200 */
}

#main-header.header-scrolled > div > div > nav > .group > button:hover,
#main-header.header-scrolled > div > div > nav > a:hover {
    color: #f97316 !important; /* brand-orange */
}

/* Force ONLY gray text colors inside dropdowns - don't touch other colors */
#main-header.header-scrolled .group > div h3.text-gray-900,
#main-header.header-scrolled .group > div h4.text-gray-900,
#main-header.header-scrolled .group > div .font-bold.text-gray-900 { 
    color: #111827 !important; 
}
#main-header.header-scrolled .group > div p.text-gray-500,
#main-header.header-scrolled .group > div span.text-gray-500 { 
    color: #6b7280 !important; 
}
#main-header.header-scrolled .group > div .text-gray-600:not(.text-brand-orange):not(.text-brand-blue):not(.text-purple-600):not(.text-green-600):not(.text-teal-600):not(.text-amber-600):not(.text-pink-600):not(.text-indigo-600):not(.text-cyan-600) { 
    color: #4b5563 !important; 
}
#main-header.header-scrolled .group > div .text-gray-400 { 
    color: #9ca3af !important; 
}
