/**
 * DecatHome Article Style CSS
 * Smart Home Security Styling for decathome.com
 * Author: Marcus Sterling
 * Version: 1.0.1
 */

/* ================================================================
   RESET & BASE TYPOGRAPHY
   ================================================================ */

.decathome-blog-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: var(--dh-font-size, 17px);
    line-height: 1.7;
    color: var(--dh-gray-800);
    background: transparent;
    margin: 0;
    padding: 0;
}

.decathome-blog-wrap * {
    box-sizing: border-box;
}

/* ================================================================
   TEXT & HEADINGS
   ================================================================ */

.decathome-blog-wrap h1,
.decathome-blog-wrap h2,
.decathome-blog-wrap h3,
.decathome-blog-wrap h4,
.decathome-blog-wrap h5,
.decathome-blog-wrap h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: var(--dh-accent);
    font-weight: 700;
    line-height: 1.3;
}

.decathome-blog-wrap h1 {
    font-size: 2.2em;
    margin-top: 0;
}

.decathome-blog-wrap h2 {
    font-size: 1.8em;
    padding-bottom: 0.3em;
    border-bottom: 3px solid var(--dh-security);
}

.decathome-blog-wrap h3 {
    font-size: 1.4em;
    color: var(--dh-security);
}

.decathome-blog-wrap h4 {
    font-size: 1.2em;
}

.decathome-blog-wrap p {
    margin: 0 0 1.2em 0;
    line-height: 1.8;
}

.decathome-blog-wrap p:last-child {
    margin-bottom: 0;
}

.decathome-blog-wrap a {
    color: var(--dh-security);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.decathome-blog-wrap a:hover {
    color: var(--dh-tech);
    text-decoration: underline;
}

.decathome-blog-wrap strong {
    font-weight: 700;
    color: var(--dh-accent);
}

.decathome-blog-wrap em {
    font-style: italic;
    color: var(--dh-gray-700);
}

/* ================================================================
   LISTS
   ================================================================ */

.decathome-blog-wrap ul,
.decathome-blog-wrap ol {
    margin: 1.2em 0;
    padding-left: 1.8em;
}

.decathome-blog-wrap li {
    margin-bottom: 0.6em;
    line-height: 1.8;
}

.decathome-blog-wrap ul ul,
.decathome-blog-wrap ol ol {
    margin: 0.6em 0;
}

.decathome-blog-wrap li:last-child {
    margin-bottom: 0;
}

/* ================================================================
   CONTENT CONTAINER & MAX WIDTH
   ================================================================ */

.decathome-blog-wrap.dh-article-main {
    max-width: var(--dh-max-width, 860px);
    margin: 0 auto;
    padding: 0 1.5em;
}

/* ================================================================
   CUSTOM COMPONENTS - VERDICT
   ================================================================ */

.decathome-blog-wrap .dh-verdict {
    max-width: 100%;
    padding: 1.5em;
    margin: 1.5em 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
    border-left: 5px solid var(--dh-security);
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.08);
}

.decathome-blog-wrap .dh-verdict h3 {
    margin-top: 0;
    color: var(--dh-security);
    font-size: 1.3em;
}

.decathome-blog-wrap .dh-verdict p {
    margin-bottom: 0;
    color: var(--dh-gray-800);
}

/* ================================================================
   CUSTOM COMPONENTS - NOTES
   ================================================================ */

.decathome-blog-wrap .dh-note {
    padding: 1.2em 1.5em;
    margin: 1.5em 0;
    border-radius: 0 8px 8px 0;
    border-left: 4px solid;
}

.decathome-blog-wrap .dh-note-security {
    background-color: #eff6ff;
    border-left-color: var(--dh-security);
    color: var(--dh-gray-800);
}

.decathome-blog-wrap .dh-note-security strong {
    color: var(--dh-security);
}

.decathome-blog-wrap .dh-note-tech {
    background-color: #ecfdf5;
    border-left-color: var(--dh-tech);
}

.decathome-blog-wrap .dh-note-tech strong {
    color: var(--dh-tech);
}

/* ================================================================
   CUSTOM COMPONENTS - ALERTS
   ================================================================ */

.decathome-blog-wrap .dh-alert {
    padding: 1.2em 1.5em;
    margin: 1.5em 0;
    border-radius: 0 8px 8px 0;
    border-left: 4px solid;
    font-weight: 500;
}

.decathome-blog-wrap .dh-alert-safety {
    background-color: #f0fdf4;
    border-left-color: var(--dh-safety);
    color: var(--dh-gray-800);
}

