/* ============================================
   CHAARN TECH - Custom Stylesheet
   ============================================ */

/* Import Modern Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================
   1. GLOBAL STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Brand Colors */
.brand-cyan {
    color: #1BB1DC;
}

.brand-cyan-bg {
    background-color: #1BB1DC;
}

/* ============================================
   2. LOADING ANIMATION - SIMPLE FADE OUT
   ============================================ */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loader-logo {
    width: 150px;
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ============================================
   3. NAVIGATION WITH HOVER EFFECTS
   ============================================ */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

nav a {
    position: relative;
    transition: color 0.3s ease;
}

nav a:not(.brand-cyan)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1BB1DC 0%, #0ea5e9 100%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a:not(.brand-cyan):hover::after {
    width: 100%;
}

nav a:not(.brand-cyan):hover {
    color: #000000;
    transform: translateY(-2px);
}

/* ============================================
   4. HERO SECTION
   ============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: blob 20s infinite;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #1BB1DC 0%, #0ea5e9 100%);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
    bottom: -150px;
    left: -100px;
    animation-delay: 5s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #38bdf8 0%, #1BB1DC 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(-30px, 40px) scale(0.9); }
    75% { transform: translate(40px, 30px) scale(1.05); }
}

.floating-shape {
    position: absolute;
    opacity: 0.08;
    animation: float-shape 20s infinite ease-in-out;
    pointer-events: none;
}

.shape-1 { top: 10%; left: 5%; animation-delay: 0s; }
.shape-2 { top: 50%; right: 10%; animation-delay: 4s; }
.shape-3 { bottom: 15%; left: 15%; animation-delay: 8s; }

@keyframes float-shape {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* ============================================
   5. SCROLL ANIMATIONS
   ============================================ */
.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }

/* ============================================
   6. GLASS MORPHISM
   ============================================ */
.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ============================================
   7. SERVICE CARDS - WORKING PURE CSS SOLUTION
   ============================================ */

/* Default state */
.service-card {
    position: relative;
    min-height: 320px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    z-index: 1;
    transition: all 0.5s ease;
}

/* Hover effect on card */
.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(27, 177, 220, 0.3);
    z-index: 100;
}

/* Main content */
.service-main {
    flex-shrink: 0;
}

/* Submenu - Hidden by default */
.service-submenu {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease, margin-top 0.5s ease;
}

/* Show submenu on hover - DESKTOP ONLY */
@media (min-width: 1025px) {
    .service-card:hover .service-submenu {
        max-height: 500px;
        opacity: 1;
        margin-top: 24px;
    }
}

/* Submenu items */
.service-submenu-item {
    padding: 12px 20px;
    margin: 8px 0;
    border-radius: 12px;
    background: rgba(27, 177, 220, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-submenu-item:hover {
    background: rgba(27, 177, 220, 0.15);
    transform: translateX(10px);
}

/* ============================================
   8. PORTFOLIO CARDS
   ============================================ */
.portfolio-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    transition: all 0.4s ease;
}

.portfolio-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-card:hover .portfolio-image {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(27, 177, 220, 0.95) 0%, rgba(14, 165, 233, 0.95) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

/* ============================================
   9. WHY CHOOSE US
   ============================================ */
.why-choose-container {
    position: relative;
}

.feature-card {
    position: relative;
    padding: 50px 40px;
    border-radius: 30px;
    background: white;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1BB1DC 0%, #0ea5e9 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.feature-card:hover::before {
    opacity: 0.05;
}

.feature-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(27, 177, 220, 0.25);
    border-color: #1BB1DC;
}

.feature-icon-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #1BB1DC 0%, #0ea5e9 100%);
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
}

.feature-card:hover .feature-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.feature-number {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #1BB1DC;
    font-size: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-content {
    position: relative;
    z-index: 1;
}

/* ============================================
   10. GOOGLE REVIEWS CAROUSEL
   ============================================ */
.review-carousel {
    position: relative;
    overflow: hidden;
}

.review-slide {
    min-width: 100%;
    transition: transform 0.5s ease;
}

.review-card {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.review-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.star-rating {
    color: #fbbf24;
    font-size: 20px;
}

/* ============================================
   11. STATS SECTION
   ============================================ */
.stat-card {
    position: relative;
    padding: 40px 30px;
    border-radius: 20px;
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #1BB1DC 0%, #0ea5e9 100%);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(27, 177, 220, 0.2);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1BB1DC 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   12. CONTACT FORM STYLING
   ============================================ */
#contactForm input,
#contactForm select,
#contactForm textarea {
    font-family: 'Poppins', sans-serif;
}

#contactForm input:focus,
#contactForm select:focus,
#contactForm textarea:focus {
    box-shadow: 0 0 0 4px rgba(27, 177, 220, 0.1);
}

#contactForm button[type="submit"]:hover {
    transform: scale(1.02);
}

#contactForm button[type="submit"]:active {
    transform: scale(0.98);
}

#formSuccess,
#formError {
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   13. BACK TO TOP BUTTON
   ============================================ */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #1BB1DC 0%, #0ea5e9 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(27, 177, 220, 0.4);
}

#backToTop:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 8px 30px rgba(27, 177, 220, 0.6);
}

#backToTop.show {
    display: flex;
    animation: bounceIn 0.5s;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ============================================
   14. HOVER EFFECTS
   ============================================ */
.hover-lift {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(27, 177, 220, 0.2);
}

/* ============================================
   15. GLOW BUTTON
   ============================================ */
.glow-button {
    position: relative;
    background: linear-gradient(135deg, #1BB1DC 0%, #0ea5e9 100%);
    overflow: hidden;
}

.glow-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.glow-button:hover::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   16. IMAGE CONTAINERS
   ============================================ */
.image-container {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.image-container:hover img {
    transform: scale(1.05);
}

/* ============================================
   17. SECTION DIVIDER
   ============================================ */
.section-divider {
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, #1BB1DC 0%, #0ea5e9 100%);
    margin: 20px auto;
    border-radius: 3px;
}

/* ============================================
   18. GRADIENT TEXT
   ============================================ */
.gradient-text {
    background: linear-gradient(135deg, #1BB1DC 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   19. CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #1BB1DC 0%, #0ea5e9 100%);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0ea5e9;
}

/* ============================================
   20. DECORATIVE ELEMENTS
   ============================================ */
.decorative-dot {
    width: 12px;
    height: 12px;
    background: #1BB1DC;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* ============================================
   21. RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .service-card {
        min-height: 280px;
    }
    
    /* Show all submenus on tablet and mobile */
    .service-submenu {
        max-height: none !important;
        opacity: 1 !important;
        margin-top: 24px !important;
    }
}

@media (max-width: 768px) {
    .blob-1, .blob-2, .blob-3 {
        width: 300px;
        height: 300px;
    }
    
    .service-card {
        min-height: auto;
        padding: 32px 24px;
    }
    
    .service-card:hover {
        transform: translateY(0);
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .feature-icon-wrapper {
        width: 80px;
        height: 80px;
    }
    
    .feature-card {
        padding: 40px 30px;
    }
}

/* ============================================
   22. ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out;
}