h1 {
    text-align: center;
    color: #1a365d;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: Arial, sans-serif;
    background-color: #c7ddb5;
    color: #000000;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 700px;
    background: white;
    margin: 0 auto 40px auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    box-sizing: border-box;
    color: #000000;
}

.section-title {
    font-size: 18px;
    color: #4b6043;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 5px;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: bold;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
    color: #000000;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    color: #000000;
    background: white;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.checkbox-group input {
    width: auto;
    cursor: pointer;
}

.checkbox-group label {
    display: inline;
    cursor: pointer;
    font-size: 15px;
    color: #4b6043;
}

.pedigree-box {
    background: #f7fafc;
    padding: 15px;
    border: 1px dashed #cbd5e0;
    border-radius: 4px;
}

.submit-btn {
    width: 100%;
    background-color: #4b6043;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
}

.price-tag {
    background: #ddead1;
    color: #4b6043;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 20px;
    border: 1px solid #b3cf99;
}
/* ==========================================================================
   4. YHTEYDENOTTOLOMAKE (Modal popup)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none; /* Piilotettu oletuksena */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.close-modal-btn:hover {
    color: #000;
}
/* ==========================================================================
   5. ETUSIVUN OMAT TYYLIT (index.html)
   ========================================================================== */
.hero-text { 
    text-align: center; 
    font-size: 16px; 
    color: #4a5568; 
    line-height: 1.6; 
    margin-bottom: 40px; 
}

.grid-features { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 25px; 
    margin-bottom: 35px; 
}

.feature-card { 
    background: #f5f9f2; 
    border: 1px solid #b3cf99; 
    border-radius: 8px; 
    padding: 25px; 
    box-sizing: border-box; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
}

.feature-card h2 {
    font-size: 22px; 
    margin-top: 0; 
    color: #4b6043;
    text-align: center;
}

.feature-card p { 
    font-size: 14px; 
    color: #4a5568; 
    line-height: 1.5; 
    margin-bottom: 20px; 
}

.feature-btn { 
    display: block; 
    text-align: center; 
    background: linear-gradient(135deg, #4b6043 0%, #75975e 100%); 
    color: white; 
    text-decoration: none; 
    padding: 12px; 
    border-radius: 4px; 
    font-weight: bold; 
    font-size: 14px; 
    transition: opacity 0.2s; 
}

.feature-btn:hover { 
    opacity: 0.9; 
}

/* --- MAINOSLAATIKOIDEN ASEMOINTI JA SKAALAUS --- */
.ad-sidebar {
    position: absolute;
    top: 180px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.left-ad-group {
    left: calc(50% - 620px);
}

.right-ad-group {
    right: calc(50% - 620px);
}

.sidebar-ad {
    width: 250px;
    height: 250px;
    background-color: white;
    border: 1px solid #b3cf99;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    font-size: 13px;
    color: #4b6043;
}

/* --- MOBILE/NARROW-SCREEN AD BANNERS --- */
/* Hidden on wide screens (sidebar ads cover that space instead); shown
   in-flow between content sections once the sidebars are hidden. */
.mobile-ad-banner {
    display: none;
    background-color: white;
    border: 1px solid #b3cf99;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 16px 20px;
    text-align: center;
    font-size: 13px;
    color: #4b6043;
    line-height: 1.5;
    margin-bottom: 30px;
}

/* ==========================================================================
   PENTUEHAUN TULOSLAATIKOT (litter-search.html)
   ========================================================================== */
.litter-card { 
    background-color: #eef4e8;
    border: 1px solid #b3cf99;
    border-radius: 8px; 
    box-shadow: 0 4px 12px rgba(75, 96, 67, 0.08);
    padding: 20px; 
    margin-bottom: 20px; 
    color: #000000; 
    box-sizing: border-box;
    width: 100%;
}
.litter-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid #e2e8f0; 
    padding-bottom: 10px; 
    margin-bottom: 15px; 
}
.litter-title { 
    font-size: 20px; 
    font-weight: bold; 
    color: #000000; 
}
.status-badge { 
    padding: 4px 10px; 
    border-radius: 4px; 
    font-size: 12px; 
    font-weight: bold; 
}
.status-born { 
    background-color: #7CFC00; 
    color: #1a3d00; 
}
.status-expected { 
    background-color: #ffd6e8; 
    color: #9d174d; 
}
.details-text { 
    background: rgba(255, 255, 255, 0.6);
    padding: 12px; 
    border-radius: 4px; 
    font-size: 14px; 
    color: #000000;
    border-left: 3px solid #4b6043; 
    margin-bottom: 15px; 
}
.grid-info { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    font-size: 14px; 
    margin-bottom: 15px; 
}
.info-item {
    font-size: 14px;
    color: #1f2937;
    line-height: 1.5;
}
.contact-btn {
    background-color: #4b6043;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}
.contact-btn:hover {
    background-color: #3a4c35;
}
.dog-titles {
    color: #000000;
    font-weight: 600;
    margin-bottom: 8px;
}

.litter-filter-box {
    background: #f5f9f2;
    border: 1px solid #b3cf99;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.litter-grid-filters {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    align-items: end;
}

.litter-results-count {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 15px;
    font-weight: bold;
}

.litter-no-results {
    text-align: center;
    color: #718096;
    padding: 30px;
    font-size: 15px;
}

@media (max-width: 700px) {
    .litter-grid-filters {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   KOIRAHAUN TULOSLAATIKOT (stud-search.html)
   ========================================================================== */
.dog-card { 
    background-color: #eef4e8;
    border: 1px solid #b3cf99;
    border-radius: 8px; 
    box-shadow: 0 4px 12px rgba(75, 96, 67, 0.08);
    padding: 20px; 
    margin-bottom: 20px; 
    color: #000000; 
    box-sizing: border-box;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dog-avatar {
    width: 280px;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    background: #ddead1;
    margin-bottom: 15px;
}

.dog-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dog-avatar-fallback {
    font-size: inherit;
}

.dog-details {
    max-width: 420px;
    margin: 0 auto;
}
.checkbox-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.checkbox-filter input {
    width: auto;
    cursor: pointer;
}

.checkbox-filter label {
    font-weight: normal;
    cursor: pointer;
    font-size: 15px;
    color: #4b6043;
}

input[type="checkbox"] {
    accent-color: #4b6043;
}
a {
    color: #4b6043;
}

a:hover {
    color: #3a4c35;
}

@media (max-width: 1300px) {
    .ad-sidebar { display: none !important; }
    .mobile-ad-banner { display: block; }
}

@media (max-width: 600px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .grid-features { 
        grid-template-columns: 1fr;
    }
}

.mobile-break {
    display: none;
}

@media (max-width: 600px) {
    .mobile-break {
        display: block;
    }
}

/* Popup overlay */
.bonus-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Popup box */
.bonus-popup-box {
    background: #ddead1; /* your light green */
    padding: 25px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    border: 1px solid #b3cf99; /* your border green */
    color: #4b6043; /* your dark green text */
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Small note text */
.bonus-popup-note {
    font-size: 13px;
    color: #4b6043;
    margin-top: 10px;
}

/* Close button */
.bonus-popup-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background: #4b6043; /* your dark green */
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
/* Fade-in animation */
@keyframes bonusFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Apply animation to popup box */
.bonus-popup-box {
    animation: bonusFadeIn 0.4s ease-out;
}
