/*
 * 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));
    }
}