.decathome-blog-wrap .dh-alert-safety strong {
    color: var(--dh-safety);
}

.decathome-blog-wrap .dh-alert-warning {
    background-color: #fff7ed;
    border-left-color: var(--dh-warning);
    color: var(--dh-gray-800);
}

.decathome-blog-wrap .dh-alert-warning strong {
    color: var(--dh-warning);
}

.decathome-blog-wrap .dh-alert p {
    margin-bottom: 0;
}

.decathome-blog-wrap .dh-alert p:not(:last-child) {
    margin-bottom: 0.8em;
}

/* ================================================================
   CUSTOM COMPONENTS - TECH DETAILS
   ================================================================ */

.decathome-blog-wrap .dh-tech-details {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 1px solid var(--dh-tech);
    border-radius: 8px;
    padding: 1.5em;
    margin: 1.5em 0;
}

.decathome-blog-wrap .dh-tech-details h4 {
    color: var(--dh-tech);
    margin-top: 0;
    font-size: 1.1em;
}

.decathome-blog-wrap .dh-tech-details p {
    color: var(--dh-gray-700);
    font-size: 0.95em;
}

/* ================================================================
   TABLES
   ================================================================ */

.decathome-blog-wrap table,
.decathome-blog-wrap .dh-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.decathome-blog-wrap table thead,
.decathome-blog-wrap .dh-table thead {
    background: var(--dh-accent);
    color: white;
}

.decathome-blog-wrap table th,
.decathome-blog-wrap .dh-table th {
    padding: 1em;
    text-align: left;
    font-weight: 700;
    font-size: 0.95em;
    border: none;
}

.decathome-blog-wrap table td,
.decathome-blog-wrap .dh-table td {
    padding: 0.9em 1em;
    border-bottom: 1px solid var(--dh-gray-200);
}

.decathome-blog-wrap table tbody tr:hover,
.decathome-blog-wrap .dh-table tbody tr:hover {
    background-color: var(--dh-gray-50);
}

.decathome-blog-wrap table tbody tr:last-child td,
.decathome-blog-wrap .dh-table tbody tr:last-child td {
    border-bottom: none;
}

/* ================================================================
   FAQ / DETAILS ELEMENTS
   ================================================================ */

.decathome-blog-wrap .dh-faq {
    margin: 1.5em 0;
}

.decathome-blog-wrap .dh-faq details {
    background: var(--dh-gray-50);
    border: 1px solid var(--dh-gray-200);
    border-radius: 8px;
    padding: 0;
    margin-bottom: 0.8em;
}

.decathome-blog-wrap .dh-faq details:hover {
    border-color: var(--dh-security);
}

.decathome-blog-wrap .dh-faq summary {
    padding: 1em 1.2em;
    cursor: pointer;
    font-weight: 600;
    color: var(--dh-accent);
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.8em;
}

.decathome-blog-wrap .dh-faq summary:hover {
    color: var(--dh-security);
}

.decathome-blog-wrap .dh-faq summary::marker {
    color: var(--dh-security);
    font-weight: bold;
}

.decathome-blog-wrap .dh-faq details[open] > summary {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border-bottom: 1px solid var(--dh-security);
}

.decathome-blog-wrap .dh-faq details > :not(summary) {
    padding: 0 1.2em 1.2em 1.2em;
}

.decathome-blog-wrap .dh-faq details p {
    margin-bottom: 0;
    color: var(--dh-gray-700);
}

/* ================================================================
   STEPS / NUMBERED LIST
   ================================================================ */

.decathome-blog-wrap .dh-steps ol {
    counter-reset: item;
    list-style-type: none;
    margin: 1.5em 0;
    padding-left: 0;
}

.decathome-blog-wrap .dh-steps ol li {
    margin-bottom: 1.2em;
    counter-increment: item;
    display: flex;
    gap: 1.2em;
}

.decathome-blog-wrap .dh-steps ol li::before {
    content: counter(item);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5em;
    height: 2.5em;
    background: var(--dh-security);
    color: white;
    border-radius: 50%;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 1.1em;
}

.decathome-blog-wrap .dh-steps ol li p {
    margin-bottom: 0.5em;
}

.decathome-blog-wrap .dh-steps ol li p:last-child {
    margin-bottom: 0;
}

/* ================================================================
   BLOCKQUOTES & CALLOUTS
   ================================================================ */

.decathome-blog-wrap blockquote {
    margin: 1.5em 0;
    padding: 1.2em 1.5em;
    border-left: 4px solid var(--dh-security);
    background: var(--dh-gray-50);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--dh-gray-700);
}

