/* Products page styles - fixes for white margins */

/* Reset margins and padding for specific elements only */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
}

/* Header fixes to match reference */
body header,
body > header {
    background: #1a1a1a !important;
    min-height: 20px !important;
    padding-top: 18px !important;
    padding-bottom: 10px !important;
    margin: 0 !important;
}

body header p,
body > header p {
    margin: 0 !important;
    color: #ffffff !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
}

body header .fa,
body > header .fa {
    color: #28a7e9 !important;
    margin-right: 10px !important;
}

body header span,
body > header span {
    font-weight: bold !important;
    padding-right: 10px !important;
    padding-left: 4px !important;
}

body header a,
body > header a {
    color: #999 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

body header .social-icon,
body > header .social-icon {
    text-align: right !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

body header .social-icon li,
body > header .social-icon li {
    display: inline-block !important;
    margin-right: 10px !important;
    margin-left: 0 !important;
}

body header .social-icon li:last-child,
body > header .social-icon li:last-child {
    margin-right: 0 !important;
}

body header .social-icon li a,
body > header .social-icon li a {
    color: #ffffff !important;
    font-size: 18px !important;
    border: none !important;
    width: 20px !important;
    height: 20px !important;
    line-height: 20px !important;
    text-align: center !important;
    transition: color 0.3s !important;
    display: inline-block !important;
}

body header .social-icon li a:hover,
body > header .social-icon li a:hover {
    color: #28a7e9 !important;
}

/* Header container and row fixes */
body header .container,
body > header .container {
    margin: 0 auto !important;
    padding: 0 15px !important;
    max-width: 1200px !important;
    width: 100% !important;
}

body header .row,
body > header .row {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

body header .col-md-3,
body header .col-sm-4,
body header .col-xs-12,
body > header .col-md-3,
body > header .col-sm-4,
body > header .col-xs-12 {
    padding: 0 15px !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
}

body header .col-md-3:first-child,
body > header .col-md-3:first-child {
    flex: 0 0 25% !important;
}

body header .col-md-3:nth-child(2),
body > header .col-md-3:nth-child(2) {
    flex: 0 0 25% !important;
}

body header .col-md-5,
body > header .col-md-5 {
    flex: 0 0 50% !important;
    text-align: right !important;
}

/* Global section title styles - overridden by redesign.css */
.section-title {
    text-align: center;
    font-size: 40px;
    padding-bottom: 40px;
    color: #ffffff;
    margin-bottom: 3rem;
}

.section-title span {
    color: #28a7e9;
    font-weight: bold;
}

/* Market Verticals styles - updated design */
#verticals {
    background: #1a1a1a;
    padding: 80px 0;
}

/* IC Backend Services section */
#advantages {
    padding: 80px 0 !important;
}

/* About section */
#about {
    padding: 80px 0 !important;
}

/* Contact section */
#contacts {
    padding: 80px 0 !important;
}

/* Partners section */
#partners {
    padding: 80px 0 !important;
}

#partners .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

#partners .partner-card {
    background: #fff;
    border-radius: 10px;
    padding: 30px 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    margin-bottom: 40px;
    text-align: center;
}

#partners .partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

#partners .partner-icon {
    /*width: 120px;*/
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

#partners .partner-icon img {
    /*max-width: 80%;*/
    /*max-height: 80%;*/
    object-fit: contain;
}

#partners .partner-card h5 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    text-align: center;
}

/* Center the grid when cards are smaller */
#partners .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 -15px;
}

#partners .col-md-4 {
    flex: 0 0 auto;
    width: 350px;
    padding: 0 15px;
    margin-bottom: 80px;
}

#verticals .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

#verticals .vertical-card {
    background: #fff;
    border-radius: 10px;
    padding: 30px 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    margin-bottom: 40px;
    text-align: center;
}

#verticals .vertical-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

#verticals .vertical-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

#verticals .vertical-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#verticals .vertical-card h5 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    text-align: center;
}

/* Navbar brand logo fixes */
.navbar-brand {
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    height: 60px !important;
    display: block !important;
}

.navbar-brand img {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    height: 100px !important;
    width: auto !important;
    opacity: 1 !important;
    display: block !important;
}

/* Product pages fixes - apply only to content, not navigation */
body:has(.product-hero) {
    background: #1a1a1a !important;
    color: #ffffff !important;
}

/* Ensure navigation has white background on product pages */
body:has(.product-hero) .templatemo-nav {
    background: #ffffff !important;
}

/* Product pages use same navigation as main page - no custom overrides needed */

.product-hero {
    background: url('../imgs/header.jpg') no-repeat !important;
    background-size: cover !important;
    color: white !important;
    padding: 80px 0 !important;
    text-align: center !important;
}

