/**
 * DiSyL Components Stylesheet
 * Styles for core DiSyL components (ikb_text, ikb_block, ikb_section, etc.)
 * Version: 0.4.0
 */

/* ============================================
   ikb_text - Typography Component
   ============================================ */

.ikb-text {
    margin: 0 0 1rem 0;
    padding: 0;
    line-height: 1.6;
}

/* Remove bottom margin for last child */
.ikb-text:last-child {
    margin-bottom: 0;
}

/* Text Sizes */
.ikb-text-xs {
    font-size: 0.75rem;    /* 12px */
}

.ikb-text-sm {
    font-size: 0.875rem;   /* 14px */
}

.ikb-text-md {
    font-size: 1rem;       /* 16px */
}

.ikb-text-lg {
    font-size: 1.125rem;   /* 18px */
}

.ikb-text-xl {
    font-size: 1.25rem;    /* 20px */
}

.ikb-text-2xl {
    font-size: 1.5rem;     /* 24px */
    margin-bottom: 1.25rem;
}

.ikb-text-3xl {
    font-size: 1.875rem;   /* 30px */
    margin-bottom: 1.5rem;
}

.ikb-text-4xl {
    font-size: 2.25rem;    /* 36px */
    margin-bottom: 2rem;
}

/* Font Weights */
.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* Text Alignment */
.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-justify {
    text-align: justify;
}

/* ============================================
   ikb_container - Container Component
   ============================================ */

.ikb-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 768px) {
    .ikb-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.ikb-container-sm {
    max-width: 640px;
}

.ikb-container-md {
    max-width: 768px;
}

.ikb-container-lg {
    max-width: 1280px;
}

.ikb-container-xl {
    max-width: 1366px;
}

.ikb-container-xlarge {
    max-width: 1440px;
}

.ikb-container-full {
    max-width: 100%;
}

/* ============================================
   ikb_section - Section Component
   ============================================ */

.ikb-section {
    position: relative;
    width: 100%;
}

/* Section Padding */
.ikb-section.padding-none {
    padding: 0;
}

.ikb-section.padding-small {
    padding: 1rem 0;
}

.ikb-section.padding-normal {
    padding: 2rem 0;
}

.ikb-section.padding-large {
    padding: 4rem 0;
}

.ikb-section.padding-xlarge {
    padding: 6rem 0;
}

/* Section Background (via data attribute) */
.ikb-section[data-bg] {
    background: var(--section-bg);
}

/* ============================================
   ikb_block - Grid/Flexbox Layout Component
   ============================================ */

.ikb-block {
    display: grid;
    width: 100%;
    gap: 1rem; /* Default gap */
}

/* Column Layouts */
.ikb-block-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.ikb-block-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ikb-block-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ikb-block-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ikb-block-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ikb-block-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ikb-block-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

/* Gap Sizes */
.gap-0 {
    gap: 0;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-5 {
    gap: 1.25rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.gap-10 {
    gap: 2.5rem;
}

/* Responsive Grid */
@media (max-width: 768px) {
    .ikb-block-cols-2,
    .ikb-block-cols-3,
    .ikb-block-cols-4,
    .ikb-block-cols-5,
    .ikb-block-cols-6 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .ikb-block-cols-3,
    .ikb-block-cols-4,
    .ikb-block-cols-5,
    .ikb-block-cols-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ============================================
   ikb_card - Card Component
   ============================================ */

.ikb-card {
    display: flex;
    flex-direction: column;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ikb-card-default {
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.ikb-card-outlined {
    background: transparent;
    border: 2px solid #d1d5db;
}

.ikb-card-elevated {
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.ikb-card-elevated:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.ikb-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.ikb-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    padding: 1rem 1rem 0 1rem;
}

.ikb-card-content {
    padding: 1rem;
    flex-grow: 1;
}

/* ============================================
   Utility Classes
   ============================================ */

/* Spacing */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Flexbox */
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

/* Width */
.w-full { width: 100%; }
.w-auto { width: auto; }

/* Height */
.h-full { height: 100%; }
.h-auto { height: auto; }

/* ============================================
   Dark Mode Support
   ============================================ */

@media (prefers-color-scheme: dark) {
    .ikb-card-default {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .ikb-card-elevated {
        background: #1f2937;
        color: #f9fafb;
    }
}
