/* CSS Custom Properties */
:root {
    --primary-color: #3498db; /* Batafsil, impersonate-btn */
    --primary-hover: #2980b9;
    --danger-color: #e74c3c; /* Delete-btn */
    --danger-hover: #c0392b;
    --success-color: #2ecc71; /* Rent-btn, add-renter-btn */
    --success-hover: #27ae60;
    --text-color: #333;
    --muted-color: #7f8c8d;
    --dark-bg: rgba(44, 62, 80, 0.95);
    --light-bg: rgba(255, 255, 255, 0.9);
    --my-item-bg: rgba(220, 252, 231, 0.9); /* O‘ziga tegishli buyumlar uchun fon */
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: #f4f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background Slider */
.background-slider {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    animation: fade 15s infinite;
}

.slide1 {
    background-image: url('https://ijara-onlayn.uz/images/image1.jpg');
    animation-delay: 0s;
}

.slide2 {
    background-image: url('https://ijara-onlayn.uz/images/image2.jpg');
    animation-delay: 5s;
}

.slide3 {
    background-image: url('https://ijara-onlayn.uz/images/image3.jpg');
    animation-delay: 10s;
}

@keyframes fade {
    0% { opacity: 0; }
    6.67% { opacity: 1; }
    33.33% { opacity: 1; }
    40% { opacity: 0; }
    100% { opacity: 0; }
}

/* Navbar */
.navbar {
    background-color: var(--dark-bg);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    border-radius: 40px;
    width: 50px;
    margin-right: 10px;
}

.logo span {
    color: #fff;
    font-size: 1.8em;
    font-weight: 700;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links li a {
    color: #fff;
    font-size: 1.1em;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-links li a:hover {
    background-color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1 0 auto;
    padding: 20px 0;
    position: relative;
    z-index: 1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Item-specific styling */
.item-details {
    background-color: rgba(44, 62, 80, 0.7);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: #fff;
}

/* Headings */
h1 {
    font-size: 2.5em;
}

/* Item List */
.items,
.renter-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.item,
.renter-card {
    background-color: var(--light-bg);
    border-radius: 10px;
    padding: 10px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s, box-shadow 0.3s;
}

.item.my-item {
    background-color: var(--my-item-bg);
}

.item:hover,
.renter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.item-info h3 {
    color: #2c3e50;
}

.item h2 {
    color: var(--muted-color);
}

.item p {
    font-size: 1em;
    color: var(--muted-color);
}

/* Item actions konteyneri */
.item-actions,
.renter-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

/* Umumiy tugma uslubi */
.btn {
    display: inline-block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    min-width: 120px;
    line-height: 1.2;
    background-color: var(--primary-color);
}

.btn.delete-btn {
    width: 40px;
    height: 40px;
    padding: 10px;
    min-width: auto;
}

.btn:hover {
    background-color: var(--primary-hover);
}

/* Tugma turlari */
.batafsil,
.impersonate-btn {
    background-color: var(--primary-color);
}

.batafsil:hover,
.impersonate-btn:hover {
    background-color: var(--primary-hover);
}

.delete-btn {
    background-color: var(--danger-color);
}

.delete-btn:hover {
    background-color: var(--danger-hover);
}

.rent-btn,
.add-renter-btn {
    background-color: var(--success-color);
}

.rent-btn:hover,
.add-renter-btn:hover {
    background-color: var(--success-hover);
}

/* Delete form uslubi */
.delete-form,
form[action="admin.php"] {
    display: inline;
    background: transparent;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

/* Renter List (Admin Panel) */
.item-info, .renter-info {
    margin-bottom: 10px;
    display: block;
}

.info-row, .item-row {
    display: block;
    margin-bottom: 5px;
    line-height: 1.4;
}

.item-info strong, .renter-info strong {
    color: #2c3e50;
    font-weight: 700;
    display: inline;
    margin-right: 5px;
}

.item-info span, .renter-info span,
.renter-info a {
    color: var(--muted-color);
    display: inline;
    word-wrap: break-word;
}

.item-row a {
    text-decoration: none;
}
/* Slayder uslublari */
.item-slider {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    margin-bottom: 15px;
}

.slider-container {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slider-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

/* Slayder tugmalari */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 1.2em;
    z-index: 10;
    transition: background-color 0.3s;
}

.slider-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;
}

/* Forms */
form {
    max-width: 400px;
    margin: 30px auto;
    padding: 20px;
    color: var(--muted-color);
    background-color: var(--light-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

form input,
form textarea,
form select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    color: var(--muted-color);
    background-color: rgba(255, 255, 255, 0.95);
    outline: none;
    transition: border-color 0.3s;
}

form input:focus,
form textarea:focus,
form select:focus {
    border-color: var(--primary-color);
}

form textarea {
    height: 100px;
    resize: vertical;
}

form button {
    width: 100%;
    padding: 12px;
    background-color: var(--success-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

form button:hover {
    background-color: var(--success-hover);
}

/* Category Tabs */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.category-tabs .btn {
    background-color: #ecf0f1;
    color: #2c3e50;
    padding: 8px 15px;
    font-weight: normal;
}

.category-tabs .btn:hover {
    background-color: #bdc3c7;
}

.category-tabs .btn.active {
    background-color: var(--primary-color);
    color: #fff;
}

/* Owner Contact */
.owner-contact {
    margin-top: 10px;
    padding-top: 10px;
    margin-bottom: 10px;
    display: block;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/*.owner-contact h3 {
    font-size: 1.2em;
    color: #2c3e50;
    margin-bottom: 10px;
}*/

.owner-row {
    display: block;
    margin-bottom: 5px;
    line-height: 1.4;
}

.owner-row strong {
    color: #2c3e50;
    font-weight: 700;
    display: inline;
    margin-right: 5px;
}

.owner-row span,
.owner-row a {
    color: var(--muted-color);
    display: inline;
    word-wrap: break-word;
}

.owner-row a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.owner-row a:hover {
    color: var(--primary-hover);
}

/*.owner-contact {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.owner-contact h3 {
    font-size: 1.2em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.owner-contact p {
    font-size: 1em;
    color: var(--muted-color);
    margin: 2px 0;
}

.owner-contact a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.owner-contact a:hover {
    color: var(--primary-hover);
}
*/
/* Pay-details */
.pay-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.pay-details h1 {
    color: var(--primary-color);
}

.pay-details img {
    max-width: 100%;
    max-height: 100%;
    object-fit: fill;
}

.pay-details h3 {
    font-size: 1.2em;
    color: var(--muted-color);
    margin-bottom: 10px;
}

.pay-details p {
    font-size: 1.5em;
    color: #2c3e50;
    margin: 2px 0;
}

/* Footer */
.footer {
    background-color: var(--dark-bg);
    color: #fff;
    padding: 40px 0 20px;
    flex-shrink: 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h3 {
    font-size: 1.2em;
    color: #fff;
    margin-bottom: 15px;
}

.footer-section p {
    font-size: 1em;
    color: #ddd;
    line-height: 1.8;
}

.footer-section a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-hover);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 1.2em;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.3s;
}

.social-icon:hover {
    background-color: var(--primary-hover);
    transform: scale(1.1);
}

.social-icon.facebook {
    background-color: #3b5998;
}

.social-icon.facebook:hover {
    background-color: #2d4373;
}

.social-icon.instagram {
    background-color: #e1306c;
}

.social-icon.instagram:hover {
    background-color: #b9255b;
}

.social-icon.telegram {
    background-color: #0088cc;
}

.social-icon.telegram:hover {
    background-color: #006699;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
}

.footer-bottom p {
    font-size: 1em;
    color: #ddd;
}

/* Media so‘rovlar */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        flex-direction: column;
        text-align: center;
    }

    h1 {
        font-size: 2em;
    }

    .items,
    .renter-list {
        grid-template-columns: 1fr;
    }

    .item-image {
        height: 150px;
    }

    .item-actions,
    .renter-actions {
        justify-content: center;
        gap: 10px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.95em;
        min-width: 120px;
    }

    .btn.delete-btn {
        width: 40px;
        height: 40px;
        padding: 10px;
        min-width: auto;
    }

    /*.renter-card {
        padding: 15px;
    }*/

    .item-info, .renter-info {
        display: block;
    }

    /*.info-row {
        display: block;
        margin-bottom: 5px;
    }*/

    .item-info, .renter-info strong {
        margin-right: 5px;
    }

    form {
        margin: 20px auto;
        padding: 15px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-section {
        margin-bottom: 20px;
    }

    .social-links {
        justify-content: center;
    }

    .main-content {
        padding: 15px 0;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 10px 15px;
        font-size: 1em;
        min-width: 100px;
    }

    .btn.delete-btn {
        width: 36px;
        height: 36px;
        padding: 8px;
    }

    /*.renter-card {
        padding: 10px;
    }*/

    /*.info-row {
        margin-bottom: 5px;
    }*/

    .owner-contact h3 {
        font-size: 1.1em;
    }

    .owner-contact p {
        font-size: 0.85em;
    }
}