/* Base styles with dark theme */
body {
    margin: 0;
    font-family: 'Yanone Kaffeesatz', Arial, sans-serif;
    background: #181a1b;
    color: #f8f9fa;
}

/* Layout */
.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content {
    flex: 1;
    padding-top: 4rem; /* Space for fixed header */
}

/* Header and Navigation */
.header {
    background: #23272b;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.pure-menu-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pure-menu-list {
    display: flex;
}

.pure-menu-link {
    color: #f8f9fa !important;
    padding: 1rem;
    transition: background-color 0.2s;
}

.pure-menu-link:hover {
    background-color: #343a40;
    text-decoration: none;
}

.pure-menu-children {
    background-color: #23272b;
    border: 1px solid #343a40;
}

.logo-link img {
    height: 2.5rem;
    vertical-align: middle;
}

/* Prevent fixed navbar from obscuring anchor targets */
section[id],
[id]:not(html):not(body) {
    scroll-margin-top: 4.5rem;
}

/* Contact form adaptive background for light/dark mode */
.contact-form {
    background: var(--color-card-light);
    color: var(--color-text-light);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
body.bg-dark .contact-form {
    background: var(--color-card-dark);
    color: var(--color-text-dark);
}

/* --- Bootstrap now handles nav, grid, and card layout. Keep only custom/override styles below. --- */

header {
    /* No longer needed: position: fixed; top: 0; width: 100%; background, color, z-index handled by Bootstrap */
}

nav {
    /* No longer needed: display, justify-content, gap, padding handled by Bootstrap */
}

nav a {
    /* No longer needed: color, text-decoration, font-size handled by Bootstrap */
}

.section {
    /* No longer needed: max-width, margin, padding handled by Bootstrap */
}

footer {
    /* No longer needed: background, color, text-align, padding, margin handled by Bootstrap */
}

.footer-links {
    /* No longer needed: margin handled by Bootstrap */
}

.footer-links a {
    /* No longer needed: color, margin, text-decoration handled by Bootstrap */
}

/* Hero section styles */
.hero {
    height: 60vh;
    background: url('/theme/img/hero-bg.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-hero-overlay);
}

.hero-content {
    position: relative;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    z-index: 1;
    text-align: center;
    padding: 0 1rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin: 0.5rem 0;
}

/* Section styling */
.section {
    padding: 3rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #fff;
}

/* About section */
.about-img {
    min-width: 250px;
    max-width: 350px;
    margin: 0 auto;
}

.about-img img {
    width: 100%;
    border-radius: 1rem;
}

.about-text {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Site cards */
.sites-container {
    justify-content: center;
}

.site-card {
    background: #23272b;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 auto 2rem auto;
    cursor: pointer;
    transition: transform 0.2s;
    max-width: 300px;
}

.site-card:hover {
    transform: translateY(-5px) scale(1.03);
}

.site-card-img-container {
    width: 200px;
    height: 200px;
    margin: 1rem auto;
    overflow: hidden;
    border-radius: 0.75rem;
}

.site-card-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 0.75rem;
}

.site-card-content {
    padding: 1rem;
    text-align: center;
}

.site-card-title {
    margin-top: 0;
    color: #fff;
    text-align: center;
}

.site-card-desc {
    color: #ccc;
}

/* Site detail */
.site-detail {
    background: #23272b;
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.site-detail-img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Contact form */
.contact-form-container {
    display: flex;
    justify-content: center;
}

.contact-form {
    background: #23272b;
    color: #f8f9fa;
    padding: 2rem;
    border-radius: 0.5rem;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    background-color: #2b3035;
    color: #f8f9fa;
    border: 1px solid #495057;
    border-radius: 0.25rem;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: #6ea8fe;
    outline: none;
}

.form-error {
    color: #ff8c8c;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #3d8bfd;
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #4d98ff;
}

.btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.alert {
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #28a745;
    color: white;
}

.alert-danger {
    background-color: #dc3545;
    color: white;
}

.alert-warning {
    background-color: #ffc107;
    color: #212529;
}

/* Footer */
.footer {
    background: #23272b;
    color: #f8f9fa;
    padding: 2rem 1rem;
    text-align: center;
    margin-top: 2rem;
}

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

.footer-links a {
    color: #6ea8fe;
    margin: 0 0.5rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: #a3d8ff;
    text-decoration: underline;
}

/* Dropdown menu styles */
.pure-menu-has-children {
    position: relative;
}

.pure-menu-children {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: #23272b;
    border: 1px solid #343a40;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    z-index: 100;
}

.pure-menu-allow-hover:hover > .pure-menu-children,
.pure-menu-active > .pure-menu-children {
    display: block;
}

.pure-menu-children .pure-menu-item {
    display: block;
    width: 100%;
}

.pure-menu-children .pure-menu-link {
    display: block;
    padding: 0.5em 1em;
    text-align: left;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pure-menu-horizontal {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pure-menu-list {
        margin-top: 1rem;
        flex-wrap: wrap;
    }
    
    .hero-content {
        font-size: 1.5rem;
    }
    
    .about-img {
        margin-bottom: 1.5rem;
    }
    
    .pure-menu-children {
        position: static;
        box-shadow: none;
        border: none;
        border-left: 2px solid #3d8bfd;
        margin-left: 1em;
    }
}

@media (min-width: 768px) {
    .contact-form {
        padding: 2.5rem;
    }
}

/* Utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.d-none { display: none; }
.d-block { display: block; }
.max-width-700 { max-width: 700px; margin-left: auto; margin-right: auto; }
.max-width-600 { max-width: 600px; margin-left: auto; margin-right: auto; }
.min-width-300 { min-width: 300px; }

/* Link styling */
a {
    color: #6ea8fe;
    text-decoration: none;
}

/* Ensure card content toggles background and text color in dark mode */
.card.bg-dark {
    background-color: var(--color-card-dark) !important;
    color: var(--color-text-dark) !important;
}
.card.bg-white {
    background-color: var(--color-card-light) !important;
    color: var(--color-text-light) !important;
}

/* Body background and text color for dark mode */
body.bg-dark {
    background: var(--color-bg-dark) !important;
    color: var(--color-text-dark) !important;
}

/* Deep content elements in dark mode */
.bg-dark, .card.bg-dark, .contact-form.bg-dark {
    color: var(--color-text-dark) !important;
}

.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark h5, .bg-dark h6,
.card.bg-dark h1, .card.bg-dark h2, .card.bg-dark h3, .card.bg-dark h4, .card.bg-dark h5, .card.bg-dark h6 {
    color: white !important;
}

.bg-dark p, .bg-dark li, .bg-dark ul, .bg-dark ol, .bg-dark .page-content,
.card.bg-dark p, .card.bg-dark li, .card.bg-dark ul, .card.bg-dark ol, .card.bg-dark .page-content {
    color: var(--color-text-dark) !important;
}

/* Links in dark mode */
.bg-dark a, .card.bg-dark a {
    color: var(--color-link-dark) !important;
    text-decoration: underline;
}
.bg-dark a:hover, .card.bg-dark a:hover {
    color: var(--color-link-hover-dark) !important;
}

/* reCAPTCHA container removed */

.max-width-700 { max-width: 700px !important; }
.max-width-600 { max-width: 600px !important; }
.min-width-300 { min-width: 300px !important; }
