/* CSS fixes for alignment and visibility issues */

/* Fix for mobile horizontal scrolling - ONLY on mobile devices */
@media (max-width: 991.98px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative !important;
    }
}

/* Fix for portfolio cards title placement - specifically for the top 3 cards */
.col-lg-4 .product-card h3 {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

/* Add proper padding to top 3 portfolio card content */
.col-lg-4 .product-card .card-body {
    padding-bottom: 6rem !important; 
}

/* Fix for portfolio card links positioning */
.col-lg-4 .product-card .card-body .d-flex {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
}

/* Make portfolio headings stand out more */
.product-card h3 {
    color: #222 !important;
    font-weight: 600 !important;
}

/* Portfolio card hover effects */
.portfolio-card {
    transition: all 0.3s ease-in-out !important;
}

.portfolio-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Portfolio buttons improved animation */
.portfolio-card .btn-primary {
    transition: all 0.2s ease-out !important;
    box-shadow: none !important;
}

.portfolio-card .btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0, 100, 255, 0.2) !important;
}

/* Portfolio "Visit Website" link animation */
.portfolio-card .text-primary {
    transition: all 0.2s ease-out !important;
    position: relative !important;
}

.portfolio-card .text-primary:hover {
    color: #0056b3 !important;
}

.portfolio-card .text-primary:hover i {
    transform: translateX(3px) !important;
}

.portfolio-card .text-primary i {
    transition: transform 0.2s ease-out !important;
}

/* Fix for testimonial text color - ensure all text is visible */
.testimonial-card {
    color: #333 !important;
    background-color: white !important;
}

.testimonial-card h4,
.testimonial-card h5 {
    color: #4361ee !important;
    font-weight: 600 !important;
}

.testimonial-card p {
    color: #333 !important;
}

/* Make testimonial backgrounds clearly white */
.bg-dark-subtle {
    background-color: white !important;
}

/* Make sure testimonial section content is visible */
#testimonials-section .section-title h2 {
    color: white !important;
}

#testimonials-section .section-title p {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* "How It Works" section text fix */
#process-section p {
    color: #333 !important;
}

/* FAQ section text visibility fixes */
#faq-section .accordion-body p {
    color: #333 !important;
}

.accordion-button {
    background-color: #fff !important;
    color: #333 !important;
    font-weight: 500 !important;
}

.accordion-body {
    background-color: #fff !important;
}

/* Make sure FAQ text is readable */
#faq-section .lead {
    color: #555 !important;
}

/* Contact form fixes */
#contact-section input::placeholder,
#contact-section textarea::placeholder {
    color: #666 !important;
    opacity: 1 !important;
}

/* Fix for Firefox */
#contact-section input::-moz-placeholder,
#contact-section textarea::-moz-placeholder {
    color: #666 !important;
    opacity: 1 !important;
}

/* Fix for older Edge */
#contact-section input:-ms-input-placeholder,
#contact-section textarea:-ms-input-placeholder {
    color: #666 !important;
}

/* Fix for newer Edge/Chrome */
#contact-section input::-webkit-input-placeholder,
#contact-section textarea::-webkit-input-placeholder {
    color: #666 !important;
}

/* Make form input text darker */
#contact-section .form-control {
    color: #333 !important;
}

/* Make form labels more visible */
#contact-section .form-label {
    color: #333 !important;
    font-weight: 500 !important;
}

/* Make contact section icons more visible */
.contact-card .text-primary {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
}

/* Enhance contact information section */
.contact-card .contact-icon {
    font-size: 2rem !important;
    color: white !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 1rem !important;
    padding: 30px !important;
}

/* Make pricing setup fees more visible */
.pricing-card .text-muted {
    color: #444 !important;
    font-weight: 600 !important;
}

/* Fix the white setup fee text in the featured pricing card */
.pricing-card.featured .text-white-50 {
    color: white !important;
    font-weight: 600 !important;
    background-color: rgba(0, 0, 0, 0.25) !important;
    border-radius: 4px !important;
    padding: 2px 8px !important;
    display: inline-block !important;
}

/* Make pricing cards same height with buttons aligned at the bottom */
.pricing-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.pricing-header {
    flex-shrink: 0 !important;
}

