/**
 * Global Styles - CihazSat Theme
 * 
 * Contains global styles that apply across the entire site:
 * - Typography enhancements
 * - Common components
 * - Utility classes
 * - Form styles
 * 
 * @package CihazSat
 * @version 1.0.0
 */

/* ========================================
   Typography Enhancements
   ======================================== */
.entry-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--cihazsat-text-primary);
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin-top: var(--cihazsat-spacing-xl);
    margin-bottom: var(--cihazsat-spacing-md);
}

.entry-content h1:first-child,
.entry-content h2:first-child,
.entry-content h3:first-child,
.entry-content h4:first-child,
.entry-content h5:first-child,
.entry-content h6:first-child {
    margin-top: 0;
}

.entry-content p {
    margin-bottom: var(--cihazsat-spacing-md);
}

.entry-content ul,
.entry-content ol {
    margin-bottom: var(--cihazsat-spacing-md);
    padding-left: var(--cihazsat-spacing-lg);
}

.entry-content li {
    margin-bottom: var(--cihazsat-spacing-xs);
}

.entry-content blockquote {
    border-left: 4px solid var(--cihazsat-purple);
    padding-left: var(--cihazsat-spacing-lg);
    margin: var(--cihazsat-spacing-lg) 0;
    font-style: italic;
    color: var(--cihazsat-text-secondary);
}

.entry-content code {
    background-color: var(--cihazsat-gray-light);
    padding: 2px var(--cihazsat-spacing-xs);
    border-radius: var(--cihazsat-radius-sm);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
}

.entry-content pre {
    background-color: var(--cihazsat-gray-light);
    padding: var(--cihazsat-spacing-lg);
    border-radius: var(--cihazsat-radius-md);
    overflow-x: auto;
    margin-bottom: var(--cihazsat-spacing-lg);
}

.entry-content pre code {
    background: none;
    padding: 0;
}

/* ========================================
   Common Components
   ======================================== */

/* Cards */
.cihazsat-card {
    background-color: var(--cihazsat-white);
    border-radius: var(--cihazsat-radius-lg);
    padding: var(--cihazsat-spacing-xl);
    box-shadow: var(--cihazsat-shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--cihazsat-transition-base);
}

.cihazsat-card:hover {
    box-shadow: var(--cihazsat-shadow-md);
    transform: translateY(-2px);
}

.cihazsat-card__header {
    margin-bottom: var(--cihazsat-spacing-lg);
}

.cihazsat-card__title {
    font-family: var(--cihazsat-font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--cihazsat-text-primary);
    margin-bottom: var(--cihazsat-spacing-sm);
}

.cihazsat-card__subtitle {
    font-size: 0.9375rem;
    color: var(--cihazsat-text-secondary);
}

.cihazsat-card__content {
    margin-bottom: var(--cihazsat-spacing-lg);
}

.cihazsat-card__footer {
    border-top: 1px solid var(--cihazsat-gray-light);
    padding-top: var(--cihazsat-spacing-lg);
}

/* Alerts */
.cihazsat-alert {
    padding: var(--cihazsat-spacing-lg);
    border-radius: var(--cihazsat-radius-md);
    margin-bottom: var(--cihazsat-spacing-lg);
    border-left: 4px solid;
}

.cihazsat-alert--success {
    background-color: rgba(76, 175, 80, 0.1);
    border-left-color: var(--cihazsat-success);
    color: #2e7d32;
}

.cihazsat-alert--warning {
    background-color: rgba(255, 152, 0, 0.1);
    border-left-color: var(--cihazsat-warning);
    color: #f57c00;
}

.cihazsat-alert--error {
    background-color: rgba(244, 67, 54, 0.1);
    border-left-color: var(--cihazsat-error);
    color: #d32f2f;
}

.cihazsat-alert--info {
    background-color: rgba(33, 150, 243, 0.1);
    border-left-color: #2196f3;
    color: #1976d2;
}

/* Badges */
.cihazsat-badge {
    display: inline-block;
    padding: var(--cihazsat-spacing-xs) var(--cihazsat-spacing-sm);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--cihazsat-radius-sm);
}

.cihazsat-badge--primary {
    background-color: var(--cihazsat-purple);
    color: var(--cihazsat-white);
}

.cihazsat-badge--secondary {
    background-color: var(--cihazsat-gray-medium);
    color: var(--cihazsat-white);
}

.cihazsat-badge--success {
    background-color: var(--cihazsat-success);
    color: var(--cihazsat-white);
}

.cihazsat-badge--warning {
    background-color: var(--cihazsat-warning);
    color: var(--cihazsat-white);
}

.cihazsat-badge--error {
    background-color: var(--cihazsat-error);
    color: var(--cihazsat-white);
}

/* ========================================
   Form Styles
   ======================================== */
.cihazsat-form {
    max-width: 600px;
}

.cihazsat-form__group {
    margin-bottom: var(--cihazsat-spacing-lg);
}

.cihazsat-form__label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--cihazsat-text-primary);
    margin-bottom: var(--cihazsat-spacing-sm);
}

.cihazsat-form__input,
.cihazsat-form__textarea,
.cihazsat-form__select {
    width: 100%;
    padding: var(--cihazsat-spacing-md);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--cihazsat-text-primary);
    background-color: var(--cihazsat-white);
    border: 2px solid var(--cihazsat-gray-light);
    border-radius: var(--cihazsat-radius-md);
    transition: all var(--cihazsat-transition-fast);
}

