/*
 * Base styles for OB DM Elementor templates.
 *
 * This stylesheet provides sensible defaults and an orange accent colour that
 * matches the OB‑DM brand. It uses simple class names scoped to the plugin
 * (prefixed with `.ob-dm`) to avoid conflicts with other themes or plugins.
 */

:root {
    /* Primary accent colour matching the OB‑DM store’s orange theme */
    /* Updated accent colour to match the store's orange theme (#FCA244). */
    --ob-dm-accent: #FCA244;
    /* Slightly dark tone for text and icons; kept default dark for contrast. */
    --ob-dm-dark: #1a1a1a;
    --ob-dm-light: #ffffff;
}

/* General resets for widget containers */
.ob-dm-section {
    box-sizing: border-box;
    padding: 3rem 2rem;
    margin: 0 auto;
    max-width: 1200px;
}

/* Headings and texts */
.ob-dm-section h1,
.ob-dm-section h2,
.ob-dm-section h3 {
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--ob-dm-heading, var(--ob-dm-dark));
}

.ob-dm-section p,
.ob-dm-section li,
.ob-dm-section span,
.ob-dm-section em,
.ob-dm-section strong {
    color: var(--ob-dm-text, var(--ob-dm-dark));
    line-height: 1.6;
}

.ob-dm-section p {
    margin-bottom: 1.5rem;
}

/* Accent buttons */
/*
 * Button styles
 *
 * Buttons adopt the primary accent colour for their fill by default and offer a darker
 * shade on hover. They also include a border to more closely mirror the call‑to‑action
 * styles shown in the reference video provided by the user. Text colour inverts on
 * hover to maintain contrast.
 */
.ob-dm-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--ob-dm-button-bg, var(--ob-dm-accent));
    color: var(--ob-dm-button-text, var(--ob-dm-light));
    text-decoration: none;
    border: 2px solid var(--ob-dm-button-bg, var(--ob-dm-accent));
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

/* On hover invert the colours: make the button background white and the text/accent coloured.
   This gives a clear visual cue that the button is interactive and matches the design shown
   in the provided reference video. */
