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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* HEADER */
header {
    background: #1a1a2e;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    font-size: 1.8rem;
}

header h1 a {
    color: white;
    text-decoration: none;
}

header nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

header nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.3s;
}

header nav a:hover {
    background: rgba(255,255,255,0.1);
}

header nav a.admin-link {
    background: #007bff;
    color: white;
}

header nav a.admin-link:hover {
    background: #0056b3;
}

/* MAIN */
main {
    flex: 1;
    padding: 30px 0;
}

/* SEARCH */
.search-box {
    margin: 30px 0;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 18px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.search-input::placeholder {
    color: #aaa;
}

/* SECTIONS */
.section {
    margin: 40px 0;
}

.section h2 {
    color: #1a1a2e;
    border-bottom: 3px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.regions-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

/* REGION ITEM */
.region-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
}

.region-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.region-header {
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
    position: relative;
    user-select: none;
}

.region-header:hover {
    background: #f0f7ff;
}

.region-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.region-name a {
    color: #007bff;
    text-decoration: none;
}

.region-name a:hover {
    text-decoration: underline;
}

.toggle-icon {
    margin-left: 15px;
    font-size: 1.2rem;
    transition: transform 0.3s;
    color: #666;
}

.toggle-icon.active {
    transform: rotate(180deg);
}

.tooltip {
    position: absolute;
    right: 50px;
    background: #333;
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.region-header:hover .tooltip {
    opacity: 1;
}

/* CITIES LIST */
.cities-list {
    padding: 0 20px 20px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.cities-list.open {
    display: block;
}

.city-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: padding-left 0.3s;
}

.city-item:last-child {
    border-bottom: none;
}

.city-item a {
    color: #555;
    text-decoration: none;
    display: block;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.city-item a:hover {
    color: #007bff;
    padding-left: 20px;
    background: #f8f9fa;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* CITY PAGE */
.city-page .hero-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
    background: #1a1a2e;
}

.city-hero {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.image-credit {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 12px;
}

.image-credit a {
    color: #4fc3f7;
    text-decoration: none;
}

.image-credit a:hover {
    text-decoration: underline;
}

.city-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.city-content h1 {
    color: #1a1a2e;
    margin-bottom: 20px;
}

.contact-info {
    margin: 20px 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-info strong {
    color: #555;
}

.contact-info a {
    color: #007bff;
    font-size: 1.3rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: #0056b3;
}

.directions-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    margin: 10px 0;
    transition: all 0.3s;
    font-weight: 600;
}

.directions-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(40,167,69,0.3);
}

.map-embed {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.map-embed iframe {
    width: 100%;
    height: 400px;
    border: 0;
}

/* REGION PAGE */
.region-page .cities-list {
    display: block !important;
    padding: 0;
}

.region-page .cities-list li {
    list-style: none;
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s;
}

.region-page .cities-list li:hover {
    background: #f8f9fa;
}

.region-page .cities-list a {
    color: #007bff;
    text-decoration: none;
    font-size: 1.1rem;
}

.region-page .cities-list a:hover {
    text-decoration: underline;
}

/* FOOTER */
footer {
    background: #1a1a2e;
    color: #aaa;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

footer h3, footer h4 {
    color: white;
    margin-bottom: 15px;
}

footer h3 {
    font-size: 1.3rem;
}

footer ul {
    list-style: none;
    padding: 0;
}

footer ul li {
    margin: 5px 0;
}

footer a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* COOKIE POPUP */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.95);
    color: white;
    padding: 20px;
    z-index: 9999;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookie-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cookie-content p {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.cookie-accept, .cookie-settings, .cookie-more {
    padding: 10px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.cookie-accept {
    background: #007bff;
    color: white;
}

.cookie-accept:hover {
    background: #0056b3;
}

.cookie-settings {
    background: #6c757d;
    color: white;
}

.cookie-settings:hover {
    background: #5a6268;
}

.cookie-more {
    color: #4fc3f7;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}

.cookie-more:hover {
    text-decoration: underline;
}

/* ADMIN PANEL STYLES */
.admin-container {
    padding: 20px 0;
}

.admin-container h1 {
    color: #1a1a2e;
    margin-bottom: 30px;
}

.admin-container h2 {
    color: #333;
    margin: 20px 0;
}

.admin-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.admin-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.admin-card:hover {
    transform: translateY(-5px);
}

.admin-card a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.admin-card .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.form-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 600;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

.btn {
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

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

.btn-success:hover {
    background: #218838;
}

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

.btn-danger:hover {
    background: #c82333;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 14px;
}

.admin-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-table thead {
    background: #1a1a2e;
    color: white;
}

.admin-table th, .admin-table td {
    padding: 12px 15px;
    text-align: left;
}

.admin-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.admin-table tbody tr:hover {
    background: #f8f9fa;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    header nav {
        justify-content: center;
    }
    
    header nav a {
        padding: 5px 10px;
        font-size: 14px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .search-input {
        font-size: 16px;
        padding: 12px 15px;
    }
    
    .city-hero {
        max-height: 200px;
    }
    
    .map-embed iframe {
        height: 200px;
    }
    
    .city-content {
        padding: 20px;
    }
    
    .contact-info {
        flex-direction: column;
        text-align: center;
    }
    
    footer .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .admin-panel {
        grid-template-columns: 1fr;
    }
    
    .admin-table {
        font-size: 14px;
    }
    
    .admin-table th, .admin-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .region-header {
        padding: 12px 15px;
    }
    
    .region-name {
        font-size: 1rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
        align-items: center;
    }
}