/* Main CSS styles */

:root {
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    --secondary-500: #8b5cf6;
    --secondary-600: #7c3aed;

    --success-50: #ecfdf5;
    --success-100: #d1fae5;
    --success-500: #10b981;
    --success-600: #059669;
    --success-800: #065f46;

    --warning-50: #fffbeb;
    --warning-100: #fef3c7;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --warning-800: #92400e;

    --danger-50: #fef2f2;
    --danger-100: #fee2e2;
    --danger-500: #ef4444;
    --danger-600: #dc2626;
    --danger-800: #991b1b;

    --neutral-50: #f9fafb;
    --neutral-100: #f3f4f6;
    --neutral-200: #e5e7eb;
    --neutral-300: #d1d5db;
    --neutral-400: #9ca3af;
    --neutral-500: #6b7280;
    --neutral-600: #4b5563;
    --neutral-700: #374151;
    --neutral-800: #1f2937;
    --neutral-900: #111827;
}

/* Base styles */
body {
    font-family: 'Inter', sans-serif;
    color: var(--neutral-800);
    background-color: var(--neutral-50);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}

/* Utility Classes */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(to right, var(--primary-600), var(--secondary-500));
}

/* Card animations */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Hero background animation */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background: linear-gradient(-45deg, #1e40af, #3b82f6, #1d4ed8, #7c3aed);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

/* Wave animation */
@keyframes wave {
    0% {
        transform: translateX(0) translateZ(0) scaleY(1);
    }
    50% {
        transform: translateX(-25%) translateZ(0) scaleY(0.8);
    }
    100% {
        transform: translateX(-50%) translateZ(0) scaleY(1);
    }
}

.wave {
    animation: wave 20s linear infinite;
}

.wave-delayed {
    animation: wave 30s linear infinite reverse;
    animation-delay: -5s;
}

/* Custom dropdown animations */
.dropdown-enter {
    transition: all 0.2s ease-out;
}

.dropdown-enter-start {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
}

.dropdown-enter-end {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Mobile menu animation */
.menu-enter {
    transition: all 0.3s ease-out;
}

.menu-enter-start {
    opacity: 0;
    transform: translateX(-20px);
}

.menu-enter-end {
    opacity: 1;
    transform: translateX(0);
}

/* Button styles */
.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.btn-primary:hover {
    background-color: var(--primary-700);
}

.btn-outline {
    border: 1px solid var(--primary-600);
    color: var(--primary-600);
}

.btn-outline:hover {
    background-color: var(--primary-50);
}

.btn-white {
    background-color: white;
    color: var(--primary-600);
    border: 1px solid var(--neutral-200);
}

.btn-white:hover {
    background-color: var(--neutral-50);
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background-color: var(--success-100);
    color: var(--success-800);
}

.badge-warning {
    background-color: var(--warning-100);
    color: var(--warning-800);
}

.badge-danger {
    background-color: var(--danger-100);
    color: var(--danger-800);
}

/* Toast notification animation */
@keyframes slideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notification-enter {
    animation: slideIn 0.3s ease-out forwards;
}

/* Hide Alpine elements before Alpine.js loads */
[x-cloak] {
    display: none !important;
}

/* Hero Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

.float-animation-delayed {
    animation: float 6s ease-in-out infinite;
    animation-delay: -3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* Blob animation */
@keyframes morphBlob {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

.blob {
    animation: morphBlob 10s ease-in-out infinite;
}

/* Shine effect for cards */
@keyframes shine {
    from {
        background-position: -200% 0;
    }
    to {
        background-position: 200% 0;
    }
}

.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::after {
    content: "";
    position: absolute;
    top: -120%;
    left: -100%;
    width: 50%;
    height: 300%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    transition: all 0.5s;
}

.card-shine:hover::after {
    animation: shine 1.5s ease;
}

/* Form elements */
.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--neutral-300);
    border-radius: 0.375rem;
    color: var(--neutral-700);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--neutral-700);
}

/* Timeline styling */
.timeline-container {
    position: relative;
}

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px;
    width: 2px;
    background-color: var(--neutral-200);
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    padding-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: 9px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--primary-500);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--primary-500);
}

.timeline-dot.completed {
    background-color: var(--success-500);
    box-shadow: 0 0 0 2px var(--success-500);
}

.timeline-dot.current {
    background-color: var(--warning-500);
    box-shadow: 0 0 0 2px var(--warning-500);
}

.timeline-dot.inactive {
    background-color: var(--neutral-200);
    box-shadow: 0 0 0 2px var(--neutral-200);
}

.timeline-content {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Attachment styles */
.attachment-card {
    transition: all 0.2s ease;
}

.attachment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Share buttons */
.share-button {
    transition: all 0.2s ease;
}

.share-button:hover {
    transform: translateY(-2px);
}

.print-button {
    transition: all 0.2s ease;
}

.print-button:hover {
    transform: translateY(-2px);
}

/* Custom checkbox and radio */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    height: 1.25rem;
    width: 1.25rem;
    background-color: white;
    border: 1px solid var(--neutral-300);
    border-radius: 0.25rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.custom-checkbox:checked {
    background-color: var(--primary-700);
    border-color: var(--primary-700);
}

.custom-checkbox:checked::after {
    content: "";
    display: block;
    position: absolute;
    width: 0.4rem;
    height: 0.7rem;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

.custom-radio {
    appearance: none;
    -webkit-appearance: none;
    height: 1.25rem;
    width: 1.25rem;
    background-color: white;
    border: 1px solid var(--neutral-300);
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.custom-radio:checked {
    border-color: var(--primary-700);
}

.custom-radio:checked::after {
    content: "";
    display: block;
    position: absolute;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background-color: var(--primary-700);
}

.custom-radio:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Filter card */
.filter-card {
    transition: box-shadow 0.3s ease;
}

.filter-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Admin dashboard styles */
.dashboard-card {
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    transition: all 0.3s ease;
}

.dashboard-card:hover .stat-icon {
    transform: scale(1.1);
}

.edital-item {
    transition: all 0.2s ease;
}

.edital-item:hover {
    background-color: var(--neutral-50);
}

/* Animation for flash messages */
@keyframes countdown {
    from { width: 100%; }
    to { width: 0%; }
}

/* Summernote editor custom styles */
.note-editor.note-frame {
    border-radius: 0.5rem;
    border-color: var(--neutral-200);
}

.note-editor .note-toolbar {
    background-color: var(--neutral-50);
    border-bottom-color: var(--neutral-200);
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    padding: 0.5rem;
}

.note-editor .note-statusbar {
    border-top-color: var(--neutral-200);
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.note-editor .btn {
    border-radius: 0.25rem;
}

/* File input styles */
.file-upload-container {
    position: relative;
    overflow: hidden;
}

.file-upload-container input[type=file] {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 100%;
    min-height: 100%;
    font-size: 100px;
    text-align: right;
    opacity: 0;
    outline: none;
    background: white;
    cursor: inherit;
    display: block;
}

/* Print styles */
@media print {
    header, footer, .no-print {
        display: none !important;
    }

    body {
        background-color: white !important;
    }

    .print-container {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background-color: white !important;
        box-shadow: none !important;
    }
}