/* ============================================
   CUSTOM CSS FOR TREPTESCARA.RO
   ============================================ */

/* ============================================
   1. CORE COLOR SCHEME - WARM AMBER
   ============================================ */

.circle-number,
.step-card .circle-number {
    background: #d98c2b !important;
}

.custom-cta-button {
    background: #d98c2b !important;
}

.custom-cta-button:hover {
    background: #b8701f !important;
}

.price,
.products .price {
    color: #d98c2b !important;
}

.product-flag.new,
.product-flag.sale {
    background: #d98c2b !important;
}

.step-card:hover,
.products .product-miniature:hover {
    border-color: #d98c2b !important;
}

/* Remove uppercase from headings */
.h2.products-section-title,
.h2.products-section-title.text-uppercase,
.featured-products .h2,
h2.products-section-title,
h2.text-uppercase,
h1, h2, h3, h4, h5, h6,
.text-uppercase {
    text-transform: none !important;
}

/* ============================================
   2. FEATURES & STEPS GRID
   ============================================ */

.features-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
}

.feature-card {
    flex: 1;
    min-width: 250px;
    padding: 25px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

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

.steps-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 40px auto;
}

.step-card {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: white;
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: #d98c2b;
}

.circle-number {
    font-size: 36px;
    background: #d98c2b;
    color: white;
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    margin: 0 auto 15px;
    font-weight: bold;
}

/* ============================================
   3. PRODUCT GRID & CARDS
   ============================================ */

.products.row,
.products {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    margin: 0 auto !important;
}

.products .js-product {
    padding: 0 10px !important;
    margin-bottom: 30px !important;
    box-sizing: border-box !important;
}

