/**
 * Chemistry Hub - Base Styles & Variables
 */

/* =====================================================
   CSS Variables - Matching React Project
   ===================================================== */
:root {
    /* Colors - Exact match from React project */
    --ch-background: hsl(210 40% 98%);
    --ch-foreground: hsl(222 47% 11%);
    --ch-card: hsl(0 0% 100%);
    --ch-card-foreground: hsl(222 47% 11%);
    --ch-popover: hsl(0 0% 100%);
    --ch-popover-foreground: hsl(222 47% 11%);
    --ch-primary: hsl(222 60% 22%);
    --ch-primary-foreground: hsl(210 40% 98%);
    --ch-secondary: hsl(152 76% 40%);
    --ch-secondary-foreground: hsl(0 0% 100%);
    --ch-muted: hsl(210 40% 96%);
    --ch-muted-foreground: hsl(215 16% 47%);
    --ch-accent: hsl(152 76% 40%);
    --ch-accent-foreground: hsl(0 0% 100%);
    --ch-destructive: hsl(0 84% 60%);
    --ch-destructive-foreground: hsl(210 40% 98%);
    --ch-border: hsl(214 32% 91%);
    --ch-input: hsl(214 32% 91%);
    --ch-ring: hsl(222 60% 22%);
    --ch-radius: 0.75rem;
    
    /* Chemistry specific colors */
    --ch-navy: hsl(222 60% 22%);
    --ch-green: hsl(152 76% 40%);
    --ch-light-green: hsl(152 76% 85%);
    --ch-gradient: linear-gradient(135deg, hsl(222 60% 22%) 0%, hsl(222 60% 35%) 100%);
    --ch-gradient-green: linear-gradient(135deg, hsl(152 76% 40%) 0%, hsl(152 76% 50%) 100%);
    
    /* Molecule glow effect */
    --ch-molecule-glow: 0 0 20px hsl(152 76% 40% / 0.4);
    
    /* Shadows */
    --ch-shadow-soft: 0 4px 20px -2px hsl(222 60% 22% / 0.1);
    --ch-shadow-card: 0 8px 30px -4px hsl(222 60% 22% / 0.15);
    --ch-shadow-elevated: 0 20px 50px -10px hsl(222 60% 22% / 0.2);
    
    /* Customizable colors (can be overridden) */
    --ch-custom-primary: hsl(222 60% 22%);
    --ch-custom-secondary: hsl(152 76% 40%);
    --ch-custom-accent: hsl(152 76% 40%);
    --ch-custom-background: hsl(210 40% 98%);
    --ch-custom-text: hsl(222 47% 11%);
    --ch-custom-muted: hsl(215 16% 47%);
}

/* =====================================================
   Base Styles
   ===================================================== */
.ch-widget {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    color: var(--ch-foreground);
    width: 100%;
    font-size: 16px;
    line-height: 1.6;
}

.ch-widget * {
    box-sizing: border-box;
}

/* Global Font Customization */
.ch-custom-font {
    font-family: var(--ch-custom-font-family, 'Cairo', sans-serif) !important;
}

.ch-custom-heading-font {
    font-family: var(--ch-custom-heading-font-family, 'Cairo', sans-serif) !important;
}

/* Container */
.ch-container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
    position: relative;
    z-index: 10;
    width: 100%;
}

/* Full Width Section */
.ch-section-full {
    width: 100%;
    max-width: 100%;
}

/* Section Padding */
.ch-section-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    .ch-section-padding {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

/* =====================================================
   Typography
   ===================================================== */
.ch-text-primary {
    color: var(--ch-primary);
}

.ch-text-secondary {
    color: var(--ch-secondary);
}

.ch-text-muted {
    color: var(--ch-muted-foreground);
}

.ch-gradient-text {
    background: var(--ch-gradient-green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =====================================================
   Buttons
   ===================================================== */
.ch-btn-primary {
    background-color: var(--ch-primary);
    color: var(--ch-primary-foreground);
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.ch-btn-primary:hover {
    background-color: hsl(222 60% 22% / 0.9);
    transform: translateY(-2px);
}

.ch-btn-secondary {
    background-color: var(--ch-secondary);
    color: var(--ch-secondary-foreground);
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 10px 25px -5px hsl(152 76% 40% / 0.4);
    white-space: nowrap;
    line-height: 1.4;
}

.ch-btn-secondary:hover {
    background-color: hsl(152 76% 40% / 0.9);
    box-shadow: 0 15px 35px -5px hsl(152 76% 40% / 0.5);
    transform: translateY(-2px);
}

/* Button Icons */
.ch-btn-primary svg,
.ch-btn-primary i,
.ch-btn-secondary svg,
.ch-btn-secondary i {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.ch-btn-primary .elementor-icon,
.ch-btn-secondary .elementor-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ch-btn-primary .elementor-icon svg,
.ch-btn-secondary .elementor-icon svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
}

/* =====================================================
   Cards
   ===================================================== */
.ch-card {
    background-color: var(--ch-card);
    border-radius: 1rem;
    box-shadow: var(--ch-shadow-card);
    border: 1px solid hsl(214 32% 91% / 0.5);
    transition: all 0.3s ease;
    overflow: hidden;
}

.ch-card:hover {
    box-shadow: var(--ch-shadow-elevated);
    transform: translateY(-4px);
}

/* =====================================================
   Badges
   ===================================================== */
.ch-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    position: relative;
    z-index: 10;
    margin-bottom: 1rem;
}

.ch-badge-primary {
    background-color: hsl(222 60% 22% / 0.1);
    color: var(--ch-primary);
}

.ch-badge-secondary {
    background-color: hsl(152 76% 40% / 0.1);
    color: var(--ch-secondary);
}

.ch-badge-solid-primary {
    background-color: var(--ch-primary);
    color: var(--ch-primary-foreground);
}

.ch-badge-solid-secondary {
    background-color: var(--ch-secondary);
    color: var(--ch-secondary-foreground);
}

/* =====================================================
   SVG Icons
   ===================================================== */
.ch-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ch-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}
