/**
 * SlotsGamblers Discover Widget - Frontend Styles
 *
 * @package SlotsGamblersDiscover
 * @version 1.2.0
 */

/* ==========================================
   CSS CUSTOM PROPERTIES
   ========================================== */
:root {
    /* SlotsGamblers Spacing System */
    --sgd-spacing-xs: 0.25rem;      /* 4px */
    --sgd-spacing-sm: 0.5rem;       /* 8px */
    --sgd-spacing-md: 1rem;         /* 16px */
    --sgd-spacing-lg: 1.5rem;       /* 24px */
    --sgd-spacing-xl: 2rem;         /* 32px */
    --sgd-spacing-2xl: 3rem;        /* 48px */
    --sgd-spacing-3xl: 4rem;        /* 64px */
    
    /* Border Radius */
    --sgd-radius-sm: 0.25rem;       /* 4px */
    --sgd-radius-md: 0.5rem;        /* 8px */
    --sgd-radius-lg: 0.75rem;       /* 12px */
    --sgd-radius-xl: 1rem;          /* 16px */
    --sgd-radius-2xl: 1.5rem;       /* 24px */
    
    /* SlotsGamblers Brand Colors */
    --sgd-color-purple: #9333EA;
    --sgd-color-purple-light: #F3E8FF;
    --sgd-color-orange: #FF8C42;
    --sgd-color-orange-light: #FFF4E6;
    --sgd-color-green: #10B981;
    --sgd-color-green-light: #D1FAE5;
    --sgd-color-red: #EF4444;
    --sgd-color-red-light: #FEE2E2;
    
    /* Brand Gradients */
    --sgd-brand-gradient: linear-gradient(135deg, #9333EA 0%, #FF8C42 100%);
    --sgd-hero-gradient: linear-gradient(to right, rgba(147, 51, 234, 0.1), rgba(255, 140, 66, 0.1));
    
    /* Neutral Colors */
    --sgd-color-white: #FFFFFF;
    --sgd-color-gray-light: #F7F7F7;
    --sgd-color-gray-medium: #E0E0E0;
    --sgd-color-gray-dark: #6B7280;
    --sgd-color-black: #1A1A1A;
    
    /* Text Colors */
    --sgd-text-primary: #1A1A1A;
    --sgd-text-secondary: #6B7280;
    --sgd-text-muted: #9CA3AF;
    
    /* Border & Background */
    --sgd-border-color: #E0E0E0;
    --sgd-background-main: #FFFFFF;
    --sgd-background-section: #F7F7F7;
}

/* ==========================================
   WRAPPER & CONTAINER
   ========================================== */
.sgd-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    width: 100%;
    position: relative;
}

.sgd-outer-container {
    background-color: var(--sgd-background-main);
    border: 0.0625rem solid var(--sgd-border-color);
    border-radius: var(--sgd-radius-xl);
    padding: var(--sgd-spacing-2xl);
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
}

.sgd-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* ==========================================
   HEADER SECTION
   ========================================== */
.sgd-header-section {
    margin-bottom: var(--sgd-spacing-2xl);
    text-align: center;
}

.sgd-header-title {
    font-size: clamp(1.75rem, 2vw + 0.5rem, 2.5rem);
    font-weight: 900;
    background: var(--sgd-brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--sgd-spacing-md);
    line-height: 1.2;
}

.sgd-header-description {
    font-size: clamp(0.9375rem, 1vw, 1.125rem);
    color: var(--sgd-text-secondary);
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================
   SECTION
   ========================================== */
.sgd-section {
    margin-bottom: 0;
}

/* ==========================================
   GRID SYSTEM
   ========================================== */
.sgd-grid {
    display: grid;
    gap: var(--sgd-spacing-lg);
}

/* Desktop columns */
.sgd-columns-1 {
    grid-template-columns: 1fr;
}

.sgd-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.sgd-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.sgd-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ==========================================
   CARD COMPONENT
   ========================================== */
.sgd-card {
    background: var(--sgd-background-main);
    border: 0.0625rem solid var(--sgd-border-color);
    border-radius: var(--sgd-radius-xl);
    padding: var(--sgd-spacing-xl);
    transition: all 0.3s ease;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    position: relative;
}

.sgd-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0.25rem;
    height: 100%;
    background: var(--sgd-brand-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: var(--sgd-radius-xl) 0 0 var(--sgd-radius-xl);
}

.sgd-card:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
}

