/*
 * Estilos Responsivos e Modernos - Drakon Theme
 * Arquivo CSS adicional para melhorar a responsividade e adicionar estilos modernos
 */

/* ===== VARIÁVEIS CSS ADICIONAIS ===== */
:root {
    /* Breakpoints */
    --mobile: 480px;
    --tablet: 768px;
    --desktop: 1024px;
    --large-desktop: 1200px;
    
    /* Border Color */
    --border-color: #e1e5e9;
    --background-color: #ffffff;
    
    /* Spacing System */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Typography Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    
    /* Modern Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Modern Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warning: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    
    /* Animation Curves */
    --ease-in-out-cubic: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out-cubic: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-cubic: cubic-bezier(0.4, 0, 1, 1);
}

/* ===== MODERN RESET & BASE STYLES ===== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Modern focus styles */
*:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Better box sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Remove default margins */
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
    margin: 0;
}

/* Improve media defaults */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

/* Remove built-in form typography styles */
input, button, textarea, select {
    font: inherit;
}

/* ===== MODERN UTILITY CLASSES ===== */

/* Flexbox utilities */
.flex {
    display: flex;
}

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

.flex-wrap {
    flex-wrap: wrap;
}

.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;
}

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

/* Grid utilities */
.grid {
    display: grid;
}

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

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

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

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

.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }
.gap-5 { gap: var(--space-xl); }
.gap-6 { gap: var(--space-2xl); }

/* Spacing utilities */
.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }
.p-5 { padding: var(--space-xl); }
.p-6 { padding: var(--space-2xl); }

.m-1 { margin: var(--space-xs); }
.m-2 { margin: var(--space-sm); }
.m-3 { margin: var(--space-md); }
.m-4 { margin: var(--space-lg); }
.m-5 { margin: var(--space-xl); }
.m-6 { margin: var(--space-2xl); }

/* Text utilities */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }

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

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

/* Modern shadows */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* Border radius */
.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: 0.125rem; }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* ===== MODERN COMPONENTS ===== */

/* Modern Cards */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s var(--ease-out-cubic);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: var(--space-lg);
}

.card-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--border-color);
    background: var(--light-gray);
}

/* Modern Buttons */
.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    font-weight: 600;
    border-radius: var(--border-radius);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s var(--ease-out-cubic);
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-modern:hover::before {
    left: 100%;
}

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

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Modern Form Elements */
.form-group-modern {
    position: relative;
    margin-bottom: var(--space-lg);
}

.form-input-modern {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--text-base);
    transition: all 0.3s var(--ease-out-cubic);
    background: var(--white);
}

.form-input-modern:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

.form-label-modern {
    position: absolute;
    left: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    padding: 0 var(--space-sm);
    color: var(--dark-gray);
    transition: all 0.3s var(--ease-out-cubic);
    pointer-events: none;
}

.form-input-modern:focus + .form-label-modern,
.form-input-modern:not(:placeholder-shown) + .form-label-modern {
    top: 0;
    font-size: var(--text-sm);
    color: var(--secondary-color);
}

/* Modern Navigation */
.nav-modern {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-item-modern {
    position: relative;
    padding: var(--space-sm) var(--space-md);
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s var(--ease-out-cubic);
}

.nav-item-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: all 0.3s var(--ease-out-cubic);
    transform: translateX(-50%);
}

.nav-item-modern:hover,
.nav-item-modern.active {
    color: var(--secondary-color);
}

.nav-item-modern:hover::after,
.nav-item-modern.active::after {
    width: 100%;
}

/* Modern Badges */
.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    border-radius: var(--border-radius);
    letter-spacing: 0.05em;
}

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

.badge-success {
    background: #10b981;
    color: var(--white);
}

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

.badge-danger {
    background: #ef4444;
    color: var(--white);
}

/* Modern Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Modern Tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-sm) var(--space-md);
    background: var(--primary-color);
    color: var(--white);
    font-size: var(--text-sm);
    border-radius: var(--border-radius);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out-cubic);
    z-index: 1000;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--primary-color);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out-cubic);
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

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

/* Mobile First Approach */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
    
    .grid-cols-sm-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .text-sm-left { text-align: left; }
    .text-sm-center { text-align: center; }
    .text-sm-right { text-align: right; }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .grid-cols-md-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .grid-cols-md-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .flex-md-row {
        flex-direction: row;
    }
    
    .text-md-left { text-align: left; }
    .text-md-center { text-align: center; }
    .text-md-right { text-align: right; }
    
    /* Hide on mobile, show on tablet+ */
    .hidden-mobile {
        display: block;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .grid-cols-lg-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .grid-cols-lg-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    
    .text-lg-left { text-align: left; }
    .text-lg-center { text-align: center; }
    .text-lg-right { text-align: right; }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .grid-cols-xl-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    
    .grid-cols-xl-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    
    .grid-cols-xl-6 {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* Mobile specific styles */
@media (max-width: 767px) {
    /* Hide on mobile */
    .hidden-mobile {
        display: none;
    }
    
    /* Stack elements on mobile */
    .stack-mobile {
        flex-direction: column;
    }
    
    /* Full width on mobile */
    .full-width-mobile {
        width: 100%;
    }
    
    /* Smaller text on mobile */
    .text-mobile-sm {
        font-size: var(--text-sm);
    }
    
    /* Reduced padding on mobile */
    .p-mobile-2 {
        padding: var(--space-sm);
    }
    
    /* Mobile navigation adjustments */
    .nav-modern {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    /* Mobile button adjustments */
    .btn-modern {
        width: 100%;
        justify-content: center;
    }
    
    /* Mobile form adjustments */
    .form-input-modern {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Tablet specific styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .tablet-only {
        display: block;
    }
    
    .hidden-tablet {
        display: none;
    }
}

/* Desktop specific styles */
@media (min-width: 1024px) {
    .desktop-only {
        display: block;
    }
    
    .hidden-desktop {
        display: none;
    }
    
    /* Enhanced hover effects on desktop */
    .hover-lift:hover {
        transform: translateY(-4px);
        transition: transform 0.3s var(--ease-out-cubic);
    }
    
    .hover-scale:hover {
        transform: scale(1.05);
        transition: transform 0.3s var(--ease-out-cubic);
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #0066cc;
        --text-color: #000000;
        --border-color: #000000;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #ffffff;
        --secondary-color: #4a9eff;
        --text-color: #ffffff;
        --background-color: #1a1a1a;
        --white: #2d2d2d;
        --light-gray: #3a3a3a;
        --dark-gray: #cccccc;
        --border-color: #4a4a4a;
    }
    
    body {
        background-color: var(--background-color);
        color: var(--text-color);
    }
}

/* Focus visible for better keyboard navigation */
.focus-visible:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

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

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: var(--border-radius);
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* ===== PRINT STYLES ===== */
@media print {
    *,
    *::before,
    *::after {
        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) ")";
    }
    
    .no-print {
        display: none !important;
    }
    
    .page-break {
        page-break-before: always;
    }
    
    h2, h3 {
        page-break-after: avoid;
    }
    
    p, h2, h3 {
        orphans: 3;
        widows: 3;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

/* GPU acceleration for animations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Optimize images */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
}

/* Optimize fonts */
@font-face {
    font-display: swap;
}

/* Contain layout shifts */
.contain-layout {
    contain: layout;
}

.contain-paint {
    contain: paint;
}

.contain-strict {
    contain: strict;
}