/* 🎨 Framed Social - Color Overrides & Fixes
 * This file fixes HTML entity encoding issues and adds enhancements
 * Priority: HIGH - Deploy immediately
 */

/* ============================================
   GRADIENT FIXES (HTML Entity Issue Resolution)
   ============================================ */
:root {
    /* Primary Gradients - Fixed encoding */
    --gradient-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --gradient-secondary: linear-gradient(135deg, #c9a227 0%, #8b6914 50%, #5a4a1f 100%);
    --gradient-success: linear-gradient(135deg, #1b4332 0%, #2d6a4f 50%, #40916c 100%);
    --gradient-dark: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #21262d 100%);
    --gradient-warm: linear-gradient(135deg, #b85c38 0%, #8b4513 50%, #6b3410 100%);
    --gradient-accent: linear-gradient(135deg, #4a5568 0%, #2d3748 50%, #1a202c 100%);
    
    /* Modern UI Gradients */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --danger-gradient: linear-gradient(135deg, #f857a6 0%, #ff5858 100%);
    --warning-gradient: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    --info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    
    /* Glass Morphism - Enhanced */
    --glass-bg-light: rgba(255, 255, 255, 0.1);
    --glass-bg-medium: rgba(255, 255, 255, 0.15);
    --glass-bg-dark: rgba(0, 0, 0, 0.2);
    --glass-border-light: rgba(255, 255, 255, 0.2);
    --glass-border-dark: rgba(0, 0, 0, 0.1);
    --glass-blur: blur(20px);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
:root {
    --breakpoint-xs: 480px;
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
}

/* ============================================
   ENHANCED GLASS CARDS
   ============================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-base);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

/* ============================================
   BUTTON IMPROVEMENTS
   ============================================ */
.btn {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
    font-weight: 600;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--glass-bg-light);
    border: 1px solid var(--glass-border);
    color: white;
}

.btn-secondary:hover {
    background: var(--glass-bg-medium);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-success {
    background: var(--success-gradient);
    color: white;
}

.btn-danger {
    background: var(--danger-gradient);
    color: white;
}

/* ============================================
   INPUT IMPROVEMENTS
   ============================================ */
.glass-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea {
    background: var(--glass-bg-light);
    border: 1px solid var(--glass-border);
    color: white;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    font-size: 1rem;
    width: 100%;
}

.glass-input:focus,
input:focus,
textarea:focus {
    background: var(--glass-bg-medium);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
    outline: none;
}

.glass-input::placeholder,
input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   NAVBAR ENHANCEMENTS
   ============================================ */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(26, 26, 46, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-link {
    position: relative;
    transition: all var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transform: translateX(-50%);
    transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

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

/* Tablet and below */
@media (max-width: 1024px) {
    :root {
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
        --space-3xl: 2.5rem;
    }
    
    .glass-card {
        padding: var(--space-lg);
    }
}

/* Mobile landscape and below */
@media (max-width: 768px) {
    :root {
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--space-md);
    }
    
    .features-grid {
        grid-template-columns: 1fr !important;
    }
    
    .glass-card {
        padding: var(--space-md);
        border-radius: var(--radius-md);
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    :root {
        font-size: 13px;
        --space-xl: 1rem;
        --space-2xl: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.75rem !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.9rem;
    }
}

/* ============================================
   ANIMATION IMPROVEMENTS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-slide-in {
    animation: slideIn 0.4s ease-out;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* ============================================
   LOADING STATES
   ============================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c8ee8 0%, #8a5cb4 100%);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #667eea rgba(0, 0, 0, 0.2);
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.focus-visible:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

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

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.mt-auto {
    margin-top: auto;
}

.mb-0 {
    margin-bottom: 0;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.hidden {
    display: none;
}

.block {
    display: block;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.z-10 {
    z-index: 10;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .navbar,
    .hero-buttons,
    button,
    .btn {
        display: none;
    }
    
    .glass-card {
        border: 1px solid #ddd;
        background: white;
        box-shadow: none;
    }
}

/* ============================================
   DARK MODE SUPPORT (Future)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Already optimized for dark mode */
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */
@media (prefers-contrast: high) {
    .glass-card {
        border: 2px solid white;
    }
    
    .btn {
        border: 2px solid white;
    }
}