.decathome-blog-wrap blockquote p {
    margin-bottom: 0;
}

/* ================================================================
   IMAGES & MEDIA
   ================================================================ */

.decathome-blog-wrap img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin: 1.5em 0;
}

.decathome-blog-wrap figure {
    margin: 1.5em 0;
    text-align: center;
}

.decathome-blog-wrap figcaption {
    font-size: 0.9em;
    color: var(--dh-gray-600);
    margin-top: 0.8em;
    font-style: italic;
}

/* ================================================================
   CODE & PRE
   ================================================================ */

.decathome-blog-wrap code {
    background: var(--dh-gray-100);
    border: 1px solid var(--dh-gray-300);
    border-radius: 4px;
    padding: 0.2em 0.5em;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.9em;
    color: var(--dh-accent);
}

.decathome-blog-wrap pre {
    background: var(--dh-gray-900);
    border: 1px solid var(--dh-gray-700);
    border-radius: 8px;
    padding: 1.2em;
    overflow-x: auto;
    margin: 1.5em 0;
}

.decathome-blog-wrap pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: #e4e7ec;
    font-size: 0.9em;
}

/* ================================================================
   BUTTONS & INTERACTIVE ELEMENTS
   ================================================================ */

.decathome-blog-wrap .dh-btn,
.decathome-blog-wrap button {
    display: inline-block;
    padding: 0.8em 1.5em;
    background: var(--dh-security);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.decathome-blog-wrap .dh-btn:hover,
.decathome-blog-wrap button:hover {
    background: var(--dh-tech);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.decathome-blog-wrap .dh-btn-secondary {
    background: var(--dh-gray-200);
    color: var(--dh-accent);
}

.decathome-blog-wrap .dh-btn-secondary:hover {
    background: var(--dh-gray-300);
}

/* ================================================================
   ADMIN BADGE
   ================================================================ */

.decathome-admin-active .decathome-blog-wrap::before {
    content: "✓ Styled";
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 0.6em 1.2em;
    background: #15803d;
    color: white;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.4);
    letter-spacing: 0.5px;
}

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */

@media (max-width: 768px) {
    .decathome-blog-wrap {
        font-size: calc(var(--dh-font-size, 17px) - 1px);
    }

    .decathome-blog-wrap h1 {
        font-size: 1.8em;
    }

    .decathome-blog-wrap h2 {
        font-size: 1.5em;
    }

    .decathome-blog-wrap h3 {
        font-size: 1.2em;
    }

    .decathome-blog-wrap table,
    .decathome-blog-wrap .dh-table {
        font-size: 0.9em;
    }

    .decathome-blog-wrap table th,
    .decathome-blog-wrap .dh-table th {
        padding: 0.8em;
    }

    .decathome-blog-wrap table td,
    .decathome-blog-wrap .dh-table td {
        padding: 0.8em;
    }

    .decathome-blog-wrap .dh-steps ol li {
        gap: 1em;
    }

    .decathome-blog-wrap .dh-steps ol li::before {
        width: 2em;
        height: 2em;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .decathome-blog-wrap {
        padding: 0 1em;
    }

    .decathome-blog-wrap h1 {
        font-size: 1.5em;
    }

    .decathome-blog-wrap h2 {
        font-size: 1.3em;
    }

    .decathome-blog-wrap h3 {
        font-size: 1.1em;
    }

    .decathome-blog-wrap ul,
    .decathome-blog-wrap ol {
        padding-left: 1.5em;
    }

    .decathome-admin-active .decathome-blog-wrap::before {
        top: 10px;
        right: 10px;
        padding: 0.5em 1em;
        font-size: 11px;
    }
}

/* ================================================================
   UTILITY CLASSES
   ================================================================ */

.decathome-blog-wrap .dh-hidden {
    display: none;
}

.decathome-blog-wrap .dh-text-center {
    text-align: center;
}

.decathome-blog-wrap .dh-text-right {
    text-align: right;
}

.decathome-blog-wrap .dh-mt-0 { margin-top: 0; }
.decathome-blog-wrap .dh-mb-0 { margin-bottom: 0; }
.decathome-blog-wrap .dh-mt-1 { margin-top: 0.5em; }
.decathome-blog-wrap .dh-mb-1 { margin-bottom: 0.5em; }
.decathome-blog-wrap .dh-mt-2 { margin-top: 1em; }
.decathome-blog-wrap .dh-mb-2 { margin-bottom: 1em; }
.decathome-blog-wrap .dh-mt-3 { margin-top: 1.5em; }
.decathome-blog-wrap .dh-mb-3 { margin-bottom: 1.5em; }
