/* Tech Institute Courses - Frontend Styles */

/* Primary color scheme */
:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Course page container */
.tic-single-course {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Archive page container */
.tic-archive-courses {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

/* Prose styling for content */
.prose {
    max-width: 65ch;
}

.prose p {
    margin-bottom: 1.25em;
    line-height: 1.75;
}

.prose h2 {
    margin-top: 2em;
    margin-bottom: 1em;
    font-size: 1.5em;
    font-weight: 700;
    line-height: 1.3333333;
}

.prose h3 {
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    font-size: 1.25em;
    font-weight: 600;
    line-height: 1.6;
}

.prose ul, .prose ol {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.course-page-wrapper pre,
.tic-catalog-wrapper pre {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.course-page-wrapper code,
.tic-catalog-wrapper code {
    max-width: 100%;
}

.course-page-wrapper :not(pre) > code,
.tic-catalog-wrapper :not(pre) > code {
    word-break: break-word;
}

.tic-video-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tic-video-play {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.tic-video-play:hover {
    background: rgba(255, 255, 255, 0.18);
}

.tic-video-play:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 3px;
}

.tic-video-iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    border: 0;
}

/* Sticky sidebar */
.sticky {
    position: sticky;
    top: 1rem;
}

/* Hover effects */
.hover\:shadow-2xl:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hover\:scale-105:hover {
    transform: scale(1.05);
}

.hover\:-translate-y-2:hover {
    transform: translateY(-0.5rem);
}

/* Gradient backgrounds */
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

/* Animation for course cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-card {
    animation: fadeInUp 0.5s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tic-single-course .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .tic-archive-courses .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Print styles */
@media print {
    .tic-single-course nav,
    .tic-single-course .sticky,
    .tic-single-course a[href^="http"] {
        display: none;
    }
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Pagination styles */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: white;
    color: #475569;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination a:hover {
    background: var(--primary-50);
    border-color: var(--primary-500);
    color: var(--primary-700);
}

.pagination .current {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: white;
}

/* Share buttons */
.share-buttons a {
    transition: transform 0.2s, background-color 0.2s;
}

.share-buttons a:hover {
    transform: translateY(-2px);
}

/* Breadcrumb styling */
nav ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Smooth transitions */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* ===========================================
   TEXT DIET SYSTEM - Standardized Micro-Content
   =========================================== */

/* Trust Bar - appears after course description */
/* Vertical layout with dividers for mobile AND tablet */
.tic-trust-bar {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 1.5rem 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
    border: 1px solid #d1fae5;
    border-radius: 12px;
}

/* Only go horizontal on large desktop screens */
@media (min-width: 1024px) {
    .tic-trust-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.5rem;
    }
}

.tic-trust-bar .trust-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #0f172a;
    line-height: 1.4;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(16, 185, 129, 0.15);
}

.tic-trust-bar .trust-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tic-trust-bar .trust-item:first-child {
    padding-top: 0;
}

/* Desktop: remove dividers, add vertical separators */
@media (min-width: 1024px) {
    .tic-trust-bar .trust-item {
        padding: 0;
        border-bottom: none;
        padding-right: 1.5rem;
        border-right: 1px solid rgba(16, 185, 129, 0.2);
    }
    
    .tic-trust-bar .trust-item:last-child {
        border-right: none;
        padding-right: 0;
    }
}

.tic-trust-bar .trust-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.tic-trust-bar .trust-item strong {
    color: #047857;
}

/* Breadcrumb Navigation */
.tic-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tic-breadcrumb a {
    color: #4f46e5;
    text-decoration: none;
    transition: color 0.2s;
}

.tic-breadcrumb a:hover {
    color: #3730a3;
    text-decoration: underline;
}

.tic-breadcrumb .breadcrumb-separator {
    color: #cbd5e1;
    font-size: 0.75rem;
}

.tic-breadcrumb .breadcrumb-current {
    color: #0f172a;
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .tic-breadcrumb .breadcrumb-current {
        max-width: 400px;
    }
}

/* SSL Security Badge */
.tic-ssl-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tic-ssl-badge .ssl-icon {
    color: #22c55e;
    font-size: 0.875rem;
}

.tic-ssl-badge .ssl-text {
    letter-spacing: 0.025em;
}

/* FAQ Footer - appears after topic-specific FAQs */
.tic-faq-footer {
    margin-top: 2rem;
    padding: 1.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    border-left: 4px solid #4f46e5;
}

.tic-faq-footer .faq-footer-text {
    margin: 0;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
}

.tic-faq-footer .faq-footer-text em {
    color: #0f172a;
    font-weight: 600;
    font-style: normal;
}

.tic-faq-footer .faq-footer-text a {
    color: #4f46e5;
    text-decoration: underline;
    font-weight: 500;
}

.tic-faq-footer .faq-footer-text a:hover {
    color: #3730a3;
}