@media (min-width: 1200px) {
    .products .col-xl-3,
    .products .js-product {
        width: 25% !important;
        max-width: 25% !important;
        flex: 0 0 25% !important;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .products .col-lg-4,
    .products .js-product {
        width: 33.333% !important;
        max-width: 33.333% !important;
        flex: 0 0 33.333% !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .products .col-sm-6,
    .products .js-product {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }
}

@media (max-width: 767px) {
    .products .col-xs-12,
    .products .js-product {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
}

.products .product-miniature {
    position: relative;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.products .product-miniature:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: #d98c2b;
}

.products .thumbnail-container {
    position: relative !important;
    overflow: hidden !important;
    padding: 0 !important;
    min-height: 350px !important;
    background: #f5f5f5;
}

.products .thumbnail img,
.products .product-thumbnail img {
    display: block !important;
    width: 100% !important;
    height: 350px !important;
    object-fit: cover !important;
    transition: transform .4s ease;
}

.products .product-miniature:hover img {
    transform: scale(1.03);
}

.products .product-description {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    padding: 20px 12px 12px !important;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.55) 40%, rgba(0,0,0,0) 100%) !important;
    text-align: left !important;
    z-index: 2;
}

.products .product-title {
    margin: 0 0 4px !important;
    line-height: 1.2 !important;
}

.products .product-title a {
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

.products .product-title a:hover {
    color: #d98c2b !important;
}

.products .product-price-and-shipping {
    margin: 0 !important;
}

.products .price {
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

.products .product-flags {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    list-style: none;
    margin: 0;
    padding: 0;
}

.products .product-flag {
    background: #d98c2b;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.products .quick-view {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    z-index: 20 !important;
    background: #d98c2b !important;
    color: white !important;
    padding: 10px 18px !important;
    border-radius: 40px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.products .quick-view:hover {
    background: #b8701f !important;
    transform: scale(1.05) !important;
}

.products .product-miniature:hover .quick-view {
    opacity: 1 !important;
    visibility: visible !important;
}

@media (max-width: 767px) {
    .products .thumbnail-container {
        min-height: 280px !important;
    }
    .products .thumbnail img,
    .products .product-thumbnail img {
        height: 280px !important;
    }
    .products .product-title a {
        font-size: 12px !important;
    }
    .products .price {
        font-size: 14px !important;
    }
    .products .quick-view {
        padding: 8px 14px !important;
        font-size: 0.75rem !important;
        top: 8px !important;
        right: 8px !important;
        opacity: 0.8 !important;
        visibility: visible !important;
    }
}

/* ============================================
   4. CARD HOVER EFFECTS
   ============================================ */

.benefit-card,
.application-card,
.material-card,
.accessory-card,
.product-type-card {
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.benefit-card:hover,
.application-card:hover,
.material-card:hover,
.accessory-card:hover,
.product-type-card:hover {
    transform: translateY(-5px) !important;
    border-color: #d98c2b !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
    background: #ffffff !important;
}

/* ============================================
   5. TESTIMONIALS (Homepage only)
   ============================================ */

#custom-text div[style*="background: #f9f9f9"],
#custom-text div[style*="background:#f9f9f9"] {
    background: #f0f0f0 !important;
    border-radius: 16px !important;
    padding: 25px !important;
    margin-bottom: 25px !important;
    transition: all 0.3s ease !important;
    border: 1px solid #e0e0e0 !important;
}

#custom-text div[style*="background: #f9f9f9"]:hover,
#custom-text div[style*="background:#f9f9f9"]:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
    background: #ffffff !important;
    border-color: #d98c2b !important;
}

/* ============================================
   6. WHATSAPP BUTTON
   ============================================ */

.whatsapp-button {
    display: inline-block !important;
    background: #d98c2b !important;
    color: #ffffff !important;
    padding: 12px 25px !important;
    text-decoration: none !important;
    border-radius: 5px !important;
    transition: all 0.3s ease !important;
}

.whatsapp-button:hover {
    background: #b8701f !important;
}

@media (max-width: 768px) {
    .whatsapp-button {
        display: block !important;
        width: 90% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
        padding: 14px 20px !important;
        font-size: 0.9rem !important;
        text-align: center !important;
    }
}

/* ============================================
   7. CTA BUTTON (Final CTA on CMS pages)
   ============================================ */

.btn-project {
    display: inline-block !important;
    background: #d98c2b !important;
    color: #ffffff !important;
    padding: 12px 25px !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    transition: background 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 48px !important;
    line-height: 1.4 !important;
}

.btn-project:hover {
    background: #c47a20 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Mobile Styles for btn-project */
@media (max-width: 768px) {
    .btn-project {
        display: block !important;
        width: 100% !important;
        padding: 15px 20px !important;
        font-size: 1.1rem !important;
        text-align: center !important;
        margin: 15px auto !important;
        box-sizing: border-box !important;
        min-height: 54px !important;
    }
}

/* ============================================
   8. FOOTER INFO (CMS pages)
   ============================================ */

.footer-info {
    padding: 0 15px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    width: 100% !important;
}

.footer-info img {
    width: 100% !important;
    max-width: 250px !important;
    height: auto !important;
}

.footer-info p,
.footer-info a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
}

/* ============================================
   9. RESPONSIVE OVERRIDES
   ============================================ */

@media (max-width: 768px) {
    .features-grid,
    .steps-grid {
        gap: 15px;
        padding: 0 15px;
    }
    .feature-card,
    .step-card {
        min-width: 100%;
    }
    .circle-number {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 28px;
    }
}

/* Stronger mobile fix for overlapping */
@media (max-width: 768px) {
    .row:last-of-type .col-md-12 div,
    div[style*="margin-top: 20px"] {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
    }
    
    .row:last-of-type .col-md-12 a {
        display: inline-block !important;
        margin: 5px !important;
        padding: 8px 15px !important;
        font-size: 0.8rem !important;
        white-space: nowrap !important;
    }
    
    .row a[href*="wa.me"],
    .whatsapp-button {
        display: block !important;
        width: 85% !important;
        max-width: 260px !important;
        margin: 15px auto !important;
        padding: 12px 15px !important;
        font-size: 0.85rem !important;
        text-align: center !important;
        white-space: normal !important;
        line-height: 1.3 !important;
    }
}

/* ============================================
   10. LINK STYLING
   ============================================ */

/* Link styling - ONLY for content links, NOT for menu */
.content-links a,
.checklist a,
.alert-box a,
.faq-item a,
.section a:not(.btn-primary):not(.whatsapp-button) {
    color: #d98c2b;
    text-decoration: none;
    font-size: inherit;
    padding: 0;
    background: transparent;
}

.content-links a:hover,
.checklist a:hover,
.alert-box a:hover,
.faq-item a:hover,
.section a:not(.btn-primary):not(.whatsapp-button):hover {
    color: #c07a1f;
    text-decoration: underline;
}

/* Menu/Navigation links - restore original padding and styling */
.menu a,
.nav a,
header a,
.main-menu a,
.navigation a {
    font-size: inherit;
    padding: 10px 15px !important;
    display: inline-block;
    background: transparent;
    color: inherit;
}

/* WhatsApp and button styles remain */
.whatsapp-button,
.btn-primary,
a.whatsapp-button {
    color: #ffffff !important;
    background: #d98c2b;
    padding: 12px 20px;
    display: inline-block;
    font-size: 1rem;
}

.whatsapp-button:hover,
.btn-primary:hover,
a.whatsapp-button:hover {
    background: #c07a1f;
    color: #ffffff !important;
    text-decoration: none;
}

/* ============================================
   11. SEARCH WIDGET
   ============================================ */

.search-widgets-container,
.col-md-4 .search-widgets,
.col-sm-4 .search-widgets {
    max-width: 200px !important;
    flex: 0 0 200px !important;
}

#search_widget {
    max-width: 250px !important;
    width: 100% !important;
    min-width: 140px !important;
}

#search_widget input[name="s"] {
    max-width: 180px !important;
    width: 100% !important;
    font-size: 12px !important;
    padding: 5px 25px 5px 30px !important;
}

#search_widget .material-icons.search {
    font-size: 18px !important;
    line-height: 32px !important;
}