.pricing-body {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

.pricing-features {
    flex-grow: 1 !important;
    margin-bottom: 1.5rem !important;
}

.pricing-body .btn {
    margin-top: auto !important;
}

/* Clean, professional navbar styling */
.navbar {
    height: 70px !important;
    background-color: rgba(71, 109, 255, 0.95) !important; /* Slightly transparent blue */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

.navbar .container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 100% !important;
}

.navbar-brand {
    font-size: 1.3rem !important;
    padding: 0 !important;
    color: white !important; 
    font-weight: 600 !important;
    transition: color 0.3s ease !important;
}

.navbar-nav {
    height: 100% !important;
    align-items: center !important;
}

.nav-item {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

.nav-link {
    padding: 0 15px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    color: white !important;
    transition: color 0.3s ease !important;
}

/* Simple hover effect */
.nav-link:hover {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Navbar color change on scroll */
.navbar.scrolled {
    background-color: white !important;
    height: 60px !important;
}

.navbar.scrolled .navbar-brand,
.navbar.scrolled .nav-link {
    color: #476dff !important;
}

/* Change hamburger menu color when scrolled */
.navbar.scrolled .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(71, 109, 255, 0.9)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

/* Adjust toggler background when scrolled for better visibility */
.navbar.scrolled .navbar-toggler.custom-toggler {
    background-color: rgba(71, 109, 255, 0.1) !important;
}

.navbar.scrolled .navbar-toggler.custom-toggler:focus {
    box-shadow: 0 0 0 3px rgba(71, 109, 255, 0.25) !important;
}

.navbar.scrolled .nav-link:hover {
    color: #3050d0 !important;
}

/* Mobile specific navbar improvements and menu styling */
@media (max-width: 991.98px) {
    .navbar {
        height: 60px !important;
    }
    /* Container for the mobile menu */
    .navbar-collapse {
        background-color: rgba(67, 97, 238, 0.95) !important;
        margin-top: 10px !important;
        border-radius: 4px !important;
        padding: 10px !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        transform: translateZ(0) !important; /* Force hardware acceleration */
        backface-visibility: hidden !important;
        will-change: transform, opacity !important;
        transition: transform 0.2s ease-out, opacity 0.2s ease-out !important;
    }
    
    /* Fix for flicker animation */
    .navbar-collapse.collapsing {
        transform: translateZ(0) !important;
        transition: height 0.35s ease !important;
    }
    
    /* Toggle button styling */
    .navbar-toggler.custom-toggler {
        border: none !important;
        padding: 8px 10px !important;
        background-color: transparent !important;
        border-radius: 4px !important;
    }
    
    .navbar-toggler.custom-toggler:focus {
        box-shadow: none !important;
        outline: none !important;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 0.9)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
    }
    
    /* Nav item container */
    .navbar-nav {
        height: auto !important;
        padding: 5px 0 !important;
    }
    
    /* Each nav item */
    .nav-item {
        height: auto !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .nav-item:last-child {
        border-bottom: none !important;
    }
    
    /* Individual nav links */
    .nav-link {
        height: auto !important;
        color: white !important;
        font-weight: 400 !important;
        padding: 12px 15px !important;
        font-size: 16px !important;
        display: block !important;
    }
    
    /* Simple hover state */
    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    /* Active state */
    .nav-link.active {
        font-weight: 600 !important;
        background-color: rgba(255, 255, 255, 0.15) !important;
    }
    
    /* Ensure consistency when navbar is scrolled */
    .navbar.scrolled .navbar-collapse {
        background-color: rgba(67, 97, 238, 0.95) !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15) !important;
    }
    
    .navbar.scrolled .nav-link {
        color: white !important;
    }
}

/* Modern Hero Section - Complete Redesign */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0.5) 100%);
    z-index: 1;
}

.hero-content-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 0;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    color: #333;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-btn-primary {
    background-color: #476dff;
    border-color: #476dff;
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(71, 109, 255, 0.4);
    transition: all 0.3s ease;
}

.hero-btn-primary:hover {
    background-color: #3a5cd8;
    border-color: #3a5cd8;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(71, 109, 255, 0.5);
}

.hero-btn-secondary {
    background-color: #333;
    border-color: transparent;
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.hero-btn-secondary:hover {
    background-color: #222;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.hero-note {
    color: #333;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 1rem 1.5rem;
    background: rgba(71, 109, 255, 0.08);
    border-left: 4px solid #476dff;
    border-radius: 0 0.5rem 0.5rem 0;
}

@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.75rem;
    }
    .hero-subtitle {
        font-size: 1.125rem;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .hero-btn-primary, .hero-btn-secondary {
        width: 100%;
    }
}

/* Hero floating image styling */
.hero-image-container {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-floating-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    transform: perspective(1000px) rotateY(-5deg);
    transition: all 0.5s ease;
    position: relative;
}

.hero-floating-image:hover {
    transform: perspective(1000px) rotateY(0deg) translateY(-10px);
    box-shadow: 0 25px 40px rgba(0, 0, 0, 0.3);
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 2.25rem;
    }
    .hero-content-container {
        padding: 2rem 1rem;
    }
}

/* Portfolio mobile-specific styling - "See More" functionality */
@media (max-width: 767.98px) {
    /* Hide additional portfolio items by default */
    .portfolio-mobile-hidden {
        display: none !important;
    }
    
    /* Style for the See More button */
    .see-more-button {
        display: block;
        width: 100%;
        padding: 0.75rem;
        margin-top: 1.5rem;
        text-align: center;
        background-color: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        color: #476dff;
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        position: relative; /* Ensure proper stacking context */
        z-index: 10;
    }
    
    .see-more-button:hover, .see-more-button:focus {
        background-color: #e9ecef;
        text-decoration: none;
    }
    
    /* Add chevron icon */
    .see-more-button .chevron {
        display: inline-block;
        transition: transform 0.3s ease;
        margin-left: 0.5rem;
    }
    
    /* Rotate chevron when expanded */
    .see-more-button.expanded .chevron {
        transform: rotate(180deg);
    }
    
    /* Work Sample Cards - Professional Design */
    .work-card {
        border: 1px solid #e9ecef !important;
        border-radius: 12px !important;
        background: #ffffff !important;
        transition: all 0.3s ease;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
        min-height: 140px;
    }
    
    .work-card:hover {
        border-color: #667eea !important;
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(102,126,234,0.15) !important;
    }
    
    .work-card .card-body {
        padding: 25px 20px !important;
        background: #ffffff !important;
        text-align: center !important;
        border-radius: 12px !important;
    }
    
    .work-card:hover .card-body {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    }
    
    .work-card .card-title {
        color: #667eea !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        margin: 0 !important;
        letter-spacing: 0.5px !important;
        transition: color 0.3s ease !important;
    }
    
    .work-card:hover .card-title {
        color: #ffffff !important;
    }
}
