/* ========================================
   HCI Innovations - Custom Styles
   ======================================== */

/* ========================================
   CSS Variables & Root Settings
   ======================================== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #14b8a6;
    --accent-color: #f59e0b;
    --dark-color: #0f172a;
    --light-color: #f8fafc;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========================================
   Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 6px;
    border: 2px solid var(--light-color);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--light-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

a {
    transition: var(--transition);
}

section {
    position: relative;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
    background-color: var(--white) !important;
    backdrop-filter: blur(10px);
    z-index: 1030;
}

/* Mobile: Fixed Navbar */
@media (max-width: 991px) {
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
    }
}

/* Desktop: Fixed Navbar */
@media (min-width: 992px) {
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
    }
}

.navbar.scrolled {
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(99, 102, 241, 0.05);
    background-color: rgba(255, 255, 255, 0.98) !important;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-img {
    transition: var(--transition);
}

.brand-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color) !important;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(99, 102, 241, 0.2);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.btn-lg {
    padding: 1.125rem 2.75rem;
    font-size: 1.125rem;
    border-radius: var(--border-radius-lg);
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    padding-top: 120px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 50%, #fdf4ff 100%);
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/building-8714901.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(20, 184, 166, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    color: var(--dark-color);
    margin-bottom: 1.5rem;
}

.hero-section .lead {
    font-size: 1.25rem;
    color: var(--text-color);
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-stats h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero-stats p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.hero-image {
    position: relative;
    z-index: 2;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(99, 102, 241, 0.1);
    transition: var(--transition);
}

.hero-image img:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 30px 60px rgba(99, 102, 241, 0.3), 0 0 0 1px rgba(99, 102, 241, 0.2);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 1;
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ========================================
   Product Cards
   ======================================== */
.product-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(99, 102, 241, 0.05);
    transition: var(--transition);
    height: 100%;
    position: relative;
    border: 2px solid transparent;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.03) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(99, 102, 241, 0.15);
    border-color: var(--primary-light);
}

.product-card.featured {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03), rgba(20, 184, 166, 0.03));
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.product-card.featured:hover {
    box-shadow: var(--shadow-xl), 0 0 30px rgba(99, 102, 241, 0.2);
}

.featured-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 0.625rem 1.25rem;
    border-radius: 24px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.product-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(99, 102, 241, 0.1);
    transition: var(--transition);
}

.product-card:hover .product-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.product-icon i {
    font-size: 2.25rem;
    color: var(--white);
}

.product-card h3 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    flex-grow: 1;
}

.feature-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-card .btn {
    margin-top: auto;
}

.feature-list i {
    font-size: 1.1rem;
}

/* ========================================
   Feature Boxes
   ======================================== */
.feature-box {
    padding: 2.5rem 1.75rem;
    transition: var(--transition);
    border-radius: var(--border-radius);
    background: transparent;
}

.feature-box:hover {
    transform: translateY(-8px);
    background: var(--white);
    box-shadow: var(--shadow-lg);
}

.feature-icon-wrapper {
    width: 90px;
    height: 90px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(20, 184, 166, 0.1));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.feature-icon-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.feature-box:hover .feature-icon-wrapper::before {
    opacity: 1;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translate(-50%, -50%) scale(0); }
    50% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(0); }
}

.feature-box:hover .feature-icon-wrapper {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scale(1.15) rotate(-5deg);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2.25rem;
    color: var(--primary-color);
    transition: var(--transition);
    z-index: 1;
}

.feature-box:hover .feature-icon {
    color: var(--white);
    transform: scale(1.1);
}

/* ========================================
   Showcase Section
   ======================================== */
.showcase-section {
    background: var(--white);
}

.showcase-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: pointer;
    height: 300px;
}

.showcase-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.showcase-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--white);
    padding: 2rem 1.5rem;
    transform: translateY(100%);
    transition: var(--transition);
}

.showcase-item:hover .showcase-overlay {
    transform: translateY(0);
}

.showcase-item:hover img {
    transform: scale(1.1);
}

.showcase-overlay h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.showcase-overlay p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

/* ========================================
   About Section
   ======================================== */
.value-item {
    text-align: center;
}

.value-item i {
    font-size: 2rem;
    display: block;
}

.value-item h5 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* ========================================
   Testimonials
   ======================================== */
.testimonials-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, #8b5cf6 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(20, 184, 166, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.testimonials-section .display-4,
.testimonials-section .lead {
    color: var(--white);
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.97);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    height: 100%;
    transition: var(--transition);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.testimonial-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.stars {
    color: #ffc107;
}

.stars i {
    font-size: 1.1rem;
}

.rating-card {
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(20px);
}

.testimonial-text {
    font-style: italic;
    color: var(--text-color);
    line-height: 1.8;
}

.testimonial-author h6 {
    color: var(--dark-color);
    font-weight: 600;
}

/* ========================================
   Contact Section
   ======================================== */
.contact-item {
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
}

.contact-icon i {
    color: var(--white);
    font-size: 1.3rem;
}

/* ========================================
   Contact Form
   ======================================== */
.contact-form-wrapper {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(99, 102, 241, 0.05);
    transition: var(--transition);
}

.contact-form-wrapper:hover {
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.625rem;
    font-size: 0.9375rem;
}

.form-control,
.form-select {
    padding: 0.875rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #ef4444;
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: var(--secondary-color);
}

.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1.25rem;
    font-weight: 500;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--dark-color) !important;
    color: var(--white);
}

@media (min-width: 992px) {
    .footer {
        width: 100%;
        position: relative;
    }
}

.footer h5,
.footer h6 {
    color: var(--white);
    font-weight: 600;
}

.footer a {
    transition: var(--transition);
}

.footer a:hover {
    color: var(--primary-light) !important;
}

/* ========================================
   Back to Top Button
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: 16px;
    font-size: 1.25rem;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(99, 102, 241, 0.1);
    z-index: 1000;
}

.back-to-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    opacity: 0;
    transition: var(--transition);
}

.back-to-top i {
    position: relative;
    z-index: 1;
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.back-to-top:hover::before {
    opacity: 1;
}

.back-to-top.show {
    display: flex;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.shadow-custom {
    box-shadow: var(--shadow-lg);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 991.98px) {
    .navbar-nav {
        padding-top: 1rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .display-4 {
        font-size: 2rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding-top: 100px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .hero-stats h3 {
        font-size: 2rem;
    }
    
    .product-card {
        padding: 2rem;
    }
    
    .contact-form-wrapper {
        padding: 1.5rem;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 575.98px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .btn-lg {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

/* ========================================
   Loading Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ========================================
   Product Image Styling
   ======================================== */
.product-image-wrapper {
    width: 100%;
    height: 240px;
    margin-bottom: 1.75rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(20, 184, 166, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.product-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), transparent);
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-image-wrapper::after {
    opacity: 1;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

/* Enhanced product card layout */
.product-card {
    display: flex;
    flex-direction: column;
}

.product-card .btn {
    margin-top: auto;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .navbar,
    .back-to-top,
    .hero-section,
    #contact {
        display: none;
    }
}
