/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
}

/* Header and Navigation */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #632695;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: #632695;
}

.lang-switcher {
    margin-left: 2rem;
}

.lang-switcher a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    margin: 0 0.25rem;
}

.lang-switcher a.lang-active {
    color: #632695;
    text-decoration: underline;
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* Site Switcher Styles */
.site-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.site-switcher select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    min-width: 150px;
}

.site-switcher select:hover {
    border-color: #632695;
}

.site-switcher select:focus {
    outline: none;
    border-color: #632695;
    box-shadow: 0 0 0 2px rgba(99, 38, 149, 0.2);
}

#current-site-role {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.hamburger.active div:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active div:nth-child(2) {
    opacity: 0;
}

.hamburger.active div:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

    .hamburger div {
        width: 25px;
        height: 3px;
        background-color: #333;
        margin: 5px 0;
        transition: 0.4s;
    }

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

thead {
    background-color: #632695;
    color: #fff;
}

th, td {
    padding: 1rem;
    text-align: left;
    border: 1px solid #ddd;
}

tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

tbody tr:hover {
    background-color: #f1f1f1;
}

/* Code Block Styles */
pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

code {
    font-family: "Fira Code", "Courier New", monospace;
    font-size: 0.95rem;
}

/* Inline code */
:not(pre) > code {
    background-color: #e7e7e7;
    color: #333;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

img {
    max-width: 100%;
    height: auto;
}

/* Hero Section */
#hero {
    color: #fff;
    text-align: center;
    padding: 8rem 1rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    background: linear-gradient(-99deg, #b5267b 0%, #632695 99%);
    color: #fff;
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: bold;
    border-radius: 22px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background: linear-gradient(-99deg, #a0206a 0%, #501d7a 99%);
}

/* General Section Styling */
main section {
    padding: 4rem 5%;
    border-bottom: 1px solid #ddd;
}

main section:last-child {
    border-bottom: none;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #632695;
}

/* Contact Form */
#contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #632695;
    box-shadow: 0 0 5px rgba(99, 38, 149, 0.5);
}

#form-status {
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

/* Footer */
footer {
    background: linear-gradient(-99deg, #b5267b 0%, #632695 99%);
    color: #fff;
    text-align: center;
    padding: 2rem 5%;
}

/* Responsive Navigation */
@media screen and (max-width: 1200px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background-color: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .lang-switcher {
        display: none;
    }

    .lang-switcher.active {
        display: flex;
        flex-direction: row;
        justify-content: center;
        box-shadow: none;
        margin-top: 1rem;
    }

    .nav-links li {
        text-align: center;
        margin: 1rem 0;
    }

    .lang-switcher {
        top: auto;
        position: relative;
        flex-direction: row;
        justify-content: center;
        box-shadow: none;
        margin-top: 1rem;
    }

    .hamburger {
        display: block;
    }
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.blog-card h3 {
    margin-top: 0;
    color: #632695;
}

/* Login page specific styles */
#login-section {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#login-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

#qr-code {
    text-align: center;
    margin: 2rem 0;
}

.qr-code-wrapper {
    display: inline-block;
    padding: 1rem;
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
}

.qr-code-wrapper img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Secret code display */
.secret-code-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.secret-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #555;
}

.secret-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.secret-code code {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    letter-spacing: 0.1em;
}

.copy-button {
    padding: 0.5rem 1rem;
    background: #632695;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.copy-button:hover {
    background: #501d7a;
}

.copy-button.copied {
    background: #28a745;
}

.secret-instructions {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Setup instructions */
.setup-instructions {
    background: #f0f7ff;
    border: 1px solid #d0e5ff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.setup-instructions h4 {
    margin-top: 0;
    color: #0066cc;
}

.setup-instructions ol {
    margin: 0;
    padding-left: 1.5rem;
}

.setup-instructions li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Auth status messages */
#auth-status {
    text-align: center;
    margin: 1rem 0;
    font-weight: 500;
}

#auth-status:not(:empty) {
    padding: 0.75rem;
    border-radius: 4px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Secondary button */
.secondary-button {
    background: #6c757d;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 22px;
    cursor: pointer;
    font-weight: 500;
    margin-left: 0.5rem;
    transition: background-color 0.3s ease;
}

.secondary-button:hover {
    background: #5a6268;
}

/* Responsive styles for mobile */
@media screen and (max-width: 600px) {
    #login-section {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .secret-code {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .secret-code code {
        font-size: 1rem;
        padding: 0.5rem;
        word-break: break-all;
    }
    
    .qr-code-wrapper {
        padding: 0.5rem;
    }
    
    .setup-instructions {
        padding: 1rem;
    }
    
    .setup-instructions ol {
        padding-left: 1.2rem;
    }
}
