/* ===================================================
   1. CSS Custom Properties (Advanced Dəyişənlər)
   =================================================== */
:root {
    /* Rənglər: Azizov Group üçün peşəkar tonlar */
    --primary-color: #0077b6;   /* Dərin Mavi */
    --secondary-color: #00b4d8; /* Açıq Mavi / Vurğu */
    --text-color: #343a40;      /* Tünd Boz (Oxunuşu yaxşıdır) */
    --bg-color: #f0f3f7;        /* Yüngül, Qumral Fon */
    --error-color: #dc3545;     /* Qırmızı */
    
    /* Kölgələr */
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.08); /* Yumşaq Kölgə */
    --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.15); /* Hoverdə Güclü Kölgə */
    
    /* Gecikmə (Transition) */
    --transition-speed: 0.3s;
}

/* ===================================================
   2. Sıfırlama və Əsas Tiqrafiya
   =================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh; /* Bütün ekranı tutmaq */
    display: flex; /* Mərkəzləşdirmə üçün Flex */
    justify-content: center;
    align-items: center;
}

/* ===================================================
   3. Əsas Konteyner və Mərkəzləşdirmə
   =================================================== */
.container {
    width: 90%; /* Mobile First: Kiçik ekranda geniş */
    max-width: 450px; /* Maksimum genişlik */
    padding: 20px;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 2px solid var(--secondary-color); /* WOW xətt */
    padding-bottom: 10px;
    display: inline-block; /* Xətti yalnız mətnin altına çəkmək */
}

/* ===================================================
   4. Forma Kartı (WOW Effekt)
   =================================================== */
.form-card {
    background: #ffffff;
    padding: 35px;
    border-radius: 16px; /* Daha dairəvi künclər */
    box-shadow: var(--shadow-light);
    transition: all var(--transition-speed) ease-in-out; /* Bütün dəyişikliklərə sürətli keçid */
    border-top: 5px solid var(--primary-color); /* Vurğu xətti */
}

.form-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px) scale(1.01); /* Yuxarı qalxma və yüngül böyümə effekti */
}

/* ===================================================
   5. Daxiletmə Sahələri və Düymələr
   =================================================== */
input[type="text"], 
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 14px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color var(--transition-speed);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--secondary-color); /* Fokusa gələndə rəng dəyişsin */
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2); /* Yumşaq fokus kölgəsi */
}

button.submit-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
    width: 100%;
    letter-spacing: 0.5px; /* Məktublar arasında yüngül boşluq */
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}

button.submit-btn:hover {
    background-color: var(--secondary-color); /* Hoverdə rəng dəyişsin */
    transform: translateY(-2px); /* Yüngül yuxarı qalxma */
}

/* ===================================================
   6. Mesajlar və Linklər
   =================================================== */
.error-message, .success-message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-weight: bold;
}

.error-message {
    background-color: #f8d7da;
    color: var(--error-color);
    border: 1px solid var(--error-color);
}
.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #155724;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ===================================================
   7. Media Queries (Mobil uyumluluq üçün)
   =================================================== */
/* 768px-dən yuxarı (Tablet və Desktop) */
@media (min-width: 768px) {
    /* Body-nin align-items-ı onu mərkəzləşdirir, burda təkrar etməyə ehtiyac yoxdur. */
}
/* ===================================================
   8. Header və Naviqasiya
   =================================================== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.header h1 {
    font-size: 24px;
    border-bottom: none;
    padding-bottom: 0;
}

.login-btn, .logout-btn {
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}
.logout-btn:hover {
    background-color: var(--primary-color);
}


/* ===================================================
   9. CSS GRID Elan Kataloqu (Responsive WOW)
   =================================================== */
.elan-grid {
    display: grid;
    /* Mobile First: Bütün elanlar tək sütunda görünür */
    grid-template-columns: 1fr; 
    gap: 30px; /* Kartlar arasında boşluq */
    padding-bottom: 40px;
}

/* Tablet və kiçik desktoplar üçün 2 sütun */
@media (min-width: 600px) {
    .elan-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Böyük desktoplar üçün 3 sütun */
@media (min-width: 1024px) {
    .elan-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* ===================================================
   10. Elan Kartı Dizaynı
   =================================================== */
.elan-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    overflow: hidden; /* Şəklin künclərini düzəltmək */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Elastik WOW keçid */
    display: block; /* Linki bütün kartı əhatə etmək üçün */
    text-decoration: none;
    color: var(--text-color);
}

.elan-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-8px) scale(1.02); /* Kartın yuxarı "sıçraması" */
}

.elan-img {
    width: 100%;
    height: 180px; /* Şəkil hündürlüyünü sabit saxla */
    object-fit: cover; /* Şəkli kəsmədən doldurmaq */
    transition: transform 0.5s;
}

.elan-card:hover .elan-img {
    transform: scale(1.05); /* Hoverdə şəklin zoom effekti */
}

.elan-content {
    padding: 20px;
}

.elan-category {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.elan-card h3 a {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 10px;
}
.elan-card h3 a:hover {
    text-decoration: none;
}

.elan-snippet {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 15px;
}

.elan-footer {
    border-top: 1px solid #f8f9fa;
    padding-top: 10px;
    font-size: 12px;
    color: #999;
}

/* ===================================================
   11. Yeni Elan (+ İkonu) Kartı
   =================================================== */
.new-post-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 250px; /* Bütün ekranı doldurması üçün */
    border: 3px dashed var(--primary-color); /* Vurğu xətti */
    background-color: var(--bg-color);
}

.new-post-card:hover {
    border-color: var(--secondary-color);
}

.new-post-card i {
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: color 0.3s;
}

.new-post-card:hover i {
    color: var(--secondary-color);
}
.new-post-card h3 {
    border-bottom: none;
    margin-bottom: 5px;
}