/* AECS4U Components CSS */

/* Card Components */
.card-modern {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-modern .card-header {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
    border: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-modern .card-body {
    padding: 1.5rem;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-bottom: 1rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

.stat-card .stat-label {
    color: var(--secondary-color);
    font-weight: 500;
    margin: 0;
}

.stat-card .stat-change {
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.stat-card .stat-change.positive {
    color: var(--success-color);
}

.stat-card .stat-change.negative {
    color: var(--danger-color);
}

/* Property Cards */
.property-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.property-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.property-card .property-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.property-card .property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card:hover .property-image img {
    transform: scale(1.05);
}

.property-card .property-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.property-card .property-price {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
}

.property-card .property-content {
    padding: 1.25rem;
}

.property-card .property-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.property-card .property-location {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.property-card .property-location i {
    margin-right: 0.5rem;
}

.property-card .property-features {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.property-card .property-feature {
    display: flex;
    align-items: center;
    color: var(--secondary-color);
    font-size: 0.85rem;
}

.property-card .property-feature i {
    margin-right: 0.25rem;
}

/* Buttons */
.btn-modern {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-modern: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;
}

.btn-modern:hover:before {
    left: 100%;
}

.btn-gradient {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #1d4ed8, var(--primary-color));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Forms */
.form-modern .form-control {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-modern .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-modern .form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-floating-modern {
    position: relative;
}

.form-floating-modern .form-control {
    height: 58px;
    padding: 1rem 1rem 0.25rem;
}

.form-floating-modern .form-control:focus ~ .form-label,
.form-floating-modern .form-control:not(:placeholder-shown) ~ .form-label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-floating-modern .form-label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1rem;
    margin: 0;
    overflow: hidden;
    text-align: start;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
}

/* Navigation */
.nav-pills-modern .nav-link {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    color: var(--secondary-color);
    transition: all 0.3s ease;
    margin-right: 0.5rem;
}

.nav-pills-modern .nav-link:hover {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.nav-pills-modern .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
}

/* Tables */
.table-modern {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.table-modern thead th {
    background: var(--light-color);
    border: none;
    font-weight: 600;
    color: var(--dark-color);
    padding: 1rem;
}

.table-modern tbody td {
    border: none;
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.table-modern tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.02);
}

/* Alerts */
.alert-modern {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    position: relative;
    overflow: hidden;
}

.alert-modern:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
}

.alert-modern .alert-icon {
    font-size: 1.25rem;
    margin-right: 0.75rem;
}

/* Progress */
.progress-modern {
    height: 8px;
    border-radius: 4px;
    background-color: #f1f5f9;
    overflow: hidden;
}

.progress-modern .progress-bar {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Badges */
.badge-modern {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive utilities */
@media (max-width: 768px) {
    .property-card .property-image {
        height: 180px;
    }

    .stat-card {
        padding: 1rem;
        text-align: center;
    }

    .stat-card .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin: 0 auto 1rem;
    }

    .btn-modern {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .property-card .property-features {
        flex-direction: column;
        gap: 0.5rem;
    }

    .card-modern .card-body {
        padding: 1rem;
    }

    .form-modern .form-control {
        padding: 0.625rem 0.875rem;
    }
}