/* Video Components */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.video-card {
    background: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

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

.video-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-info {
    padding: 1.5rem;
}

.video-info h3 {
    color: #000000;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.video-info p {
    color: #666;
    font-size: 0.9rem;
}

.video-date {
    color: #999;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #667eea;
}

/* Article Components */
.articles-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.article-card {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.article-card h3 {
    color: #000000;
    margin-bottom: 1rem;
}

.article-card p {
    color: #666;
    margin-bottom: 1rem;
}

.article-meta {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.read-more {
    color: #764ba2;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.read-more:hover {
    color: #667eea;
}

/* About Page Components */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-image {
    float: left;
    width: 300px;
    margin-right: 2rem;
}

.about-image img {
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
}

.about-text {
    flex: 1;
}

.about-text p {
    color: #666;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.2rem;
    text-align: left;
}

.about-content a {
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.about-content a:hover {
    color: #667eea;
}

/* Smart Home Page Components */
.intro-text {
    max-width: 900px;
    margin: 0 auto 2rem auto;
}

.intro-text p {
    color: #666;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.intro-text a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.intro-text a:hover {
    color: #764ba2;
}

.affiliate-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 2rem 0;
    border-radius: 5px;
}

.affiliate-notice p {
    color: #856404;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.affiliate-notice p:last-child {
    margin-bottom: 0;
}

.product-section {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 20px;
}

.product-section p {
    color: #666;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.product-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.product-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.product-list li:last-child {
    border-bottom: none;
}

.product-list a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.product-list a:hover {
    color: #764ba2;
}

/* Guidelines Pages */
.guidelines-content {
    max-width: 800px;
    margin: 0 auto;
}

.guidelines-content p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.guidelines-content ul {
    margin: 2rem 0;
    padding-left: 0;
    list-style: none;
}

.guidelines-content li {
    color: #666;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
    position: relative;
}

.guidelines-content li:before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
}

.guidelines-content a {
    color: #000000;
    text-decoration: none;
    font-weight: 600;
}

.guidelines-content a:hover {
    color: #667eea;
}

/* Contact Form Components */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-intro {
    color: #666;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.contact-intro a {
    color: #000000;
    text-decoration: none;
    font-weight: 600;
}

.contact-intro a:hover {
    color: #667eea;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.required {
    color: #dc3545;
}

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.message {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    display: none;
}

.message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: block;
}

.message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: block;
}

.error-text {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.social-contact {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
    text-align: center;
}

.social-contact p {
    color: #666;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    color: #000000;
    text-decoration: none;
    font-weight: 600;
}

.social-links a:hover {
    color: #667eea;
}

/* Responsive Design for Components */
@media (max-width: 768px) {
    .about-content {
        /* No flex, so block */
    }

    .about-image {
        float: none;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 1rem;
    }
}

/* Smart Home Page Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.header p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.95;
}

.intro {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.intro h2 {
    color: #667eea;
    margin-bottom: 1rem;
}

.intro p {
    margin-bottom: 1rem;
    color: #555;
}

.affiliate-note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.category {
    margin-bottom: 4rem;
}

.category-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1rem;
}

.category-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.category-header h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0;
}

.category-header h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0;
}

.category-description {
    color: #666;
    font-size: 0.95rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: row;
    padding: 1.5rem;
    gap: 1.5rem;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.product-image-wrapper {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: #f5f7fa; */
    background: #ffffff;
    border-radius: 8px;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-icon {
    font-size: 3rem;
    color: #667eea;
}

.product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    flex-grow: 1;
}

.product-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #ffffff;
    color: rgb(255, 0, 0);
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid rgb(255, 0, 0);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.product-link:hover {
    background: rgb(255, 0, 0);
    color: #FFFFFF;
}

.product-link.secondary {
    color: #48bb78;
    border-color: #48bb78;
}

.product-link.secondary:hover {
    background: #48bb78;
    color: white;
}

.product-link.tertiary {
    color: #ed8936;
    border-color: #ed8936;
}

.product-link.tertiary:hover {
    background: #ed8936;
    color: white;
}

.note {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 4px;
    font-size: 0.95rem;
}

.filter-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-label {
    display: none;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.4rem 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    color: #333;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f5f7ff;
}

.filter-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.filter-btn.active:hover {
    background: #5568d3;
    border-color: #5568d3;
}

.product-card {
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card.hidden {
    display: none;
}

/* Screen reader only class for accessibility announcements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        flex-direction: column;
        text-align: center;
    }

    .product-image-wrapper {
        margin: 0 auto;
    }

    .product-links {
        justify-content: center;
    }

    .header h1 {
        font-size: 2rem;
    }

    .container {
        padding: 1rem;
    }

    .category-title-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Support Page Panels */
.support-panel {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    margin-top: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.support-panel.intro-panel {
    border-left: none;
    margin-top: 0;
}

.support-panel h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0;
}

.support-panel p {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.support-panel ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.support-panel li {
    margin-bottom: 0.5rem;
    color: #555;
    line-height: 1.6;
}

.support-panel a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.support-panel a:hover {
    text-decoration: underline;
}
