/* Service Cards Grid */
.services-grid-section,
.products-preview {
    padding: 60px 0;
}

.services-grid-section .row,
.products-preview .row {
    display: flex;
    flex-wrap: wrap;
}

.services-grid-section .row > [class*='col-'],
.products-preview .row > [class*='col-'] {
    display: flex;
    margin-bottom: 30px;
}

/* Unified Service Card Component */
.service-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.service-card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-card-image img {
    transform: scale(1.05);
}

.service-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-card-content h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.service-card-content p {
    flex: 1;
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.service-card-btn {
    display: inline-block;
    align-self: flex-start;
    padding: 8px 20px;
    background: #c4161c;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.service-card:hover .service-card-btn {
    background: #a01218;
}

/* Legacy support for old classes */
.proizvodi-grid,
.usluge-grid {
    padding: 60px 0;
}

.usluge-grid .row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: -30px;
}

.usluge-grid .row > [class*='col-'] {
    display: flex;
    margin-bottom: 30px;
}

.proizvod-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.proizvod-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.proizvod-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.proizvod-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 22px;
    color: #333;
}

.proizvod-content p {
    flex: 1;
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

.proizvod-content .btn {
    align-self: flex-start;
    margin-top: auto;
}

/* Fix for Bootstrap grid wrapping issues */
.proizvodi-grid .row::after,
.usluge-grid .row::after {
    content: "";
    display: table;
    clear: both;
}

/* Use flexbox for proper grid alignment */
.usluge-grid .row {
    display: flex;
    flex-wrap: wrap;
}

.usluge-grid .row > [class*='col-'] {
    display: flex;
}

/* Ensure proper column wrapping on different screen sizes */
@media (min-width: 992px) {
    .proizvodi-grid .col-md-6:nth-child(3n+1),
    .usluge-grid .col-md-6:nth-child(3n+1) {
        clear: left;
    }
}

@media (min-width: 1200px) {
    .proizvodi-grid .col-lg-4:nth-child(3n+1),
    .usluge-grid .col-lg-4:nth-child(3n+1) {
        clear: left;
    }
}

/* Breadcrumb Styles */
.bradcrumbs {
    padding: 20px 0;
    background-color: #f8f8f8;
}

.bradcrumbs .breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0;
}

/* Override Bootstrap default breadcrumb separator */
.bradcrumbs .breadcrumb > li + li:before,
.breadcrumb > li + li:before {
    content: ">" !important;
    padding: 0 8px !important;
    color: #999 !important;
}

/* Breadcrumbs inside hero section (aluplast page) */
.proizvodi-hero .product-hero-content .breadcrumb > li + li:before {
    content: ">" !important;
    padding: 0 8px !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Product Page Typography */
.proizvodiItem-about h1 {
    color: #2c3e50;
    font-size: 32px;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.4;
    letter-spacing: -0.5px;
}

.proizvodiItem-about h2 {
    color: #34495e;
    font-size: 26px;
    font-weight: 500;
    margin-top: 25px;
    margin-bottom: 15px;
    line-height: 1.4;
    letter-spacing: -0.3px;
}

.proizvodiItem-about p {
    color: #555;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* Product Profile Names (H3) */
.proizvodi-opis h3 {
    color: #2c3e50;
    font-size: 23px;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

@media (max-width: 768px) {
    .proizvodiItem-about h1 {
        font-size: 26px;
    }
    
    .proizvodiItem-about h2 {
        font-size: 22px;
    }
    
    .proizvodi-opis h3 {
        font-size: 20px;
    }
}

/* FAQ Component Styles */
.faq-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.faq-title {
    text-align: center;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 40px;
    color: #2c3e50;
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.faq-question {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #f8f9fa;
}

.faq-question.active {
    background-color: #f0f0f0;
}

.faq-question h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #333;
    flex: 1;
}

.faq-icon {
    font-size: 24px;
    font-weight: 300;
    color: #c4161c;
    margin-left: 15px;
    min-width: 24px;
    text-align: center;
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0 25px 20px 25px;
    color: #555;
    line-height: 1.7;
}

.faq-answer p {
    margin: 0;
}

@media (max-width: 768px) {
    .faq-title {
        font-size: 26px;
    }
    
    .faq-question h3 {
        font-size: 16px;
    }
    
    .faq-question {
        padding: 15px 20px;
    }
    
    .faq-answer {
        padding: 0 20px 15px 20px;
    }
}

/* IMPORTANT: Fix for visible text selection in all input fields */
input::selection,
textarea::selection,
select::selection,
.form-control::selection {
  background: #c4161c !important;
  color: #ffffff !important;
  text-shadow: none !important;
}

input::-moz-selection,
textarea::-moz-selection,
select::-moz-selection,
.form-control::-moz-selection {
  background: #c4161c !important;
  color: #ffffff !important;
  text-shadow: none !important;
}
