/* Etkinlikler Page Styles */

/* Override panel button to be normal (not purple/bold) on this page */
.nav-links .panel-btn {
    color: var(--text-dark) !important;
    font-weight: 500 !important;
}

.nav-links .panel-btn:hover {
    color: var(--accent-color) !important;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 280px;
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    overflow: hidden;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    animation: fadeInUp 1s ease;
}

.hero h1 {
    font-size: 3rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Events Section */
.events-section {
    padding: 40px 0 80px;
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Events Grid */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Event Card */
.event-card {
    background: var(--bg-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

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

/* Event Image */
.event-image-container {
    width: 100%;
    height: 280px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
}

.event-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Past Event Image Overlay */
.event-image-container.past-event::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* Signup Badge */
.signup-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #10B981;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

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

/* Status Badge */
.status-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: var(--accent-color);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Status Badge Variants */
.status-badge.today {
    background: #10B981;
}

.status-badge.tomorrow {
    background: #3B82F6;
}

.status-badge.week {
    background: #8B5CF6;
}

.status-badge.future {
    background: #6366F1;
}

.status-badge.past {
    background: #9CA3AF;
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* Event Info Section */
.event-info {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 200px;
}

.event-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    margin: 0;
}

.event-datetime {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.event-datetime svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Strikethrough for past events */
.event-datetime.past-event {
    text-decoration: line-through;
    color: #D1D5DB;
}

.event-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.event-location svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.event-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.event-category svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Single Event View Styles */
.event-single-section {
    padding: 2rem 0 4rem;
    background: var(--bg-light);
    min-height: 70vh;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.back-button svg {
    width: 20px;
    height: 20px;
}

.event-single {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.event-single-layout {
    display: flex;
    gap: 2.5rem;
    padding: 2.5rem;
}

.event-single-image {
    position: relative;
    flex-shrink: 0;
    width: 500px;
    max-width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.event-single-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    max-height: 700px;
}

.event-single-image.past-event::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.event-single-image .status-badge {
    top: 12px;
    left: 12px;
    bottom: auto;
    right: auto;
}

.event-single-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-single-info h1 {
    color: var(--text-dark);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.event-single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.event-single-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-normal);
    font-size: 1rem;
}

.event-single-meta .meta-item.past-event {
    text-decoration: line-through;
    opacity: 0.6;
}

.event-single-meta .meta-item svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
    flex-shrink: 0;
}

.event-single-description {
    color: var(--text-normal);
    font-size: 1.05rem;
    line-height: 1.8;
    text-align: justify;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .hero {
        padding: 60px 0;
        min-height: 300px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .events-section {
        padding: 60px 0;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    .event-name {
        font-size: 1.1rem;
    }

    /* Single event responsive */
    .event-single-section {
        padding: 1.5rem 0 3rem;
    }

    .back-button {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
        margin-bottom: 1.5rem;
    }

    .event-single-layout {
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: 2rem;
    }

    .event-single-image {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    .event-single-image img {
        max-height: 600px;
    }

    .event-single-info h1 {
        font-size: 1.5rem;
    }

    .event-single-meta {
        gap: 1.5rem;
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .event-single-description {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .events-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hero {
        padding: 40px 0;
        min-height: 250px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .events-section {
        padding: 40px 0;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .event-info {
        padding: 1.5rem;
    }

    .status-badge.past {
        font-size: 0.7rem;
        padding: 5px 10px;
    }

    /* Single event mobile */
    .event-single-layout {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }

    .event-single-image {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }

    .event-single-image img {
        max-height: 500px;
    }

    .event-single-info h1 {
        font-size: 1.35rem;
    }

    .event-single-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .event-single-meta .meta-item svg {
        width: 20px;
        height: 20px;
    }
}

/* Signup Button Container */
.signup-button-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.btn-signup {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    padding: 0.875rem 2rem;
}

.btn-signup svg {
    width: 20px;
    height: 20px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
}

.modal-content {
    position: relative;
    max-width: 500px;
    width: 90%;
    margin-top: 5%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10000;
}

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

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: color 0.2s;
    border-radius: 4px;
}

.modal-close:hover {
    color: var(--text-dark);
    background: var(--bg-light);
}

.modal-close svg {
    width: 24px;
    height: 24px;
}

.modal-body {
    padding: 2rem;
}

.modal-event-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

/* Signup Form */
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.signup-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.signup-form label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
}

.signup-form input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.signup-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.signup-form input::placeholder {
    color: var(--text-light);
}

.form-message-container {
    min-height: 20px;
}

.form-message {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease;
}

.form-message.success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #10B981;
}

.form-message.error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #EF4444;
}

.btn-block {
    width: 100%;
}

.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading .btn-loading-text {
    visibility: hidden;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% 1rem;
        max-height: 85vh;
    }

    .modal-header {
        padding: 1.25rem 1.5rem;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .signup-button-container {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }

    .btn-signup {
        width: 100%;
        justify-content: center;
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
}
