/*
 Theme Name:   Astra Child
 Description:  Современный стиль для садоводческого товарищества
 Template:     astra
 Version:      1.0.0
 Text Domain:  astra-child
 Author:       Custom
 Author URI:   #
 License:      GNU General Public License v2 or later
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Open+Sans:wght@400;500;600&display=swap');

:root {
    --primary-color: #5d4e37;
    --accent-color: #38a169;
    --accent-hover: #2f855a;
    --accent-light: #c6f6d5;
    --accent-gold: #d69e2e;
    --accent-green: #38a169;
    --accent-red: #e53e3e;
    --bg-color: #f5f0e6;
    --bg-gradient: linear-gradient(135deg, #f5f0e6 0%, #e8dfc7 100%);
    --card-bg: #fdfbf7;
    --text-color: #3d3525;
    --text-light: #6b5f4f;
    --border-color: #d4c4a8;
    --shadow: 0 4px 15px rgba(93, 78, 55, 0.1);
    --shadow-hover: 0 8px 25px rgba(93, 78, 55, 0.15);
    --radius: 12px;
    --radius-sm: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-color);
    background: var(--bg-gradient);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 17px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-bottom: none;
    padding: 0.25rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.05) 50%, transparent 100%);
    pointer-events: none;
}

.site-branding {
    padding: 0.35rem 0;
}

.site-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.site-description {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
}

.main-header-menu li a {
    display: block;
    padding: 0.4rem 0.7rem;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.main-header-menu li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.main-header-menu li a:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.main-header-menu li a:hover::before {
    left: 100%;
}

.main-header-menu li.current-menu-item > a {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}

/* Container */
.ast-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.entry-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Cards */
.ast-article-single,
.news-item,
.news-card,
.documents-wrapper .news-card,
.my-charges-wrapper,
.documents-wrapper > div {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin: 1.5rem 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ast-article-single::before,
.news-item::before,
.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-gold));
}

.ast-article-single:hover,
.news-item:hover,
.news-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

/* Buttons - same as menu */
button, .ast-button, .elementor-button, .wp-block-button__link,
input[type="button"], input[type="reset"], input[type="submit"],
.button {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-color);
    background: rgba(255,255,255,0.9);
    border: 2px solid var(--accent-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button:hover, .ast-button:hover, .elementor-button:hover,
input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover,
.button:hover {
    background: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 161, 105, 0.3);
}

button::after,
.ast-button::after,
.button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

button:hover,
.ast-button:hover,
.elementor-button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.button:hover {
    background: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 161, 105, 0.3);
}

button:active,
.ast-button:active {
    transform: translateY(0);
}

button:focus,
.ast-button:focus {
    outline: 3px solid var(--accent-light);
    outline-offset: 2px;
}

/* Form inputs */
input, textarea, select {
    font-size: 16px;
    padding: 0.7rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    width: 100%;
    max-width: 500px;
    transition: all 0.3s ease;
    background: var(--bg-color);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15);
    outline: none;
    background: var(--card-bg);
}

label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Footer */
.ast-footer-footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-hover) 100%);
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 4px solid var(--accent-gold);
}

.site-footer {
    text-align: center;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

/* News */
.news-date {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 12px;
}

.news-header {
    border-bottom: 2px solid var(--accent-light);
    padding-bottom: 12px;
    margin-bottom: 15px;
}

/* Documents */
.documents-wrapper > div {
    border-left: 4px solid var(--accent-gold);
}

.documents-wrapper > div::before {
    display: none;
}

/* Stats boxes */
.my-charges-wrapper > div:first-child,
.documents-wrapper > div:first-child {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-color) 100%);
    border: 2px solid var(--accent-color);
    border-left: 4px solid var(--accent-gold);
}

.my-charges-wrapper > div:first-child::before,
.documents-wrapper > div:first-child::before {
    display: none;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

table thead tr {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    color: #fff;
}

table th {
    padding: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-align: left;
}

table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

table tbody tr:hover {
    background: var(--bg-color);
}

/* Mobile */
@media (max-width: 768px) {
    * {
        max-width: 100% !important;
        box-sizing: border-box;
    }
    html, body {
        overflow-x: hidden;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    body { font-size: 15px; }
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    .site-title { font-size: 1rem; }
    .main-header-menu li a { font-size: 12px; padding: 0.3rem 0.5rem; }
    .ast-article-single { padding: 1rem; margin: 1rem 0; }
    button, .ast-button { padding: 0.6rem 1rem; font-size: 14px; }
    .news-grid, .latest-news .news-grid {
        grid-template-columns: 1fr !important;
    }
    .news-card {
        padding: 1rem !important;
    }
    .news-card h3 {
        font-size: 1rem !important;
    }
    .news-card p {
        font-size: 13px !important;
    }
    
    /* Documents wrapper */
    .documents-wrapper {
        padding: 10px !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        overflow-x: hidden;
    }
    .documents-wrapper h2 {
        font-size: 1.4rem !important;
    }
    .documents-wrapper form {
        display: flex !important;
        flex-direction: column !important;
        padding: 12px 10px !important;
        gap: 10px !important;
    }
    .documents-wrapper form > div {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }
    .doc-filters {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .doc-filters > div {
        width: 100% !important;
        min-width: 100% !important;
        flex: none !important;
    }
    .doc-buttons-wrap {
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
    }
    .doc-buttons-wrap a,
    .doc-buttons-wrap button {
        width: 100% !important;
    }
    
    /* Doc list mobile */
    .doc-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }
    .doc-item {
        display: flex !important;
        flex-direction: column !important;
        padding: 12px !important;
        gap: 10px !important;
        width: 100% !important;
    }
    .doc-item > div {
        width: 100% !important;
    }
    .doc-item h3 {
        font-size: 1rem !important;
    }
    .doc-item p {
        font-size: 12px !important;
    }
.doc-item .button {
        width: 100% !important;
        text-align: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-item,
.my-charges-wrapper > div,
.documents-wrapper > div {
    animation: fadeInUp 0.5s ease forwards;
}

.news-item:nth-child(1) { animation-delay: 0.1s; }
.news-item:nth-child(2) { animation-delay: 0.2s; }
.news-item:nth-child(3) { animation-delay: 0.3s; }
.news-item:nth-child(4) { animation-delay: 0.4s; }
.news-item:nth-child(5) { animation-delay: 0.5s; }

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* Selection */
::selection {
    background: var(--accent-color);
    color: #fff;
}