/* ================= BASE ================= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

/* ================= CONTAINER ================= */
.container {
    width: 90%;
    max-width: 800px;
    background-color: #fff;
    margin: 50px 0;
    padding: 30px 25px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    text-align: center;
}

/* ================= LOGO ================= */
.logo {
    width: 40%;
    max-width: 180px;
    margin-bottom: 20px;
}

/* ================= HEADINGS ================= */
h1 {
    font-size: 26px;
    color: #333;
    margin-bottom: 10px;
}

.instruction {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
}

/* ================= INPUT + BUTTON ================= */
input {
    padding: 12px;
    width: 50%;
    max-width: 280px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 16px;
    margin-bottom: 12px;
    transition: border-color 0.3s;
}

input:focus {
    border-color: #28a745;
    outline: none;
}

button {
    padding: 12px;
    width: 50%;
    max-width: 280px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #218838;
}

/* ================= CERTIFICATE RESULT ================= */
.certificate-result {
    background-color: #f0fff4;
    border: 1px solid #28a745;
    border-radius: 8px;
    padding: 25px;
    margin-top: 25px;
    text-align: left;
}

/* FLEX LAYOUT (DESKTOP) */
.certificate-result.flex-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* LEFT SIDE */
.certificate-info {
    flex: 1;
}

.certificate-info p {
    margin: 5px 0;
}

/* RIGHT SIDE */
.certificate-preview {
    flex: 1;
    text-align: center;
}

.certificate-preview img {
    width: 100%;
    max-width: 400px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* INVALID */
.certificate-result.invalid {
    background-color: #fff0f0;
    border: 1px solid #dc3545;
}

/* HEADINGS */
.certificate-result h2 {
    text-align: center;
    margin-top: 0;
    font-size: 20px;
    color: #28a745;
}

.certificate-result.invalid h2 {
    color: #dc3545;
}

.certificate-result p {
    font-size: 14px;
    line-height: 1.6;
}

/* PROFESSIONAL FOOTER TEXT INSIDE RESULT */
.certificate-result .footer {
    margin-top: 12px;
    font-style: italic;
    font-size: 13px;
    color: #777;
}

/* ================= FOOTER ================= */
.contact-footer {
    margin-top: 35px;
    font-size: 14px;
    color: #555;
    text-align: center;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.contact-footer span {
    margin: 0 6px;
}

.contact-footer a {
    color: #28a745;
    text-decoration: none;
}

.contact-footer a:hover {
    text-decoration: underline;
}

/* ================= SOCIAL ICONS ================= */
.social-icons {
    margin-top: 10px;
}

.social-icons a {
    margin: 0 6px;
    font-size: 18px;
    transition: transform 0.2s;
}

.social-icons a:hover {
    transform: scale(1.2);
}

/* BRAND COLORS */
.social-icons a.facebook { color: #1877F2; }
.social-icons a.linkedin { color: #0A66C2; }
.social-icons a.twitter { color: #1DA1F2; }
.social-icons a.youtube { color: #FF0000; }
.social-icons a.instagram { color: #C13584; }
.social-icons a.tiktok { color: #010101; }
.social-icons a.whatsapp { color: #25D366; }
.social-icons a.email { color: #D44638; }

/* COPYRIGHT */
.contact-footer .copyright {
    margin-top: 10px;
    font-size: 12px;
    color: #888;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {

    .container {
        padding: 20px 15px;
    }

    .logo {
        width: 60%;
    }

    input, button {
        width: 100%;
    }

    /* STACK LAYOUT */
    .certificate-result.flex-container {
        flex-direction: column;
        text-align: center;
    }

    .certificate-info {
        width: 100%;
    }

    .certificate-preview {
        margin-top: 20px;
    }

    .certificate-preview img {
        max-width: 100%;
    }
}

/* EXTRA SMALL DEVICES */
@media (max-width: 480px) {

    h1 {
        font-size: 22px;
    }

    .instruction {
        font-size: 13px;
    }

    .contact-footer span {
        display: block;
        margin: 5px 0;
    }

    .social-icons a {
        font-size: 20px;
        margin: 5px;
    }
}
