/* ========================================
   TechFlow - Custom Styles
   Modern Tech Template with Bootstrap 5.3
   ======================================== */

/* ========== CSS VARIABLES ========== */
:root {
    /* Colors */
    --primary: #FF6600;
    --primary-hover: #E65C00;
    --primary-light: rgba(255, 102, 0, 0.1);
    --secondary: #1E293B;
    --background: #FFFFFF;
    --surface: #F8F9FA;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --glass-bg: rgba(255, 255, 255, 0.85);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.6s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --shadow-primary: 0 8px 30px rgba(255, 102, 0, 0.35);
}

/* ========== BASE STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Account for fixed navbar when using anchor links */
    scroll-padding-top: 90px;
    overflow-x: hidden; /* prevent horizontal scroll on mobile */
}

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    /* Normal scrolling (no scroll-snap / no forced section jumps) */
}

/* ========== FULL-SCREEN SECTIONS ========== */
.fullscreen-section {
    min-height: 100vh;
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fullscreen-section .section-content {
    flex: 1;
    display: flex;
    align-items: center;
    overflow-y: auto;
    padding-top: 80px;
}

/* Section transition animations */
.fullscreen-section .animate-content {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fullscreen-section.in-view .animate-content {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for child elements */
.fullscreen-section.in-view .animate-content:nth-child(1) { transition-delay: 0s; }
.fullscreen-section.in-view .animate-content:nth-child(2) { transition-delay: 0.1s; }
.fullscreen-section.in-view .animate-content:nth-child(3) { transition-delay: 0.2s; }
.fullscreen-section.in-view .animate-content:nth-child(4) { transition-delay: 0.3s; }
.fullscreen-section.in-view .animate-content:nth-child(5) { transition-delay: 0.4s; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary);
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========== NAVIGATION ========== */
.glass-nav {
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--transition-base);
    padding: 1rem 0;
}

.glass-nav.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-sm);
}

.logo-img {
    height: 40px;
    width: auto;
    opacity: 0;
    animation: logoFadeIn 1s ease forwards, logoShine 3s ease-in-out 1s infinite;
}

.logo-container {
    opacity: 0;
    animation: logoFadeIn 1s ease forwards;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--primary);
}

@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes logoShine {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

.navbar-nav .nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--secondary);
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 8px;
    transition: all var(--transition-fast);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

/* Ensure navigation is always visible on desktop */
@media (min-width: 992px) {
    #mainNavbar .navbar-collapse {
        display: flex !important;
        flex-basis: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    #mainNavbar .navbar-collapse.collapse {
        display: flex !important;
    }
    
    .navbar-nav {
        flex-direction: row;
    }
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ========== HERO SECTION ========== */
.hero-section {
    min-height: 100vh;
    height: 100vh;
    position: relative;
    background-image: url('https://images.pexels.com/photos/30771471/pexels-photo-30771471.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(30, 41, 59, 0.7) 100%);
    z-index: 1;
}

.hero-section .container {
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #FFFFFF;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

.hero-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* ========== BUTTONS ========== */
.btn-cta {
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    /* Default highlighted state */
    box-shadow: var(--shadow-primary);
    transform: translateY(0);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

/* Override reveal animation for buttons - always visible */
.btn-cta.reveal-on-scroll {
    opacity: 1 !important;
    transform: translateY(0) !important;
    background-color: #FF6600 !important;
}

/* Subtle glow animation on default state */
.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: btnShine 3s infinite;
}

@keyframes btnShine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.btn-cta:hover {
    background: var(--primary-hover);
    color: #FFFFFF;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(255, 102, 0, 0.5);
}

.btn-cta:active {
    transform: translateY(-1px) scale(0.98);
}

/* ========== SCROLL INDICATOR ========== */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: #FFFFFF;
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    opacity: 0.7;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-15px);
    }
    60% {
        transform: translateX(-50%) translateY(-8px);
    }
}

/* ========== SECTION STYLES ========== */
.section-label {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1.25rem;
    color: var(--secondary);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    line-height: 1.7;
}

