/* --- Global Styles --- */
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: #f0f4f8;
    color: #1a202c;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2 {
    font-weight: 700;
}

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

/* Header */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px 60px;
    backdrop-filter: blur(10px);
    max-width: 700px;
    margin: 20px auto 30px;
    position: relative;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 58px;
    color: #3182ce;
}

.header p {
    font-size: 1.1rem;
    color: #4a5568;
}

/* Arama Çubuğu */
.search-bar {
    display: flex;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 25px;
    overflow: hidden;
    background-color: #fff;
    margin: 20px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.search-bar input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 1rem;
    border-radius: 25px 0 0 25px;
}

.search-bar input::placeholder {
    color: #999;
}

.search-bar button {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-radius: 0 25px 25px 0;
}

.search-bar button:hover {
    background: #2563eb;
}

/* Etkinlik Grid */
.etkinlik-listesi {
    max-width: 1400px;
    margin: 0 auto 80px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.etkinlik-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-height: 500px;
}

.etkinlik-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.etkinlik-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.etkinlik-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.etkinlik-card:hover .etkinlik-card-image img {
    transform: scale(1.05);
}

.etkinlik-card-content {
    padding: 20px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.etkinlik-card-content h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #1a202c;
}

.etkinlik-card-content p {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.5;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.etkinlik-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #718096;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.etkinlik-card-footer span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detay-btn {
    background: #63b3ed;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.detay-btn:hover {
    background: #4299e1;
}

.toggle-form-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1100;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    background: #38a169;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(56, 161, 105, 0.4);
    transition: all 0.3s ease;
}

.toggle-form-btn:hover {
    background: #2f855a;
    box-shadow: 0 12px 20px rgba(56, 161, 105, 0.6);
    transform: scale(1.05);
}

/* Modal & Form */
#etkinlik-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

#etkinlik-modal.active {
    display: flex;
}

#etkinlik-form {
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    text-align: center;
    animation: fadeIn 0.3s ease-out;
    overflow-y: auto;
    box-sizing: border-box;
}

#etkinlik-form h2 {
    font-size: 1.8rem;
    color: #1a202c;
    margin-bottom: 20px;
}

.itiraf-input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e0;
    font-size: 1rem;
    resize: vertical;
    outline: none;
    background-color: #f7fafc;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.itiraf-input:focus {
    border-color: #63b3ed;
    box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.5);
}

/* Dosya Yükleme */
.file-upload-container {
    margin-bottom: 16px;
}

.upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background-color: #e2e8f0;
    color: #4a5568;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 8px;
    border: 2px dashed #cbd5e0;
}

.upload-label:hover {
    background-color: #cbd5e0;
}

#etkinlik-resim {
    display: none;
}

.file-name {
    font-size: 0.9rem;
    color: #4a5568;
    margin-top: 5px;
    text-align: center;
    font-style: italic;
    min-height: 20px;
    transition: all 0.3s ease;
}

.file-name.has-file {
    color: #48bb78;
    font-weight: 600;
}

/* Butonlar */
.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.itiraf-submit,
.itiraf-cancel {
    min-width: 100px;
    height: 44px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0 20px;
}

.itiraf-submit {
    background: #48bb78;
    color: white;
}

.itiraf-submit:hover {
    background: #38a169;
    transform: translateY(-2px);
}

.itiraf-cancel {
    background: #cbd5e0;
    color: #4a5568;
}

.itiraf-cancel:hover {
    background: #a0aec0;
    transform: translateY(-2px);
}

/* Detail Modal */
.detay-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.detay-modal.active {
    opacity: 1;
    visibility: visible;
}

.detay-content {
    position: relative;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideUp 0.3s ease-out;
    box-sizing: border-box;
}

.detay-close-x {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #4a5568;
    transition: color 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detay-close-x:hover {
    color: #e53e3e;
    background-color: #f7fafc;
    border-radius: 50%;
}

.detay-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin-top: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.detay-content h2 {
    color: #1a202c;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.detay-content p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 10px;
}

.detay-info {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.detay-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: #4a5568;
}

.detay-info-item i {
    width: 20px;
    color: #63b3ed;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

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

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

/* Utility Classes */
.mr-2 {
    margin-right: 8px;
}

.hidden {
    display: none !important;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Focus Styles */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #63b3ed;
    outline-offset: 2px;
}

/* Selection Styles */
::selection {
    background-color: #63b3ed;
    color: white;
}
.itiraf-help-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background-color: #f2f2f2;
  border: 1px solid #d0d0d0;
  border-radius: 50%;
  color: #555;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.itiraf-help-btn:hover {
  background-color: #007bff;
  border-color: #007bff;
  color: #fff;
  transform: scale(1.05);
}

.itiraf-help-btn:active {
  transform: scale(0.95);
}

.itiraf-help-btn i {
  pointer-events: none; /* ikon tıklanabilirlik sorunlarını önler */
}

.form-link-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 18px;
  background-color: #007bff;
  color: #ffffff !important;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.25s ease;
}
.form-link-btn:hover {
  background-color: #0056b3;
}


@media (max-width: 768px) {
    
        .header {
        padding: 30px 15px 40px; /* Daha az padding */
    }
    
    .header h1 {
        font-size: 2rem;
        margin-bottom: 20px; /* Daha az margin */
    }
    
    .header p {
        font-size: 1rem;
        margin-bottom: 15px; /* Arama çubuğuyla arasına yeterli boşluk */
        line-height: 1.4;
        padding: 0 10px; /* Yanlardan boşluk */
    }
    
    .search-bar {
        max-width: 90%; /* Daha dar */
        margin: 0 auto; /* Ortala */
        position: relative; /* Fixed pozisyonu kaldır */
        top: auto;
        left: auto;
        transform: none;
    }
    
    .etkinlik-listesi {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
        padding: 0 15px;
    }
    
    #etkinlik-form {
        padding: 20px;
        width: 95%;
    }
    
    .form-buttons {
        justify-content: center;
    }
    
    .itiraf-submit,
    .itiraf-cancel {
        min-width: 80px;
        height: 40px;
        font-size: 0.9rem;
    }
    
   .toggle-form-btn span {
        display: none !important;
    }

    .toggle-form-btn {
        bottom: 80px;
        right: 20px;
        padding: 0;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1101;
    }

    .toggle-form-btn .fa-plus {
        font-size: 1.5rem;
        margin: 0;
        display: block;
    }

    .toggle-form-btn .mr-2 {
        margin-right: 0;
    }
   
    
    .search-bar {
        max-width: 90%;
        margin: 10px;
    }
    
    .detay-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 30px 15px 40px;
    }
    
    .etkinlik-listesi {
        grid-template-columns: 1fr;
    }
    
    .etkinlik-card-content {
        padding: 15px 18px;
    }
    
    .detay-content {
        padding: 15px;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .itiraf-submit,
    .itiraf-cancel {
        width: 100%;
    }
    
    /* ÇOK KÜÇÜK EKRANLARDA DAHA DA YUKARI */
    .toggle-form-btn {
        bottom: 100px;
        right: 15px;
        width: 52px;
        height: 52px;
    }
    
    .toggle-form-btn .fa-plus {
        font-size: 1.4rem;
    }
}

.card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.favori-btn,
.detay-btn {
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.favori-btn {
  background-color: #fff4cc;
}
.favori-btn:hover {
  background-color: #ffe28a;
  transform: scale(1.1);
}

.detay-btn {
  background-color: #007bff;
  color: white;
}
.detay-btn:hover {
  background-color: #005fcc;
}

.favori-btn.active {
  background-color: gold;
  transform: scale(1.2);
}
