/* Basic Resets & Global Styles */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --secondary-color: #6c757d;
    --secondary-hover: #545b62;
    --accent-color: #28a745;
    --text-color: #333;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
    --shadow-light: rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
    scroll-behavior: smooth;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Header */
header {
    background-color: var(--card-bg);
    padding: 15px 0;
    box-shadow: 0 2px 4px var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-decoration: none; /* For button links */
    display: inline-block; /* For button links */
    text-align: center;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.primary:hover {
    background-color: var(--primary-hover);
}

.btn.secondary {
    background-color: var(--secondary-color);
    color: white;
    margin-left: 10px;
}

.btn.secondary:hover {
    background-color: var(--secondary-hover);
}

.auth-buttons button:not(:first-child) {
    margin-left: 10px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 123, 255, 0.7), rgba(0, 123, 255, 0.7)), url('https://source.unsplash.com/random/1600x900?documents,security') no-repeat center center/cover;
    color: white;
    text-align: center;
    padding: 100px 20px;
}

.hero-section h1 {
    font-size: 3em;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons .btn {
    margin: 0 10px;
}

/* General Section Styling */
.section {
    padding: 80px 0;
    text-align: center;
}

.section:nth-of-type(even) {
    background-color: var(--bg-light);
}

.section h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.section p {
    font-size: 1.1em;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Verify Section */
.verify-section {
    background-color: var(--card-bg);
}

.verify-methods {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.method-card {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    width: 280px;
}

.method-card:hover {
    background-color: #e9ecef;
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.method-card.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.method-card.active i, .method-card.active h3 {
    color: white;
}

.method-card i {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.method-card h3 {
    font-size: 1.3em;
    color: var(--text-color);
}

.verify-form {
    display: none;
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background-color: var(--bg-light);
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-light);
    text-align: left;
}

.verify-form.active-form {
    display: block;
}

.verify-form input[type="text"],
.verify-form button {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    font-size: 1.1em;
}

.verify-form button {
    margin-top: 10px;
    cursor: pointer;
}

.qr-scanner-video {
    width: 100%;
    max-width: 400px;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    display: block; /* Ensures it takes full width within its container */
    margin-left: auto;
    margin-right: auto;
}

/* Document Forms (Generate & Upload) */
.doc-form {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-light);
    text-align: left;
}

.doc-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.doc-form input[type="text"],
.doc-form input[type="email"],
.doc-form input[type="file"],
.doc-form select,
.doc-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    background-color: var(--bg-light);
}

.doc-form select {
    appearance: none; /* Remove default arrow in some browsers */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%204%205%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M2%200L0%202h4zm0%205L0%203h4z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 0.7em top 50%, 0 0;
    background-size: 0.65em auto, 100%;
}

.doc-form button[type="submit"] {
    width: auto;
    padding: 12px 30px;
    margin-top: 10px;
}

.template-fields {
    border: 1px dashed var(--border-color);
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f0f8ff;
    border-radius: 5px;
}

.template-fields label {
    color: var(--text-color);
    font-weight: normal;
}
.template-fields input {
    background-color: #fff;
}

/* Result Boxes */
.result-box {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    background-color: #e9f7ef; /* Light green for success */
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    display: none; /* Hidden by default */
    text-align: center;
}

.result-box.error {
    background-color: #ffe6e6; /* Light red for error */
    color: #dc3545;
    border-color: #dc3545;
}

/* Subscription Section */
.subscription-section {
    background-color: var(--bg-light);
}

/* About & Contact Sections */
.about-section p, .contact-section p {
    text-align: left;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-light);
    text-align: left;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    background-color: var(--bg-light);
}
.contact-form button {
    width: auto;
    padding: 12px 30px;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 0;
    text-align: center;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* For responsiveness */
}

footer p {
    margin: 0;
}

.social-links a {
    color: white;
    font-size: 1.5em;
    margin-left: 20px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #e9ecef;
}

/* Responsiveness */
@media (max-width: 992px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    nav ul {
        flex-direction: column;
        margin-top: 15px;
    }
    nav ul li {
        margin: 10px 0;
    }
    .auth-buttons {
        margin-top: 15px;
    }
    .hero-section h1 {
        font-size: 2.5em;
    }
    .section h2 {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .verify-methods {
        flex-direction: column;
        align-items: center;
    }
    .method-card {
        width: 90%;
        max-width: 350px;
    }
    .btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    .hero-buttons .btn {
        display: block;
        margin: 10px auto;
        width: 80%;
    }
    footer .container {
        flex-direction: column;
        gap: 15px;
    }
    .social-links {
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2em;
    }
    .section h2 {
        font-size: 1.8em;
    }
    .verify-form, .doc-form, .contact-form {
        padding: 20px;
    }
}