.section-text {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* ========== ABOUT SECTION ========== */
.about-section {
    background: var(--surface);
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: center;
    padding: 110px 0 60px;
}

.about-image-wrapper {
    position: relative;
}

.about-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.about-image-accent {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    background: var(--primary-light);
    border-radius: 16px;
    z-index: -1;
}

.about-content {
    padding: 2rem 0;
}

@media (min-width: 992px) {
    .about-content {
        padding: 2rem;
        margin-left: -40px;
        background: var(--background);
        border-radius: 16px;
        box-shadow: var(--shadow-md);
        position: relative;
        z-index: 2;
    }
}

/* Stats */
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: var(--surface);
    border-radius: 12px;
    min-width: 100px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ========== PRODUCTS SECTION ========== */
.products-section {
    background: var(--background);
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: center;
    padding: 110px 0 60px;
}

.product-card {
    background: var(--background);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all var(--transition-base);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: var(--surface);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-info {
    padding: 1.5rem;
    text-align: center;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    font-family: var(--font-heading);
}

/* ========== CONTACT SECTION ========== */
.contact-section {
    background: var(--surface);
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: center;
    padding: 110px 0 60px;
}

.contact-card {
    background: var(--background);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all var(--transition-base);
    height: 100%;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    transition: all var(--transition-base);
}

.contact-card:hover .contact-icon {
    background: var(--primary);
    color: #FFFFFF;
}

.contact-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.contact-info {
    color: var(--text-muted);
    line-height: 1.8;
    margin: 0;
}

.contact-info a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.contact-info a:hover {
    color: var(--primary);
}

/* Social Icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--background);
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all var(--transition-base);
}

.social-link:hover {
    background: var(--primary);
    color: #FFFFFF;
    transform: translateY(-3px);
    border-color: var(--primary);
}

/* ========== FOOTER ========== */
.footer {
    background: var(--secondary);
    color: rgba(255, 255, 255, 0.7);
}

.footer-text {
    font-size: 0.9rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-left: 1.5rem;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--primary);
}

/* ========== WHATSAPP FLOATING BUTTON ========== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all var(--transition-base);
}

.whatsapp-float:hover {
    background: #20bd5a;
    color: #FFFFFF;
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

/* Pulse animation */
.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: whatsappPulse 2s infinite;
    z-index: -1;
}

@keyframes whatsappPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ========== ANIMATIONS ========== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Staggered animations for product cards */
.products-section .col:nth-child(1) .reveal-on-scroll { transition-delay: 0s; }
.products-section .col:nth-child(2) .reveal-on-scroll { transition-delay: 0.15s; }
.products-section .col:nth-child(3) .reveal-on-scroll { transition-delay: 0.3s; }
.products-section .col:nth-child(4) .reveal-on-scroll { transition-delay: 0.45s; }

/* Section-level animations */
.section-animate {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-animate.section-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== RESPONSIVE STYLES ========== */
@media (max-width: 991.98px) {
    .hero-section {
        background-attachment: scroll;
    }
    
    .about-section,
    .products-section,
    .contact-section {
        height: auto;
        min-height: 100vh;
        padding: 100px 0 40px;
    }
    
    .about-image {
        height: 300px;
    }
    
    .about-image-accent {
        display: none;
    }
    
    .stat-item {
        min-width: 80px;
        padding: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 6rem 0 4rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-text {
        font-size: 1rem;
    }
    
    .about-section,
    .products-section,
    .contact-section {
        height: auto;
        min-height: 100vh;
        padding: 100px 0 40px;
    }
    
    .about-image {
        height: 250px;
    }
    
    .about-stats {
        justify-content: center;
    }
    
    .product-image-wrapper {
        height: 180px;
    }
    
    .contact-card {
        padding: 1.5rem;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
    
    .footer-link {
        display: block;
        margin: 0.5rem 0;
    }
    
    .btn-cta {
        padding: 0.875rem 2rem;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .btn-cta {
        padding: 0.875rem 2rem;
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .stat-item {
        min-width: 70px;
        padding: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
}

/* ========== UTILITIES ========== */
.z-2 {
    z-index: 2;
}

/* ========== SECTION DOTS NAVIGATION ========== */
.section-dots {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    padding: 0;
}

.section-dot:hover {
    background: var(--primary-light);
    transform: scale(1.2);
}

.section-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

@media (max-width: 767.98px) {
    .section-dots {
        right: 15px;
        gap: 8px;
    }
    
    .section-dot {
        width: 10px;
        height: 10px;
    }
}

/* Smooth scrolling enhancement */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