.sgd-card:hover::before {
    opacity: 1;
}

/* ==========================================
   ICON BOX
   ========================================== */
.sgd-icon-box {
    border-radius: var(--sgd-radius-lg);
    padding: var(--sgd-spacing-lg);
    margin-bottom: var(--sgd-spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    background: var(--sgd-color-purple-light);
}

.sgd-icon-box.sgd-gradient {
    background: linear-gradient(135deg, var(--sgd-color-purple-light) 0%, var(--sgd-color-orange-light) 100%);
}

.sgd-icon {
    font-size: 4rem;
    filter: drop-shadow(0 0.5rem 1rem rgba(147, 51, 234, 0.3));
    line-height: 1;
}

.sgd-icon svg {
    width: 4rem;
    height: 4rem;
    filter: drop-shadow(0 0.5rem 1rem rgba(147, 51, 234, 0.3));
}

/* ==========================================
   CARD CONTENT
   ========================================== */
.sgd-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--sgd-text-primary);
    margin-bottom: var(--sgd-spacing-xs);
    text-align: center;
    line-height: 1.4;
}

.sgd-card-description {
    font-size: 0.875rem;
    color: var(--sgd-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--sgd-spacing-md);
    flex-grow: 1;
}

/* ==========================================
   BUTTON
   ========================================== */
.sgd-button {
    background: var(--sgd-color-green);
    color: var(--sgd-color-white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--sgd-radius-md);
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0.25rem 1rem rgba(16, 185, 129, 0.3);
    display: inline-block;
    cursor: pointer;
    border: none;
}

.sgd-button:hover {
    transform: translateY(-0.0625rem);
    box-shadow: 0 0.375rem 1rem rgba(16, 185, 129, 0.4);
    background: #0D9668;
    color: var(--sgd-color-white);
    text-decoration: none;
}

/* ==========================================
   ELEMENTOR COMPATIBILITY
   ========================================== */
.elementor-widget-slotsgamblersdiscover {
    width: 100%;
}

.elementor-widget-slotsgamblersdiscover .elementor-widget-container {
    width: 100%;
}

/* Override Elementor global styles */
.elementor-widget-slotsgamblersdiscover .sgd-card-title {
    margin: 0 0 var(--sgd-spacing-xs) 0;
}

.elementor-widget-slotsgamblersdiscover .sgd-card-description {
    margin: 0 0 var(--sgd-spacing-md) 0;
}

/* ==========================================
   FOOTER TEXT SECTION
   ========================================== */
.sgd-footer-text {
    font-size: clamp(0.875rem, 0.95vw, 1rem);
    color: var(--sgd-text-secondary);
    line-height: 1.6;
    margin-top: var(--sgd-spacing-2xl);
    text-align: left;
}

.sgd-footer-text p {
    margin-bottom: var(--sgd-spacing-md);
    color: var(--sgd-text-secondary);
}

.sgd-footer-text h2,
.sgd-footer-text h3,
.sgd-footer-text h4,
.sgd-footer-text h5,
.sgd-footer-text h6 {
    color: var(--sgd-text-primary);
    margin-bottom: var(--sgd-spacing-sm);
    margin-top: var(--sgd-spacing-lg);
    font-weight: 700;
}

.sgd-footer-text ul,
.sgd-footer-text ol {
    margin-left: var(--sgd-spacing-lg);
    margin-bottom: var(--sgd-spacing-md);
    color: var(--sgd-text-secondary);
}

