/**
 * TechEd Shortcode Styles
 * Styles for custom shortcodes that replace Elementor Pro widgets
 *
 * @package TechEd_Colormag_Pro_Child
 * @version 2.7.0
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    --teched-primary: #2563eb;
    --teched-primary-dark: #1d4ed8;
    --teched-text: #1e293b;
    --teched-text-light: #64748b;
    --teched-border: #e2e8f0;
    --teched-bg-light: #f8fafc;
    --teched-radius: 6px;
    --teched-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --teched-coral: #f97f7f;
    --teched-coral-hover: #f56565;
}

/* ==========================================================================
   Post Title
   ========================================================================== */

.teched-post-title {
    font-family: var(--teched-font-serif, 'Source Serif 4', Georgia, serif);
    color: var(--teched-text);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 15px 0;
}

.teched-post-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--teched-transition);
}

.teched-post-title a:hover {
    color: var(--teched-primary);
}

/* ==========================================================================
   Featured Image
   ========================================================================== */

.teched-featured-image {
    margin: 0 0 30px 0;
}

.teched-featured-image img {
    width: 100%;
    height: auto;
    border-radius: var(--teched-radius);
    display: block;
}

/* ==========================================================================
   Post Content
   ========================================================================== */

.teched-post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--teched-text);
}

.teched-post-content p {
    margin-bottom: 1.5em;
}

.teched-post-content h2,
.teched-post-content h3,
.teched-post-content h4 {
    color: var(--teched-text);
    margin-top: 2em;
    margin-bottom: 1em;
}

.teched-post-content a {
    color: var(--teched-primary);
}

.teched-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--teched-radius);
}

/* ==========================================================================
   Post Meta
   ========================================================================== */

.teched-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.9rem;
    color: var(--teched-text-light);
    margin-bottom: 20px;
}

.teched-post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.teched-post-meta i {
    color: var(--teched-primary);
}

.teched-post-meta a {
    color: var(--teched-primary);
    text-decoration: none;
}

.teched-post-meta a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Post Tags
   ========================================================================== */

.teched-tags {
    margin: 30px 0;
    padding-top: 20px;
    border-top: 1px solid var(--teched-border);
}

.teched-tags i {
    color: var(--teched-primary);
    margin-right: 5px;
}

.teched-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--teched-bg-light);
    border: 1px solid var(--teched-border);
    border-radius: var(--teched-radius);
    color: var(--teched-text);
    text-decoration: none;
    font-size: 0.8125rem;
    margin: 2px;
    transition: background-color var(--teched-transition), color var(--teched-transition), border-color var(--teched-transition);
}

.teched-tag:hover {
    background: var(--teched-primary);
    color: #fff;
    border-color: var(--teched-primary);
}

/* ==========================================================================
   Archive Title
   ========================================================================== */

.teched-archive-title {
    font-family: var(--teched-font-serif, 'Source Serif 4', Georgia, serif);
    color: var(--teched-text);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.teched-archive-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: var(--teched-coral);
    border-radius: 2px;
    margin-top: 16px;
}

.teched-archive-description {
    font-size: 1.1rem;
    color: var(--teched-text-light);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* ==========================================================================
   Posts Grid (Archive & Related)
   ========================================================================== */

.teched-posts-grid {
    display: grid;
    gap: 30px;
}

.teched-cols-1 {
    grid-template-columns: 1fr;
}

.teched-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.teched-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.teched-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .teched-cols-3,
    .teched-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .teched-cols-2,
    .teched-cols-3,
    .teched-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Post Card
   ========================================================================== */

.teched-post-card {
    background: #fff;
    border: 1px solid var(--teched-border);
    border-radius: var(--teched-radius);
    overflow: hidden;
    transition: transform var(--teched-transition), box-shadow var(--teched-transition);
}

.teched-post-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.teched-post-thumb {
    position: relative;
    overflow: hidden;
}

.teched-post-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: var(--teched-transition);
}

.teched-post-card:hover .teched-post-thumb img {
    transform: scale(1.05);
}

.teched-post-card .teched-post-content {
    padding: 20px;
    font-size: 1rem;
    line-height: 1.6;
}