/* ============================================
   12. CMS PAGE MOBILE FIXES
   ============================================ */

@media (max-width: 768px) {
    .page-cms a,
    #content a,
    .page-content a {
        font-size: 1rem !important;
        padding: 0 !important;
        display: inline !important;
        background: transparent !important;
        border: none !important;
    }
    
    .page-cms .checklist a,
    .page-cms .faq-item a,
    .page-cms .alert-box a,
    .page-cms .container a {
        font-size: 1rem !important;
        padding: 0 !important;
        display: inline !important;
    }
    
    .page-cms .whatsapp-button,
    .page-cms .btn-primary,
    .page-cms .btn-project {
        font-size: 1rem !important;
        padding: 12px 20px !important;
        display: inline-block !important;
    }
}

/* ============================================
   FOOTER - CONSISTENT TEXT ON MOBILE
   ============================================ */

/* Desktop - keep as is */
.footer-text {
    font-size: 1rem;
}

/* Mobile - make everything the same size */
@media (max-width: 768px) {
    .col-md-12 p,
    .col-md-12 p a,
    .col-md-12 a[href*="content/9-sfaturi-practice"] {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        word-wrap: break-word !important;
    }
    
    .col-md-12 br {
        display: block !important;
    }
}

/* ============================================
   FOOTER FIX FOR ALL PAGES
   ============================================ */

@media (max-width: 768px) {
    /* Target all footer links */
    .col-md-12 p,
    .col-md-12 p a,
    .col-md-12 a[href*="content/"],
    .col-md-12 a[href*="content/"]:link,
    .col-md-12 a[href*="content/"]:visited,
    .col-md-12 a[href*="content/"]:hover,
    .col-md-12 a[href*="content/"]:active {
        font-size: 0.85rem !important;
        font-weight: normal !important;
        text-decoration: none !important;
        display: inline !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        line-height: 1.4 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .col-md-12 p {
        font-size: 0.85rem !important;
        margin-bottom: 5px !important;
        line-height: 1.4 !important;
    }
    
    .col-md-12 img {
        max-width: 180px !important;
        height: auto !important;
    }
}