.product-hero h1 {
    color: white !important;
    font-size: 3rem !important;
    margin-bottom: 20px !important;
}

.product-hero p {
    color: white !important;
    font-size: 1.2rem !important;
    margin-bottom: 30px !important;
}

.product-content {
    padding: 80px 0 !important;
    background: #1a1a1a !important;
}

.product-description {
    background: white !important;
    padding: 40px !important;
    border-radius: 10px !important;
    margin-bottom: 40px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
}

.product-description h3 {
    color: #333 !important;
    margin-bottom: 20px !important;
}

.product-description p {
    color: #666 !important;
    line-height: 1.6 !important;
}

.product-specs {
    background: white !important;
    padding: 40px !important;
    padding-left: 30px !important;
    padding-right: 30px !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
    margin-bottom: 40px !important;
    margin-left: 30px !important;
}

/* Дополнительный отступ для колонки с Product Specifications */
.col-md-4:has(.product-specs) {
    padding-left: 50px !important;
}

.product-specs h3 {
    color: #333 !important;
    margin-bottom: 20px !important;
}

.product-specs p {
    color: #666 !important;
    margin-bottom: 10px !important;
}

.product-features {
    background: white !important;
    padding: 40px !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
}

.product-features h3 {
    color: #333 !important;
    margin-bottom: 20px !important;
}

.product-features ul {
    list-style: none !important;
    padding: 0 !important;
}

.product-features ul li {
    padding: 10px 0 !important;
    border-bottom: 1px solid #eee !important;
    color: #666 !important;
}

.product-features ul li:before {
    content: "✓" !important;
    color: #28a7e9 !important;
    font-weight: bold !important;
    margin-right: 10px !important;
}

