/* ===================================================================
   ITPLUS KNOWLEDGEBASE - EMBEDDED VERSION
   For iframe embedding - no header/footer, white background
   Brand-aligned styling: Clean white with red accents
   =================================================================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ITPLUS Brand Colors */
    --primary-dark: #1a1a1a;
    --primary-red: #ad0008;
    --primary-red-hover: #8b0006;
    --white: #ffffff;
    --text-dark: #2d3748;
    --text-gray: #64748b;
    --border-light: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.18);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white); /* White background for embedding */
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}


/* ===================================================================
   PAGE HEADER - Bold H1
   =================================================================== */

.page-header {
    text-align: center;
    padding: 2.5rem 1.5rem 2rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 2.5rem;
}

.page-header h1 {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .page-header {
        padding: 1.5rem 1rem 1.5rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.65rem;
    }
}
/* ===================================================================
   MAIN CONTENT - For Embedding
   =================================================================== */

.kb-main {
    padding: 2rem 0 3rem;
}

/* Section Styles */
.kb-section {
    margin-bottom: 3.5rem;
}

.kb-section:last-child {
    margin-bottom: 0;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    letter-spacing: -0.02em;
}

.section-header h2 i {
    color: var(--primary-red);
    font-size: 1.5rem;
}

.section-header p {
    font-size: 1rem;
    color: var(--text-gray);
    max-width: 500px;
    margin: 0 auto;
}

/* ===================================================================
   CARD GRID
   =================================================================== */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Card Styles - Now as anchor links */
.card {
    display: block;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border-light);
    text-decoration: none; /* Remove link underline */
    color: inherit; /* Inherit text color */
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-red);
    text-decoration: none;
}

.card:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

.card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

/* Card overlay */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.85), rgba(173, 0, 8, 0.85));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.card:hover .card-overlay {
    opacity: 1;
}

.card-overlay i {
    font-size: 2.5rem;
    color: var(--white);
    transform: scale(0.8);
    transition: transform var(--transition-normal);
}

.card:hover .card-overlay i {
    transform: scale(1);
}

/* Card Content */
.card-content {
    padding: 1.25rem;
}

.card-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.4rem;
    line-height: 1.35;
    transition: color var(--transition-fast);
}

.card:hover .card-content h3 {
    color: var(--primary-red);
}

.card-content p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

/* Card Tags */
.card-tags {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.tag {
    background: var(--white);
    color: var(--text-gray);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid var(--border-light);
    transition: all var(--transition-fast);
}

.card:hover .tag {
    background: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
}

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

@media (max-width: 768px) {
    .kb-main {
        padding: 1.5rem 0 2rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .section-header h2 {
        font-size: 1.65rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .section-header p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .section-header h2 {
        font-size: 1.45rem;
    }
    
    .card {
        border-radius: 10px;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .card-content h3 {
        font-size: 1rem;
    }
    
    .card-image {
        height: 160px;
    }
}

/* ===================================================================
   ANIMATIONS
   =================================================================== */

/* Fade In Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.cards-grid .card:nth-child(1) { animation-delay: 0.05s; }
.cards-grid .card:nth-child(2) { animation-delay: 0.1s; }
.cards-grid .card:nth-child(3) { animation-delay: 0.15s; }
.cards-grid .card:nth-child(4) { animation-delay: 0.2s; }
.cards-grid .card:nth-child(5) { animation-delay: 0.25s; }
.cards-grid .card:nth-child(6) { animation-delay: 0.3s; }
.cards-grid .card:nth-child(7) { animation-delay: 0.35s; }
.cards-grid .card:nth-child(8) { animation-delay: 0.4s; }

/* ===================================================================
   PRINT STYLES
   =================================================================== */

@media print {
    .card {
        break-inside: avoid;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
}
