/* wwwroot/css/site.css */

:root {
    --main-color: #0d8c60;
    --main-hover: #0a6d4a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8f5f0 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Header */
header {
    background: var(--main-color);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: -20px -20px 30px -20px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.logo {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
    flex-shrink: 0;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Form Container */
.form-container {
    max-width: 700px;
    margin: 0 auto 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(13, 140, 96, 0.1);
    padding: 40px;
    animation: fadeInUp 0.6s ease;
}

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

.form-logo {
    text-align: center;
    margin-bottom: 25px;
}

.form-logo-circle {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(13, 140, 96, 0.3);
    animation: pulse 2s ease-in-out infinite;
    overflow: hidden;
    border: 4px solid var(--main-color);
    padding: 15px;
}

.form-logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 20px rgba(13, 140, 96, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 10px 30px rgba(13, 140, 96, 0.5);
    }
}

h1 {
    color: var(--main-color);
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.6rem;
    line-height: 1.6;
}

.event-details {
    background: linear-gradient(135deg, #e8f5f0 0%, #f5f7fa 100%);
    border-right: 4px solid var(--main-color);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    animation: slideIn 0.8s ease 0.3s both;
}

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

.event-details p {
    margin: 8px 0;
    color: #2c3e50;
    line-height: 1.8;
    font-size: 1rem;
}

.event-icon {
    display: inline-block;
    margin-left: 8px;
    font-size: 1.2rem;
}

.form-label {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-icon {
    font-size: 1.2rem;
}

.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 14px 18px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 0.3rem rgba(13, 140, 96, 0.15);
    transform: translateY(-2px);
}

.form-control:hover {
    border-color: #b0d4c8;
}

.btn-submit {
    background: linear-gradient(135deg, var(--main-color) 0%, #0a6d4a 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 50px;
    font-weight: 700;
    width: 100%;
    margin-top: 30px;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(13, 140, 96, 0.3);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #0a6d4a 0%, var(--main-color) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(13, 140, 96, 0.4);
}

.btn-submit:active {
    transform: translateY(-1px);
}

.mb-3 {
    margin-bottom: 25px !important;
}

.required-note {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-top: 20px;
}

/* Validation Styles */
.field-validation-error {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 5px;
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.input-validation-error {
    border-color: #e74c3c !important;
    background: #fff5f5;
}

.validation-summary-errors {
    background: #fff5f5;
    border: 2px solid #e74c3c;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.validation-summary-errors ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.validation-summary-errors li {
    color: #e74c3c;
    padding: 5px 0;
    font-weight: 500;
}

.validation-summary-errors li::before {
    content: "⚠️ ";
    margin-left: 5px;
}

/* Footer */
footer {
    background: white;
    padding: 30px 20px;
    margin: 30px -20px -20px -20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-size: 0.95rem;
}

.footer-icon {
    font-size: 1.2rem;
    color: var(--main-color);
}

.footer-bottom {
    color: #888;
    font-size: 0.9rem;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* ===== Success Page / Certificate Styles ===== */
.certificate-wrapper {
    max-width: 800px;
    margin: 50px auto;
    padding: 40px;
    background: #fff;
    border: 10px double #1b8354;
    border-radius: 20px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
}

.certificate-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    padding: 15px;
    border: 4px solid #1b8354;
    border-radius: 50%;
    background: white;
}

.certificate-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.certificate-header {
    color: #1b8354;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.certificate-body {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.info-card {
    text-align: right;
    margin-top: 20px;
    border: 1px solid #1b8354;
    border-radius: 10px;
    padding: 20px;
    background-color: #f9fdf9;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #ccc;
}

.info-row:last-child {
    border-bottom: none;
}

.qr-code {
    margin-top: 30px;
}

.btn-area {
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-title {
        font-size: 1.2rem;
    }

    .logo {
        width: 50px;
        height: 50px;
    }

    .footer-info {
        flex-direction: column;
        gap: 15px;
    }

    h1 {
        font-size: 1.4rem;
    }

    .form-logo-circle {
        width: 100px;
        height: 100px;
    }

    .certificate-wrapper {
        margin: 20px auto;
        padding: 30px 20px;
    }

    .certificate-header {
        font-size: 1.5rem;
    }

    .certificate-body {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    body {
        padding: 10px;
    }

    .form-container {
        padding: 25px;
    }

    h1 {
        font-size: 1.3rem;
    }

    .header-title {
        font-size: 1rem;
    }

    .logo {
        width: 45px;
        height: 45px;
    }

    .form-logo-circle {
        width: 80px;
        height: 80px;
        border-width: 3px;
        padding: 10px;
    }

    .event-details {
        padding: 15px;
        font-size: 0.95rem;
    }

    .form-control {
        padding: 12px 15px;
    }

    .btn-submit {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .certificate-wrapper {
        padding: 20px 15px;
        border-width: 5px;
    }

    .certificate-logo {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }
}

/* ===== Print Styles ===== */
@media print {
    body {
        background: none !important;
        padding: 0 !important;
    }

    @page {
        margin: 0;
        size: A4 portrait;
    }

    header,
    footer,
    .btn-area,
    .btn,
    a {
        display: none !important;
    }

    .certificate-wrapper {
        box-shadow: none !important;
        margin: 0 !important;
        border: 10px double #1b8354 !important;
        page-break-after: avoid;
        max-width: 100% !important;
    }

    .certificate-logo,
    .certificate-header,
    .info-card,
    .qr-code {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
}