.cihazsat-form__input:focus,
.cihazsat-form__textarea:focus,
.cihazsat-form__select:focus {
    outline: none;
    border-color: var(--cihazsat-purple);
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.1);
}

.cihazsat-form__textarea {
    resize: vertical;
    min-height: 120px;
}

.cihazsat-form__help {
    font-size: 0.8125rem;
    color: var(--cihazsat-text-secondary);
    margin-top: var(--cihazsat-spacing-xs);
}

.cihazsat-form__error {
    font-size: 0.8125rem;
    color: var(--cihazsat-error);
    margin-top: var(--cihazsat-spacing-xs);
}

.cihazsat-form__submit {
    background-color: var(--cihazsat-purple);
    color: var(--cihazsat-white);
    border: none;
    padding: var(--cihazsat-spacing-md) var(--cihazsat-spacing-xl);
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--cihazsat-radius-md);
    cursor: pointer;
    transition: all var(--cihazsat-transition-base);
}

.cihazsat-form__submit:hover {
    background-color: var(--cihazsat-purple-light);
    transform: translateY(-2px);
    box-shadow: var(--cihazsat-shadow-md);
}

/* ========================================
   Loading States
   ======================================== */
.cihazsat-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--cihazsat-gray-light);
    border-radius: 50%;
    border-top-color: var(--cihazsat-purple);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.cihazsat-loading--large {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

.cihazsat-loading--small {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

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

/* Display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

/* Flexbox */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.justify-start { justify-content: flex-start !important; }
.justify-center { justify-content: center !important; }
.justify-end { justify-content: flex-end !important; }
.justify-between { justify-content: space-between !important; }
.align-start { align-items: flex-start !important; }
.align-center { align-items: center !important; }
.align-end { align-items: flex-end !important; }

/* Spacing */
.p-0 { padding: 0 !important; }
.p-1 { padding: var(--cihazsat-spacing-xs) !important; }
.p-2 { padding: var(--cihazsat-spacing-sm) !important; }
.p-3 { padding: var(--cihazsat-spacing-md) !important; }
.p-4 { padding: var(--cihazsat-spacing-lg) !important; }
.p-5 { padding: var(--cihazsat-spacing-xl) !important; }

.m-0 { margin: 0 !important; }
.m-1 { margin: var(--cihazsat-spacing-xs) !important; }
.m-2 { margin: var(--cihazsat-spacing-sm) !important; }
.m-3 { margin: var(--cihazsat-spacing-md) !important; }
.m-4 { margin: var(--cihazsat-spacing-lg) !important; }
.m-5 { margin: var(--cihazsat-spacing-xl) !important; }

/* Text */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-lowercase { text-transform: lowercase !important; }
.text-capitalize { text-transform: capitalize !important; }

.font-weight-light { font-weight: 300 !important; }
.font-weight-normal { font-weight: 400 !important; }
.font-weight-medium { font-weight: 500 !important; }
.font-weight-semibold { font-weight: 600 !important; }
.font-weight-bold { font-weight: 700 !important; }

/* Colors */
.text-primary { color: var(--cihazsat-text-primary) !important; }
.text-secondary { color: var(--cihazsat-text-secondary) !important; }
.text-muted { color: var(--cihazsat-gray-medium) !important; }
.text-white { color: var(--cihazsat-white) !important; }
.text-purple { color: var(--cihazsat-purple) !important; }

.bg-primary { background-color: var(--cihazsat-purple) !important; }
.bg-secondary { background-color: var(--cihazsat-gray-medium) !important; }
.bg-light { background-color: var(--cihazsat-gray-light) !important; }
.bg-white { background-color: var(--cihazsat-white) !important; }

/* Border */
.border { border: 1px solid var(--cihazsat-gray-light) !important; }
.border-top { border-top: 1px solid var(--cihazsat-gray-light) !important; }
.border-bottom { border-bottom: 1px solid var(--cihazsat-gray-light) !important; }
.border-left { border-left: 1px solid var(--cihazsat-gray-light) !important; }
.border-right { border-right: 1px solid var(--cihazsat-gray-light) !important; }

.rounded { border-radius: var(--cihazsat-radius-md) !important; }
.rounded-sm { border-radius: var(--cihazsat-radius-sm) !important; }
.rounded-lg { border-radius: var(--cihazsat-radius-lg) !important; }
.rounded-xl { border-radius: var(--cihazsat-radius-xl) !important; }
.rounded-full { border-radius: var(--cihazsat-radius-full) !important; }

/* Shadow */
.shadow-sm { box-shadow: var(--cihazsat-shadow-sm) !important; }
.shadow { box-shadow: var(--cihazsat-shadow-md) !important; }
.shadow-lg { box-shadow: var(--cihazsat-shadow-lg) !important; }
.shadow-xl { box-shadow: var(--cihazsat-shadow-xl) !important; }

/* Position */
.position-static { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

/* Overflow */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-scroll { overflow: scroll !important; }

/* Width & Height */
.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }

.h-25 { height: 25% !important; }
.h-50 { height: 50% !important; }
.h-75 { height: 75% !important; }
.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }

/* ========================================
   Print Styles
   ======================================== */
@media print {
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a,
    a:visited {
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    abbr[title]:after {
        content: " (" attr(title) ")";
    }
    
    .cihazsat-back-to-top,
    .cihazsat-navigation__toggle,
    .cihazsat-mobile-menu {
        display: none !important;
    }
    
    .cihazsat-hero,
    .cihazsat-trusted-brands,
    .cihazsat-features {
        page-break-inside: avoid;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    p, li {
        orphans: 3;
        widows: 3;
    }
}
