/* ===================================
   Custom Styles for wpiot - WhatsApp IoT
   =================================== */

/* Global Styles */
* {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* WhatsApp Gradient */
.whatsapp-gradient {
    background: linear-gradient(135deg, #075e54 0%, #128c7e 100%);
}

.whatsapp-gradient-hover:hover {
    background: linear-gradient(135deg, #075e54 0%, #128c7e 100%);
}

/* Header Scroll Effect */
#header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Navigation Links */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #075e54 0%, #128c7e 100%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Fade In Classes */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.fade-in-delay {
    opacity: 0;
    animation: fadeInDelay 0.8s ease-out 0.3s forwards;
}

.fade-in-delay-2 {
    opacity: 0;
    animation: fadeInDelay 0.8s ease-out 0.6s forwards;
}

/* Blob Animation */
.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Feature Cards */
.feature-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-card:hover {
    border-color: #22c55e;
    transform: translateY(-10px);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Button Hover Effects */
button, a {
    transition: all 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #075e54 0%, #128c7e 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #075e54;
}

/* Form Inputs Focus */
input:focus,
textarea:focus,
select:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Country Select Styles */
#country-select {
    cursor: pointer;
    appearance: auto;
}

#country-select option {
    padding: 10px;
    font-size: 16px;
}

/* Phone Input Animation */
#phone-input {
    transition: all 0.3s ease;
}

#phone-input:focus {
    transform: scale(1.02);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Hero Section Styles */
#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Stats Animation on Scroll */
.stat-number {
    animation: pulse 2s ease-in-out infinite;
}

/* Mobile Menu Slide */
#mobile-menu {
    animation: slideIn 0.3s ease-out;
}

/* Scroll Top Button */
#scroll-top {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#scroll-top.show {
    opacity: 1;
    visibility: visible;
}

/* Card Shadows */
.card-shadow {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.card-shadow:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Success Message */
.success-message {
    background: #dcfce7;
    border: 1px solid #22c55e;
    color: #166534;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    animation: fadeIn 0.5s ease-out;
}

/* Error Message */
.error-message {
    background: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    animation: fadeIn 0.5s ease-out;
}

/* Ripple Effect on Buttons */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Glowing Effect */
.glow {
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
    transition: box-shadow 0.3s ease;
}

.glow:hover {
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.5);
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Typing Animation */
.typing-animation::after {
    content: '|';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Grid Pattern Background */
.grid-pattern {
    background-image:
        linear-gradient(rgba(34, 197, 94, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 197, 94, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Floating Animation */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Gradient Border */
.gradient-border {
    position: relative;
    background: white;
    border-radius: 1rem;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 2px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .fade-in,
    .fade-in-delay,
    .fade-in-delay-2 {
        animation: none;
        opacity: 1;
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    #scroll-top,
    .no-print {
        display: none;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* Dark Mode Ready (for future implementation) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here when needed */
}

/* Smooth Transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* WhatsApp Floating Button Styles */
#whatsapp-float {
    animation: whatsapp-bounce 2s ease-in-out infinite;
    background: linear-gradient(135deg, #075e54 0%, #128c7e 100%) !important;
}

.whatsapp-pulse {
    box-shadow: 0 0 0 0 rgba(18, 140, 126, 0.7);
    animation: whatsapp-pulse 2s infinite;
}

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(18, 140, 126, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(18, 140, 126, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(18, 140, 126, 0);
    }
}

@keyframes whatsapp-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

#whatsapp-float:hover {
    animation: none;
}

/* WhatsApp Button Responsive */
@media (max-width: 768px) {
    #whatsapp-float {
        width: 56px;
        height: 56px;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    #whatsapp-float i {
        font-size: 2rem;
    }

    #scroll-top {
        bottom: 6.5rem;
        right: 1.5rem;
    }
}
