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

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Poppins', sans-serif;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

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

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.animate-slide-in-up {
    animation: slideInUp 0.8s ease-out;
}

.animate-slide-in-down {
    animation: slideInDown 0.8s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.8s ease-out;
}

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

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

.card-hover {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.btn-hover {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.btn-hover:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.link-hover {
    position: relative;
    color: inherit;
    text-decoration: none;
}

.link-hover::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.link-hover:hover::after {
    width: 100%;
}

.icon-rotate {
    transition: transform 0.3s ease;
}

.icon-rotate:hover {
    transform: rotate(10deg) scale(1.1);
}

.stagger-animation-1 {
    animation: slideInUp 0.8s ease-out 0.1s both;
}

.stagger-animation-2 {
    animation: slideInUp 0.8s ease-out 0.2s both;
}

.stagger-animation-3 {
    animation: slideInUp 0.8s ease-out 0.3s both;
}

.stagger-animation-4 {
    animation: slideInUp 0.8s ease-out 0.4s both;
}

.stagger-animation-5 {
    animation: slideInUp 0.8s ease-out 0.5s both;
}

.fade-in-delayed {
    animation: fadeIn 1s ease-out;
}

header {
    animation: slideInDown 0.8s ease-out;
}

.hero-section {
    animation: fadeIn 1s ease-out;
}

.section-content {
    animation: slideInUp 0.8s ease-out 0.2s both;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Extracted from index.html for generalization */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-right-color: transparent; }
}

.typewriter {
    overflow: hidden;
    border-right: 3px solid #0066cc;
    white-space: nowrap;
    animation: typewriter 3s steps(40, end) forwards, blink 0.75s step-end infinite;
}

.animated-logo {
    display: inline-block;
}

.gradient-text {
    background: linear-gradient(135deg, #0066cc 0%, #1a5f7a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-glow {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-glow:hover {
    box-shadow: 0 20px 60px rgba(0, 102, 204, 0.15);
    transform: translateY(-8px);
}

.blur-effect {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.smooth-transition {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.counter {
    font-weight: 700;
    font-size: 2.5rem;
}

.hero-overlay {
    position: relative;
    overflow: hidden;
}

.hero-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.6) 0%, rgba(26, 95, 122, 0.4) 100%);
    z-index: 2;
}

.nav-link-underline {
    position: relative;
    display: inline-block;
}

.nav-link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-link-underline:hover::after {
    width: 100%;
}

@keyframes navPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
}

#navbar {
    animation: gradientShift 15s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.arrow-animate {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.read-more:hover .arrow-animate {
    transform: translateX(4px);
}

.stats-number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}

@keyframes cardBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes cardPulse {
    0%, 100% { box-shadow: 0 10px 30px rgba(0, 102, 204, 0.1); }
    50% { box-shadow: 0 15px 50px rgba(0, 102, 204, 0.25); }
}

.wilaya-card {
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.wilaya-card:hover {
    transform: scale(1.15) rotateY(5deg);
    animation: cardPulse 1.5s ease-in-out infinite;
}

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

.wilaya-card:hover::before {
    left: 100%;
}

.wilaya-badge {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wilaya-card:hover .wilaya-badge {
    transform: scale(1.4) rotateZ(360deg);
    filter: drop-shadow(0 10px 20px rgba(0, 102, 204, 0.4));
}

.wilaya-text {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wilaya-card:hover .wilaya-text {
    transform: translateY(-4px);
}

.wilaya-card:hover h3 {
    color: #0066cc;
}

/* Admin Shared UI */
.admin-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.admin-page-title {
    text-align: center;
    color: #0066cc;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
}

.admin-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    overflow: hidden;
    border: 1px solid #eee;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #0066cc;
}

.admin-table th {
    padding: 18px 15px;
    text-align: left;
    font-weight: 700;
    color: #0066cc;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.05em;
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
}

.admin-table tr:hover {
    background: #f1f5f9;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.admin-stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 4px solid #0066cc;
    transition: transform 0.3s ease;
}

.admin-stat-card:hover {
    transform: translateY(-5px);
}

.admin-stat-number {
    font-size: 32px;
    font-weight: 800;
    color: #0066cc;
    line-height: 1;
    margin-bottom: 8px;
}

.admin-stat-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.admin-badge {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}

.admin-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.admin-btn-primary {
    background: linear-gradient(135deg, #0066cc 0%, #1e40af 100%);
    color: white;
}

.admin-btn-danger {
    background: #ef4444;
    color: white;
}

.admin-btn-success {
    background: #10b981;
    color: white;
}

.admin-footer {
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 14px;
    border-top: 1px solid #e2e8f0;
    margin-top: 40px;
}

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

@keyframes float-rotate {
    0%, 100% {
        transform: translateY(0px) rotateZ(0deg);
    }
    50% {
        transform: translateY(-20px) rotateZ(2deg);
    }
}

@keyframes haloMoveRandom {
    0% { left: 10%; top: 20%; opacity: 0.6; }
    15% { left: 80%; top: 30%; opacity: 0.75; }
    30% { left: 50%; top: 60%; opacity: 0.8; }
    45% { left: 20%; top: 40%; opacity: 0.75; }
    60% { left: 70%; top: 10%; opacity: 0.8; }
    75% { left: 30%; top: 70%; opacity: 0.75; }
    90% { left: 80%; top: 50%; opacity: 0.75; }
    100% { left: 10%; top: 20%; opacity: 0.6; }
}

@keyframes haloMoveRandom2 {
    0% { left: 70%; top: 60%; opacity: 0.6; }
    12% { left: 15%; top: 30%; opacity: 0.75; }
    28% { left: 60%; top: 10%; opacity: 0.8; }
    42% { left: 85%; top: 55%; opacity: 0.75; }
    58% { left: 25%; top: 70%; opacity: 0.8; }
    72% { left: 75%; top: 25%; opacity: 0.75; }
    88% { left: 40%; top: 65%; opacity: 0.75; }
    100% { left: 70%; top: 60%; opacity: 0.6; }
}

.halo-element {
    will-change: left, top, opacity;
}

.halo-element:nth-child(1) {
    animation: haloMoveRandom 16s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
}

.halo-element:nth-child(2) {
    animation: haloMoveRandom2 18s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
}
