/* RN20Event - Frontend Styles */

/* Events List */
.events-list {
    display: grid;
    gap: 30px;
    margin: 20px 0;
}

.event-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.event-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.event-thumbnail {
    margin-bottom: 15px;
}

.event-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.event-title {
    margin: 0 0 10px 0;
    font-size: 1.5em;
    line-height: 1.3;
}

.event-title a {
    color: #333;
    text-decoration: none;
}

.event-title a:hover {
    color: #007cba;
}

.event-subtitle {
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
}

.event-date,
.event-location {
    margin-bottom: 10px;
    font-size: 0.95em;
}

.event-excerpt {
    margin: 15px 0;
    color: #555;
    line-height: 1.6;
}

.event-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Single Event Details */
.event-details {
    max-width: 800px;
    margin: 50px auto;
}

.event-visual {
    margin-bottom: 30px;
    text-align: center;
}

.event-visual img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.event-header {
    margin-bottom: 30px;
    text-align: center;
}

.event-details .event-title {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #333;
}

.event-details .event-subtitle {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 0;
}

.event-content {
    margin-bottom: 40px;
    line-height: 1.8;
}

.event-content p {
    margin-bottom: 1em;
}

/* Occurrences */
.event-occurrences {
    margin-top: 40px;
}

.event-occurrences h2 {
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
    margin-bottom: 30px;
    color: #333;
}

.occurrence-item {

    border-radius: 8px;
    padding: 0px;
    margin-bottom: 130px !important;
}

.occurrence-info {
    margin-bottom: 30px;
}

.occurrence-date,
.occurrence-location,
.occurrence-capacity {
    margin-bottom: 15px;
    font-size: 1em;
}

.occurrence-date strong,
.occurrence-location strong,
.occurrence-capacity strong {
    color: #333;
}

.occurrence-registration h3 {
    margin-bottom: 20px;
    color: #007cba;
}

/* Registration Form */
.event-registration-form-wrapper {
    max-width: 600px;
    margin: 0 auto !important;
}

.event-registration-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
}

.event-registration-form .form-section {
    margin-bottom: 30px;
}

.event-registration-form .form-section h3 {
    margin-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    color: #333;
    font-size: 1.2em;
}

.event-registration-form .form-field {
    margin-bottom: 20px;
}

.event-registration-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.event-registration-form .form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.event-registration-form .form-control:focus {
    outline: none;
    border-color: #007cba;
}

.event-registration-form .required {
    color: #d63638;
}

.event-registration-form .checkbox-label {
    display: flex;
    align-items: flex-start;
    font-weight: normal;
    line-height: 1.5;
}

.event-registration-form .checkbox-label input {
    margin-right: 10px;
    margin-top: 3px;
    flex-shrink: 0;
}

.event-registration-form .radio-group {
    margin-top: 10px;
}

.event-registration-form .radio-label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 8px;
}

.event-registration-form .radio-label input {
    margin-right: 8px;
}

.event-registration-form .form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.event-registration-form .button {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.event-registration-form .button-primary {
    background: #007cba;
    color: white;
}

.event-registration-form .button-primary:hover {
    background: #005a87;
}

.event-registration-form .button-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.event-registration-form .button-disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}

/* Form Messages */
.form-message {
    margin-top: 15px;
    padding: 15px;
    border-radius: 4px;
    font-weight: bold;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Capacity Info */
.registration-capacity-info {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    color: #004085;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.event-registration-full {
    background: #ffebee;
    color: #c62828;
    padding: 20px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #ffcdd2;
}

.registration-closed {
    background: #fff3cd;
    color: #856404;
    padding: 20px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #ffeaa7;
}

/* No Events Message */
.no-events {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f7f7f7;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button:hover {
    background: #e7e7e7;
    border-color: #bbb;
}

.button-primary {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.button-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

/* Responsive Design */
@media (max-width: 768px) {
    .event-details .event-title {
        font-size: 2em;
    }

    .occurrence-item {
        padding: 20px;
    }

    .event-registration-form {
        padding: 20px;
    }

    .event-actions {
        flex-direction: column;
    }

    .event-actions .button {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .event-item {
        padding: 15px;
    }

    .event-details .event-title {
        font-size: 1.8em;
    }

    .event-registration-form .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Events Cards */
.events-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.event-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.event-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f5f5f5;
    display: block;
}

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

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

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

.event-card-title {
    font-size: 1.4em;
    font-weight: 700;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.event-card-title a {
    color: #333;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.event-card-title a:hover {
    color: #007cba;
    text-decoration: none !important;
}

.event-card-occurrences {
    margin-bottom: 16px;
}

.event-card-occurrence {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
    font-size: 0.9em;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

.event-card-occurrence:last-child {
    border-bottom: none;
}

.event-card-date {
    font-weight: 600;
    color: #007cba;
}

.event-card-separator {
    color: #ccc;
}

.event-card-location {
    color: #666;
}

.event-card-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.event-card-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.event-card-button {
    display: inline-block;
    width: auto;
    padding: 12px 20px;
    background: linear-gradient(135deg, #a4c639 0%, #8fb82e 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(164, 198, 57, 0.3);
}

.event-card-button:hover {
    background: linear-gradient(135deg, #8fb82e 0%, #7a9e25 100%);
    box-shadow: 0 4px 12px rgba(164, 198, 57, 0.4);
    transform: translateY(-2px);
}

/* Responsive Events Cards */
@media (max-width: 768px) {
    .events-cards-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .event-card-title {
        font-size: 1.25em;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .events-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .events-cards-container {
        grid-template-columns: repeat(3, 1fr);
    }
}