.teched-post-card-title {
    font-family: var(--teched-font-serif, 'Source Serif 4', Georgia, serif);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.teched-post-card-title a {
    color: var(--teched-text);
    text-decoration: none;
    transition: color var(--teched-transition);
}

.teched-post-card-title a:hover {
    color: var(--teched-primary);
}

.teched-post-card-meta {
    font-size: 0.85rem;
    color: var(--teched-text-light);
    margin-bottom: 12px;
}

.teched-post-card-excerpt {
    color: var(--teched-text-light);
    font-size: 0.95rem;
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.teched-post-card-date {
    font-size: 0.85rem;
    color: var(--teched-text-light);
}

/* ==========================================================================
   Read More Button
   ========================================================================== */

.teched-read-more {
    display: inline-block;
    color: var(--teched-coral);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color var(--teched-transition);
}

.teched-read-more:hover {
    color: var(--teched-coral-hover);
}

/* ==========================================================================
   Related Posts
   ========================================================================== */

.teched-related-posts {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--teched-border);
}

.teched-related-card .teched-post-thumb img {
    height: 150px;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.teched-pagination {
    margin-top: 40px;
    text-align: center;
}

.teched-pagination a,
.teched-pagination span {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 4px;
    border-radius: var(--teched-radius);
    text-decoration: none;
    font-weight: 500;
    transition: background-color var(--teched-transition), color var(--teched-transition);
}

.teched-pagination a {
    background: var(--teched-bg-light);
    color: var(--teched-text);
    border: 1px solid var(--teched-border);
}

.teched-pagination a:hover {
    background: var(--teched-primary);
    color: #fff;
    border-color: var(--teched-primary);
}

.teched-pagination .current {
    background: var(--teched-primary);
    color: #fff;
    border: 1px solid var(--teched-primary);
}

/* ==========================================================================
   Supplier Cards
   ========================================================================== */

.teched-supplier-card {
    background: #fff;
    border: 1px solid var(--teched-border);
    border-radius: var(--teched-radius);
    overflow: hidden;
    transition: transform var(--teched-transition), box-shadow var(--teched-transition);
    position: relative;
}

.teched-supplier-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.teched-supplier-card.is-featured {
    border: 2px solid var(--teched-primary);
}

.teched-featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--teched-primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}

.teched-supplier-logo {
    padding: 20px;
    text-align: center;
    background: var(--teched-bg-light);
}

.teched-supplier-logo img {
    max-width: 150px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.teched-supplier-info {
    padding: 20px;
}

.teched-supplier-name {
    font-family: var(--teched-font-serif, 'Source Serif 4', Georgia, serif);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.teched-supplier-name a {
    color: var(--teched-text);
    text-decoration: none;
}

.teched-supplier-name a:hover {
    color: var(--teched-primary);
}

.teched-supplier-location,
.teched-supplier-phone {
    font-size: 0.9rem;
    color: var(--teched-text-light);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.teched-supplier-location i,
.teched-supplier-phone i {
    color: var(--teched-primary);
    width: 16px;
    text-align: center;
}

.teched-view-btn {
    display: inline-block;
    margin-top: 15px;
    color: var(--teched-coral);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color var(--teched-transition);
}

.teched-view-btn:hover {
    color: var(--teched-coral-hover);
}

/* ==========================================================================
   Directory Cards
   ========================================================================== */

.teched-directory-card {
    background: #fff;
    border: 1px solid var(--teched-border);
    border-radius: var(--teched-radius);
    overflow: hidden;
    transition: transform var(--teched-transition), box-shadow var(--teched-transition);
    display: flex;
    flex-direction: column;
}

.teched-directory-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.teched-directory-photo {
    padding: 20px;
    text-align: center;
    background: var(--teched-bg-light);
}

.teched-directory-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.teched-directory-info {
    padding: 20px;
    flex: 1;
}

.teched-directory-name {
    font-family: var(--teched-font-serif, 'Source Serif 4', Georgia, serif);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.teched-directory-name a {
    color: var(--teched-text);
    text-decoration: none;
}

.teched-directory-name a:hover {
    color: var(--teched-primary);
}

.teched-directory-title {
    font-size: 0.9rem;
    color: var(--teched-primary);
    font-weight: 500;
    margin: 0 0 10px 0;
}

.teched-directory-location,
.teched-directory-email {
    font-size: 0.85rem;
    color: var(--teched-text-light);
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.teched-directory-location i,
.teched-directory-email i {
    color: var(--teched-primary);
    width: 14px;
    text-align: center;
}

.teched-directory-email a {
    color: var(--teched-text-light);
    text-decoration: none;
}

.teched-directory-email a:hover {
    color: var(--teched-primary);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.teched-breadcrumbs {
    font-size: 0.9rem;
    color: var(--teched-text-light);
    margin-bottom: 20px;
    padding: 10px 0;
}

.teched-breadcrumbs a {
    color: var(--teched-primary);
    text-decoration: none;
}

.teched-breadcrumbs a:hover {
    text-decoration: underline;
}

.teched-breadcrumbs .current {
    color: var(--teched-text);
}

/* ==========================================================================
   Newsletter
   ========================================================================== */

.teched-newsletter {
    background: linear-gradient(135deg, #1a2332 0%, #2a3a52 50%, #3d5a80 100%);
    color: #fff;
    padding: 30px;
    border-radius: var(--teched-radius);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.teched-newsletter::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.teched-newsletter-title {
    font-family: var(--teched-font-serif, 'Source Serif 4', Georgia, serif);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    position: relative;
}

.teched-newsletter-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin: 0 0 20px 0;
    position: relative;
}

.teched-newsletter-form input[type="email"],
.teched-newsletter-form input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: var(--teched-radius);
    font-size: 1rem;
    margin-bottom: 10px;
    position: relative;
}

.teched-newsletter-form input[type="submit"],
.teched-newsletter-form button {
    width: 100%;
    padding: 12px 20px;
    background: var(--teched-coral);
    color: #fff;
    border: none;
    border-radius: var(--teched-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--teched-transition), transform var(--teched-transition);
    position: relative;
    box-shadow: 0 2px 8px rgba(249, 127, 127, 0.3);
}

.teched-newsletter-form input[type="submit"]:hover,
.teched-newsletter-form button:hover {
    background: var(--teched-coral-hover);
    transform: translateY(-1px);
}

/* ==========================================================================
   Ad Placeholder
   ========================================================================== */

.teched-ad-placeholder {
    margin: 20px auto;
}

/* ==========================================================================
   Search Form
   ========================================================================== */

.teched-search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.teched-search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    border: 1px solid var(--teched-border);
    border-radius: 6px;
    font-size: 1rem;
}

.teched-search-input:focus {
    outline: none;
    border-color: var(--teched-primary);
}

.teched-search-btn {
    padding: 12px 24px;
    background: var(--teched-primary);
    color: #fff;
    border: none;
    border-radius: var(--teched-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--teched-transition), transform var(--teched-transition);
}

.teched-search-btn:hover {
    background: var(--teched-primary-dark);
    transform: translateY(-1px);
}

/* ==========================================================================
   No Posts Message
   ========================================================================== */

.no-posts {
    text-align: center;
    padding: 60px 20px;
    background: var(--teched-bg-light);
    border-radius: var(--teched-radius);
    color: var(--teched-text-light);
    font-size: 1.1rem;
}

/* ==========================================================================
   Excerpt
   ========================================================================== */

.teched-excerpt {
    color: var(--teched-text-light);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

/* ==========================================================================
   PHP Template Layout Styles
   ========================================================================== */

/* Primary container - wide layout */
.teched-primary-wide {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.teched-primary-full {
    max-width: 100%;
    padding: 0;
}

/* Content containers with sidebar */
.teched-single-content,
.teched-archive-content,
.teched-supplier-single-content,
.teched-directory-single-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

/* Main content area (70%) */
.teched-main-content {
    flex: 1;
    min-width: 0;
    max-width: calc(70% - 20px);
}

/* Sidebar (30%) */
.teched-sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 992px) {
    .teched-main-content {
        max-width: 100%;
    }

    .teched-sidebar {
        width: 100%;
    }
}

/* Article container */
.teched-article {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    width: 100%;
}

/* Section headings */
.teched-section-heading {
    font-family: var(--teched-font-serif, 'Source Serif 4', Georgia, serif);
    color: var(--teched-text);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 30px 0 20px 0;
    padding-top: 20px;
    border-top: 1px solid var(--teched-border);
    letter-spacing: -0.01em;
}

.teched-section-heading:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* Related section */
.teched-related-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--teched-border);
}

/* Supplier/Directory description */
.teched-supplier-description,
.teched-directory-description {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--teched-border);
}

/* ==========================================================================
   404 Page Styles
   ========================================================================== */

.teched-404-content {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

.teched-404-container {
    text-align: center;
    max-width: 600px;
}

.teched-404-number {
    font-family: var(--teched-font-serif, 'Source Serif 4', Georgia, serif);
    font-size: 8rem;
    font-weight: 700;
    color: var(--teched-primary);
    line-height: 1;
    margin: 0 0 20px 0;
}

.teched-404-title {
    font-family: var(--teched-font-serif, 'Source Serif 4', Georgia, serif);
    font-size: 2rem;
    font-weight: 600;
    color: var(--teched-text);
    margin: 0 0 15px 0;
}

.teched-404-message {
    font-size: 1.1rem;
    color: var(--teched-text-light);
    margin: 0 0 30px 0;
}

.teched-404-search {
    margin: 0 0 30px 0;
}

.teched-404-search .teched-search-form {
    justify-content: center;
}

.teched-404-button {
    display: inline-block;
    padding: 14px 30px;
    background: var(--teched-coral);
    color: #fff;
    text-decoration: none;
    border-radius: var(--teched-radius);
    font-weight: 600;
    transition: background-color var(--teched-transition), transform var(--teched-transition);
    box-shadow: 0 2px 8px rgba(249, 127, 127, 0.3);
}

.teched-404-button:hover {
    background: var(--teched-coral-hover);
    color: #fff;
    transform: translateY(-1px);
}

.teched-404-button i {
    margin-right: 8px;
}

/* ==========================================================================
   Override parent theme styles where needed
   ========================================================================== */

#primary.teched-primary-wide {
    width: 100%;
    float: none;
}

#primary.teched-primary-full {
    width: 100%;
    float: none;
}

.teched-primary-wide #content,
.teched-primary-full #content {
    width: 100%;
}