.sgd-footer-text a {
    color: var(--sgd-color-purple);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.sgd-footer-text a:hover {
    color: var(--sgd-color-orange);
}

/* ==========================================
   RESPONSIVE BREAKPOINTS
   ========================================== */

/* Large Desktop (1920px+) - 32" Display Support */
@media (min-width: 1920px) {
    .sgd-container {
        max-width: 1600px;
    }
    
    .sgd-section-title {
        font-size: clamp(2rem, 2vw, 2.5rem);
    }
    
    .sgd-card-title {
        font-size: 1.25rem;
    }
    
    .sgd-card-description {
        font-size: 0.9375rem;
    }
    
    .sgd-icon-box {
        min-height: 160px;
    }
}

/* Desktop to Tablet (1200px) */
@media (max-width: 1200px) {
    .sgd-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sgd-columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet (768px) */
@media (max-width: 768px) {
    .sgd-outer-container {
        padding: var(--sgd-spacing-xl);
        border-radius: var(--sgd-radius-lg);
    }
    
    .sgd-header-title {
        font-size: 1.5rem;
    }
    
    .sgd-header-description {
        font-size: 0.9375rem;
    }
    
    .sgd-grid {
        gap: var(--sgd-spacing-md);
    }
    
    .sgd-card {
        padding: var(--sgd-spacing-md);
    }
    
    .sgd-icon-box {
        min-height: 100px;
        padding: var(--sgd-spacing-sm);
    }
    
    .sgd-icon {
        font-size: 2.5rem;
    }
    
    .sgd-icon svg {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .sgd-card-title {
        font-size: 1rem;
    }
    
    .sgd-card-description {
        font-size: 0.8125rem;
    }
    
    .sgd-button {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
    
    /* Tablet columns override */
    .sgd-grid.sgd-columns-tablet-1 {
        grid-template-columns: 1fr;
    }
    
    .sgd-grid.sgd-columns-tablet-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sgd-grid.sgd-columns-tablet-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .sgd-grid.sgd-columns-tablet-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile Full-Width Layout with calc(-50vw + 50%) Technique */
@media (max-width: 768px) {
    .sgd-mobile-fullwidth .sgd-section {
        width: 100vw !important;
        max-width: none !important;
        margin-left: calc(-50vw + 50%) !important;
        position: relative;
        padding-left: var(--sgd-spacing-md);
        padding-right: var(--sgd-spacing-md);
    }
    
    /* Override Elementor container constraints */
    .elementor-element .sgd-mobile-fullwidth .sgd-section {
        width: 100vw !important;
        max-width: none !important;
        margin-left: calc(-50vw + 50%) !important;
    }
    
    .sgd-mobile-fullwidth .sgd-container {
        padding: 0;
        max-width: none;
    }
}

/* Mobile (480px) */
@media (max-width: 480px) {
    .sgd-outer-container {
        padding: var(--sgd-spacing-md);
        border-radius: var(--sgd-radius-md);
    }
    
    .sgd-header-section {
        margin-bottom: var(--sgd-spacing-lg);
    }
    
    .sgd-header-title {
        font-size: 1.25rem;
    }
    
    .sgd-header-description {
        font-size: 0.875rem;
    }
    
    .sgd-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sgd-icon-box {
        min-height: 80px;
        padding: var(--sgd-spacing-xs);
    }
    
    .sgd-icon {
        font-size: 2rem;
    }
    
    .sgd-icon svg {
        width: 2rem;
        height: 2rem;
    }
    
    .sgd-card-title {
        font-size: 0.9375rem;
    }
    
    .sgd-card-description {
        font-size: 0.75rem;
    }
    
    .sgd-button {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
    }
    
    /* Mobile columns override */
    .sgd-grid.sgd-columns-mobile-1 {
        grid-template-columns: 1fr;
    }
    
    .sgd-grid.sgd-columns-mobile-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    .sgd-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .sgd-button {
        display: none;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */
.sgd-button:focus {
    outline: 2px solid var(--sgd-color-purple);
    outline-offset: 2px;
}

.sgd-card:focus-within {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sgd-card,
    .sgd-button,
    .sgd-icon {
        transition: none;
    }
    
    .sgd-card:hover,
    .sgd-button:hover {
        transform: none;
    }
}