.ob-dm-button:hover {
    background-color: var(--ob-dm-button-hover-bg, var(--ob-dm-light));
    color: var(--ob-dm-button-hover-text, var(--ob-dm-accent));
    border-color: var(--ob-dm-button-hover-bg, var(--ob-dm-accent));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* Grid layouts */
.ob-dm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.ob-dm-card {
    background-color: var(--ob-dm-light);
    padding: 2rem;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

/* Icon styles: apply accent colour globally to any .ob-dm-icon element */
.ob-dm-icon {
    font-size: 2rem;
    color: var(--ob-dm-accent);
    margin-bottom: 1rem;
}

/* Two column layout */
.ob-dm-two-col {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}

.ob-dm-two-col > .col {
    flex: 1 1 45%;
}

.ob-dm-two-col img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* FAQ accordion */
.ob-dm-faq-item {
    border-bottom: 1px solid #e5e5e5;
}

.ob-dm-faq-question {
    cursor: pointer;
    padding: 1rem 0;
    font-weight: 600;
    position: relative;
}

.ob-dm-faq-question:after {
    content: '\002B';
    position: absolute;
    right: 0;
    top: 0;
    font-size: 1.5rem;
    line-height: 1.5rem;
    color: var(--ob-dm-accent);
    transition: transform 0.2s ease;
}

.ob-dm-faq-question.active:after {
    transform: rotate(45deg);
}

.ob-dm-faq-answer {
    display: none;
    padding: 0.5rem 0 1rem;
    color: var(--ob-dm-dark);
}

/* Testimonials */
.ob-dm-testimonials {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.ob-dm-testimonial {
    flex: 1 1 300px;
    background-color: var(--ob-dm-light);
    padding: 1.5rem;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.ob-dm-testimonial .ob-dm-rating {
    color: #f1c40f;
    margin-bottom: 0.5rem;
}

/* Portfolio gallery */
.ob-dm-portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.ob-dm-portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.ob-dm-portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.ob-dm-portfolio-item:hover img {
    transform: scale(1.05);
}

.ob-dm-portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ob-dm-portfolio-item:hover .ob-dm-portfolio-overlay {
    opacity: 1;
}

.ob-dm-portfolio-overlay .ob-dm-button {
    background-color: var(--ob-dm-button-bg, var(--ob-dm-accent));
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    /* Stack two column layouts vertically */
    .ob-dm-two-col {
        flex-direction: column;
    }
    .ob-dm-two-col > .col {
        flex: 1 1 100%;
    }
    /* Stack testimonial cards */
    .ob-dm-testimonials {
        flex-direction: column;
    }
    /* Tighter grid on small screens */
    .ob-dm-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* ===== Advanced service builder widgets ===== */
.ob-dm-section-title{font-size:clamp(1.8rem,3vw,2.8rem);margin-bottom:.75rem}
.ob-dm-section-subtitle{max-width:760px}
.ob-dm-chip{display:inline-flex;align-items:center;gap:.4rem;padding:.45rem .9rem;border-radius:999px;background:rgba(252,162,68,.12);color:var(--ob-dm-accent);font-weight:700;font-size:.88rem;margin-bottom:1rem}
.ob-dm-chip-light{background:rgba(255,255,255,.14);color:#fff}
.ob-dm-center{text-align:center;margin-top:1.25rem}
.ob-dm-addon-grid,.ob-dm-pricing-grid{display:grid;gap:1.5rem}
.ob-dm-addon-grid.columns-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.ob-dm-addon-grid.columns-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.ob-dm-addon-grid.columns-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.ob-dm-addon-card,.ob-dm-pricing-plan,.ob-dm-state-card,.ob-dm-showcase-item{background:#fff;border-radius:24px;box-shadow:0 16px 40px rgba(15,24,39,.08);overflow:hidden;border:1px solid rgba(15,24,39,.06)}
.ob-dm-addon-media{position:relative;background:linear-gradient(135deg, rgba(252,162,68,.16), rgba(15,24,39,.08));aspect-ratio:16/10;overflow:hidden}
.ob-dm-addon-image,.ob-dm-showcase-media img,.ob-dm-state-card img,.ob-dm-payment-media img{width:100%;height:100%;object-fit:cover;display:block}
.ob-dm-addon-placeholder{min-height:220px;background:linear-gradient(135deg,#f8fafc,#eef2f7)}
.ob-dm-addon-badge{position:absolute;top:14px;right:14px;background:#0F1827;color:#fff;padding:.45rem .8rem;border-radius:999px;font-size:.8rem;font-weight:700;z-index:2}
.ob-dm-addon-body,.ob-dm-pricing-plan{padding:1.35rem}
.ob-dm-addon-body h3,.ob-dm-pricing-plan h3,.ob-dm-showcase-item h3,.ob-dm-state-card h3{font-size:1.3rem;margin-bottom:.65rem}
.ob-dm-addon-price-row,.ob-dm-showcase-footer{display:flex;align-items:center;gap:.75rem;justify-content:space-between;flex-wrap:wrap;margin:1rem 0}
.ob-dm-addon-price,.ob-dm-plan-price{font-size:1.45rem;font-weight:800;color:#0F1827}
.ob-dm-addon-old-price{text-decoration:line-through;opacity:.55}
.ob-dm-addon-list{list-style:none;margin:0 0 1rem;padding:0;display:grid;gap:.65rem}
.ob-dm-addon-list li{position:relative;padding-right:1.25rem;margin:0}
.ob-dm-addon-list li:before{content:"✓";position:absolute;right:0;top:0;color:var(--ob-dm-accent);font-weight:700}
.ob-dm-addon-note{padding:.8rem 1rem;background:#f8fafc;border-radius:14px;margin-bottom:1rem;font-size:.93rem}
.ob-dm-addon-actions{display:flex;flex-wrap:wrap;gap:.75rem}
.ob-dm-button-ghost{background:transparent;color:#0F1827;border-color:rgba(15,24,39,.12)}
.ob-dm-button-ghost:hover{color:var(--ob-dm-button-hover-text,var(--ob-dm-accent));background:#fff}
.ob-dm-showcase-list{display:grid;gap:1.5rem}
.ob-dm-showcase-item{display:grid;grid-template-columns:1.2fr .8fr;align-items:stretch}
.ob-dm-showcase-copy{padding:1.7rem}
.ob-dm-showcase-summary{font-size:1.1rem;font-weight:600;color:#0F1827}
.ob-dm-showcase-details{opacity:.88}
.ob-dm-showcase-media{min-height:280px;background:linear-gradient(135deg,rgba(252,162,68,.12),rgba(15,24,39,.08))}
.ob-dm-pricing-grid{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));margin-top:1.25rem}
.ob-dm-pricing-plan{position:relative}
.ob-dm-pricing-plan .ob-dm-addon-badge{position:static;display:inline-flex;margin-bottom:1rem;background:rgba(252,162,68,.12);color:var(--ob-dm-accent)}
.ob-dm-before-after-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem;margin-top:1.25rem}
.ob-dm-state-card{padding:1.1rem;background:#fff}
.ob-dm-state-card img{border-radius:18px;aspect-ratio:16/10;margin-top:.5rem;margin-bottom:1rem}
.ob-dm-state-card-after{background:linear-gradient(180deg,#fff,#fff7ef)}
.ob-dm-payment-strip{display:grid;grid-template-columns:1.1fr .9fr;gap:1.5rem;align-items:center;border-radius:32px;background:linear-gradient(135deg,#0F1827,#16243a);overflow:hidden;max-width:1280px}
.ob-dm-payment-copy{padding:1rem 0}
.ob-dm-payment-media{min-height:320px;border-radius:24px;overflow:hidden;background:rgba(255,255,255,.04)}
.ob-dm-button-ghost-light{background:transparent;border-color:rgba(255,255,255,.24);color:#fff}
.ob-dm-button-ghost-light:hover{background:#fff;color:#0F1827;border-color:#fff}

@media (max-width: 1024px){
  .ob-dm-addon-grid.columns-4,.ob-dm-addon-grid.columns-3{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ob-dm-showcase-item,.ob-dm-payment-strip{grid-template-columns:1fr}
}
@media (max-width: 767px){
  .ob-dm-addon-grid.columns-2,.ob-dm-addon-grid.columns-3,.ob-dm-addon-grid.columns-4,.ob-dm-before-after-grid{grid-template-columns:1fr}
  .ob-dm-section{padding:2rem 1rem}
  .ob-dm-addon-actions .ob-dm-button{width:100%;text-align:center}
}