/* Simple CSS animations fallback */
.no-wow .wow {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

.wow.fadeIn {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

/* Force animation for all wow elements when WOW.js is not available */
body:not(.wow-loaded) .wow.fadeIn {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

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

/* Footer navigation styles - matching main navigation */
.prefooter {
    height: 70px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
}

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

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

.prefooter .navbar-brand {
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    line-height: 1 !important;
}

.prefooter .navbar-brand img {
    margin: 0 !important;
    padding: 0 !important;
    height: 70px !important;
    width: auto !important;
}

.prefooter .navbar-right {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.footer-nav-link {
    color: #333333 !important;
    text-decoration: none !important;
    padding: 0 15px !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: bold !important;
    transition: color 0.3s ease !important;
}

.footer-nav-link:hover {
    color: #28a7e9 !important;
    text-decoration: none !important;
}

/* Product card styles */
.product-card {
    height: 350px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.product-card p {
    color: #666 !important;
    margin-bottom: 20px !important;
    line-height: 1.6 !important;
    flex-grow: 1 !important;
}

/* Product card buttons */
.product-card .btn {
    border-radius: 25px !important;
    color: #ffffff !important;
    background-color: #28a7e9 !important;
    border: 2px solid #28a7e9 !important;
    padding: 8px 20px !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
    margin-top: auto !important;
}

.product-card .btn:hover {
    background-color: #1e7bb8 !important;
    border-color: #1e7bb8 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(40, 167, 233, 0.3) !important;
}

/* All products page buttons */
#products .btn {
    border-radius: 25px !important;
    background-color: #28a7e9 !important;
    border: 2px solid #28a7e9 !important;
    padding: 8px 20px !important;
    font-weight: bold !important;
    transition: all 0.3s ease !important;
}

/* View All Products button */
#products .text-center {
    margin-top: 5px !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

#products .btn-outline-primary {
    border-radius: 25px !important;
    border: 2px solid #28a7e9 !important;
    color: #28a7e9 !important;
    background-color: transparent !important;
    padding: 12px 30px !important;
    font-weight: bold !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
}

#products .btn-outline-primary:hover {
    background-color: #28a7e9 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(40, 167, 233, 0.3) !important;
}

#products .btn:hover {
    background-color: #1e7bb8 !important;
    border-color: #1e7bb8 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(40, 167, 233, 0.3) !important;
}

/* About section text wrapping */
.about-content {
    overflow: hidden;
    margin-bottom: 30px;
}

.about-image {
    width: 500px;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 0 20px 20px 0;
    float: left;
}

.about-image.float-right {
    float: right;
    margin: 0 0 20px 20px;
}

.about-content p {
    text-align: justify;
    line-height: 1.6;
    margin-bottom: 15px;
    clear: none;
}

.about-content h3,
.about-content h4 {
    margin-top: 0;
    margin-bottom: 15px;
    clear: none;
}

.about-content ul {
    margin-bottom: 20px;
    clear: none;
}

/* Clear float after each about-content block */
.about-content::after {
    content: "";
    display: table;
    clear: both;
}

/* Reset for main structural elements */
body {
    margin: 0 !important;
    padding: 0 !important;
}

/* Navigation fixes - removed to avoid conflicts with templatemo-style.css */

.nav-first {
    margin: 0 !important;
    padding: 10px 0 !important;
}

.nav-second {
    margin: 0 !important;
    padding: 10px 0 !important;
}

/* Section fixes - only remove top margins */
section {
    margin-top: 0 !important;
}

/* Header section fixes */
.header-section {
    margin: 0 !important;
    padding: 0 !important;
}

/* Product hero section */
.product-hero {
    margin: 0 !important;
    padding: 80px 0 !important;
}

/* Product layout without Bootstrap */
.product-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.product-left {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.product-right {
    flex: 1;
    min-width: 300px;
}

/* Product specs section */
.product-specs {
    margin: 0 !important;
    padding: 40px !important;
    background: white !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
}

/* Contact Us button styling - matching main page buttons */
.product-specs .btn {
    border-radius: 25px !important;
    color: #ffffff !important;
    background-color: #28a7e9 !important;
    border: none !important;
    padding: 10px 25px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    margin-top: 20px !important;
}

.product-specs .btn:hover {
    background-color: #1e7bb8 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(40, 167, 233, 0.3) !important;
    text-decoration: none !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .product-layout {
        flex-direction: column;
    }
    
    .product-right {
        min-width: auto;
    }
}

/* Footer fixes */
footer {
    margin: 0 !important;
    padding: 20px 0 !important;
    background-color: #343a40 !important;
    color: white !important;
}

footer p {
    color: white !important;
}

/* Card fixes */
.card {
    margin: 0 !important;
}

.card-body {
    padding: 20px !important;
}

/* Row fixes - preserve Bootstrap spacing */
.row {
    margin-left: -15px !important;
    margin-right: -15px !important;
}

/* Column fixes - preserve Bootstrap spacing */
.col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, 
.col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
.col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6,
.col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Text fixes - preserve normal spacing */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
}

p {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
}

/* List fixes */
ul, ol {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
    padding-left: 2rem !important;
}

li {
    margin-bottom: 0.5rem !important;
}

/* Button fixes */
.btn {
    margin: 0 !important;
    padding: 0.375rem 0.75rem !important;
}

/* Form fixes */
.form-group {
    margin-bottom: 1rem !important;
}

/* Image fixes */
img {
    max-width: 100% !important;
    height: auto !important;
}

/* Specific spacing for content */
.spec-item {
    margin-bottom: 20px !important;
    padding-left: 20px !important;
}

.product-icon-large {
    margin: 0 auto 30px !important;
}

/* WOW.js animations - based on reference project */
.wow {
    visibility: hidden;
}

.wow.animated {
    visibility: visible;
}

/* Products section styles */
#products {
    padding: 80px 0 !important;
}

/* Products section container */
#products .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Limit column width for better card proportions */
#products .col-md-4 {
    max-width: 350px;
    margin-bottom: 30px;
}

#verticals .col-md-4 {
    max-width: 350px;
    margin-bottom: 30px;
}

/* Center the grid when cards are smaller */
#products .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 -15px;
}

#verticals .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 -15px;
}

#products .col-md-4 {
    flex: 0 0 auto;
    width: 350px;
    padding: 0 15px;
    margin-bottom: 80px;
}

#verticals .col-md-4 {
    flex: 0 0 auto;
    width: 350px;
    padding: 0 15px;
    margin-bottom: 80px;
}

/* Product cards styles - based on reference project */
.product-card {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    margin-bottom: 40px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #28a7e9, #1e7bb8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.product-card h5 {
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.product-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Modal styles */
.modal {
    z-index: 9999 !important;
}

.modal-backdrop {
    z-index: 9998 !important;
}

.modal-dialog {
    z-index: 9999 !important;
}

/* Modal product cards */
.product-card-modal {
    transition: all 0.3s ease;
    max-width: 300px;
    margin: 0 auto;
}

.product-card-modal:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.product-icon-modal {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, #28a7e9, #1e7bb8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-icon-modal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

/* Prefooter styles - white background under navigation */
.prefooter {
    margin: 0;
    padding: 20px 0;
    background-color: white !important;
}

.prefooter img {
    max-width: 250px;
    height: auto;
    transition: all 0.3s ease;
}

.prefooter img:hover {
    transform: scale(1.02);
}


/* Fix for sticky navigation */
.sticky-top {
    position: sticky !important;
    top: 0 !important;
    z-index: 1020 !important;
}
