/* CSS Variables */
:root {
    --primary-color: #2e7d32;
    --secondary-color: #1b5e20;
    --text-color: #333;
    --background-color: #f4f4f4;
}

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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* Header Styles */
header {
    background: var(--text-color);
    color: white;
    padding: 1rem;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    max-height: 50px;
    vertical-align: middle;
}

.logo span {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Hero Section Styles */
.hero {
    position: relative;
    height: 100vh;
    background-image: url('/images/german-shepherd.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: white;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: var(--secondary-color);
}

/* Main Content Styles */
.about-us {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.instagram-feed {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.instagram-feed .insta-posts {
    display: flex;
    justify-content: center;
}

.instagram-feed .instagram-media {
    max-width: 540px !important;
    width: 100% !important;
    margin: 0 auto !important;
}

/* Listings Styles */
.listings {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.listings h1 {
    text-align: center;
    margin-bottom: 2rem;
}

.listings h2 {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.listings-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

.listing-card {
    max-width: 300px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
}

.listing-card img {
    max-width: 100%;
    height: auto;
}

/* Contact Form Styles */
.contact-form form {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form label,
.contact-form input,
.contact-form textarea,
.contact-form button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

.contact-form .consent-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-form .consent-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Admin Panel Styles */
.admin-panel {
    background-color: #000;
    color: #fff;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.admin-form {
    background-color: #333;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.admin-form label {
    display: block;
    margin-bottom: 5px;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
    background-color: #555;
    color: #fff;
    border: 1px solid #777;
    padding: 8px;
    margin-bottom: 10px;
    width: 100%;
}

.admin-form button {
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.listing-group {
    background-color: #222;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
}

.listing-group h3 {
    color: #fff;
}

.listing-group button {
    background-color: #dc3545;
    color: #fff;
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    margin-right: 10px;
}

.analytics-card {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex: 1 1 300px;
    color: #333; /* Default text color for readability */
}

.analytics-card h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.2em;
}

.analytics-card p,
.analytics-card ul {
    margin: 10px 0;
    color: #333; /* Explicitly set for consistency */
}

.analytics-card ul {
    list-style-type: none;
    padding: 0;
}

.analytics-card li {
    margin-bottom: 5px;
}

.analytics-card canvas {
    max-width: 100%;
    height: auto;
}

.analytics-card table {
    width: 100%;
    border-collapse: collapse;
}

.analytics-card th,
.analytics-card td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    color: #333; /* Ensure table text is readable */
}

.analytics-card th {
    background-color: #f2f2f2;
    color: #333;
}

.analytics-card tr:nth-child(even) {
    background-color: #f2f2f2; /* Striped rows for readability */
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 1rem;
    background: var(--background-color);
    margin-top: 2rem;
}

/* Utility Styles */
.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.language-switcher .full-lang {
    display: inline;
}

.language-switcher .short-lang {
    display: none;
}

.flag {
    width: 16px;
    height: 11px;
    vertical-align: middle;
    margin-right: 5px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin: 10px 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Media Queries */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
    }

    nav ul {
        margin: 10px 0;
    }

    .language-switcher {
        margin-top: 10px;
        font-size: 0.9em;
        white-space: nowrap;
        text-align: center;
    }

    .language-switcher .full-lang {
        display: none;
    }

    .language-switcher .short-lang {
        display: inline;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .listing-card {
        max-width: 100%;
    }

    .parents-photos {
        flex-direction: column;
        align-items: center;
    }
}

@media (min-width: 768px) {
    .analytics-card {
        flex: 1 1 45%; /* Two cards per row */
    }
}

@media (min-width: 1200px) {
    .analytics-card {
        flex: 1 1 30%; /* Three cards per row */
    }
}

/* Accessibility */
.btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.update-time {
    text-align: center;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 1rem;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gallery img {
    max-width: 300px;
    height: auto;
    border-radius: 5px;
}

/* Parents Section */
.parents-section {
    margin: 20px 0;
}

.parents-photos {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.parent-photo {
    text-align: center;
}

.parent-photo img {
    max-width: 200px;
    height: auto;
}

.parent-photo p {
    margin-top: 10px;
    font-weight: bold;
}

.parents-blurb {
    text-align: center;
    margin-top: 20px;
}

.parents-blurb p {
    margin: 5px 0;
}

/* Tabs */
.tabs {
    margin-bottom: 20px;
}

.tab-button {
    padding: 10px 20px;
    background-color: #555;
    color: white;
    border: none;
    cursor: pointer;
}

.tab-button.active {
    background-color: var(--primary-color);
}

.tab-content {
    padding: 20px;
}

/* Ensure text visibility in Records tab */
.hacker-content label,
.hacker-content p,
.hacker-content h3 {
    color: #00ff00;
}
