/* Portfolios Page Specific Styles */

/* Active navigation link */
nav ul li a.active {
    color: #4361ee;
    font-weight: 600;
}

/* Portfolio Hero Section */
.portfolio-hero {
    background: linear-gradient(140deg, #70a3e8 0%, #970ca3 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.portfolio-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.portfolio-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Filter Section */
.filters {
    background-color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 70px;
    z-index: 90;
}

.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.search-box {
    display: flex;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.search-box button {
    padding: 12px 15px;
    background-color: #4361ee;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.filter-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
}

.filter-group select {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 5px;
    background-color: white;
    min-width: 150px;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    background-color: #f1f5f9;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.9rem;
}

.filter-tag .remove-filter {
    margin-left: 8px;
    font-size: 1rem;
    cursor: pointer;
    color: #64748b;
}

.filter-tag .remove-filter:hover {
    color: #e11d48;
}

/* Templates Display Section */
.templates-display {
    padding: 50px 0;
    background-color: #f8f9fa;
    min-height: 500px;
}

.templates-count {
    margin-bottom: 30px;
    color: #64748b;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.template-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.template-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.template-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.template-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.template-card:hover .template-img img {
    transform: scale(1.05);
}

.template-img .template-price {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #4361ee;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.template-content {
    padding: 20px;
}

.template-content h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.template-meta {
    display: flex;
    justify-content: space-between;
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 15px;
}

.template-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.template-buttons a {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 0.95rem;
}

.no-results {
    text-align: center;
    padding: 60px 0;
    color: #64748b;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.6;
}

.no-results h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

/* Newsletter Section */
.newsletter {
    background-color: #eef2ff;
    padding: 70px 0;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h2 {
    margin-bottom: 15px;
    font-size: 2rem;
}

.newsletter-content p {
    margin-bottom: 30px;
    color: #4b5563;
}

.newsletter-content form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-content input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.newsletter-content button {
    border-radius: 0 5px 5px 0;
}

.newsletter .disclaimer {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #64748b;
}

/* Template Modal */
.template-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    width: 90%;
    max-width: 1000px;
    border-radius: 10px;
    overflow: hidden;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-30px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-modal {
    color: #64748b;
    float: right;
    font-size: 28px;
    font-weight: bold;
    margin: 15px 20px 0 0;
    cursor: pointer;
}

.close-modal:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
}

.template-preview {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.preview-image {
    flex: 1;
    max-width: 60%;
    border-radius: 8px;
    overflow: hidden;
}

.preview-image img {
    width: 100%;
    height: auto;
    display: block;
}

.preview-details {
    flex: 1;
    max-width: 40%;
}

.preview-details h2 {
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.preview-details .description {
    margin-bottom: 20px;
    color: #4b5563;
}

.template-info {
    margin-bottom: 25px;
}

.info-item {
    display: flex;
    margin-bottom: 10px;
}

.info-label {
    min-width: 120px;
    font-weight: 600;
    color: #1e293b;
}

.info-value {
    color: #4b5563;
}

.modal-actions {
    display: flex;
    gap: 15px;
}

.modal-actions .btn {
    flex: 1;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .template-preview {
        flex-direction: column;
    }
    
    .preview-image, .preview-details {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .filter-options {
        width: 100%;
    }
    
    .filter-group {
        flex: 1;
    }
}

/* Enhanced Mobile Responsiveness */

@media (max-width: 991px) {
    .portfolio-hero {
        padding: 40px 0;
    }
    
    .portfolio-hero h1 {
        font-size: 2.5rem;
    }
    
    .filter-group select {
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    /* Reorganize filter section */
    .filters {
        position: relative;
        top: 0;
        padding: 15px 0;
    }

    .filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .filter-options {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
    
    .filter-group {
        flex: 1;
    }
    
    .filter-group label {
        font-size: 0.9rem;
    }
    
    /* Template cards */
    .template-card {
        margin-bottom: 20px;
    }
    
    .template-img {
        height: 180px;
    }
    
    .template-content h3 {
        font-size: 1.1rem;
    }
    
    .template-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    /* Newsletter section */
    .newsletter-content form {
        flex-direction: column;
        gap: 10px;
    }
    
    .newsletter-content input, 
    .newsletter-content button {
        width: 100%;
        border-radius: 5px;
    }
}

@media (max-width: 576px) {
    .portfolio-hero h1 {
        font-size: 2rem;
    }
    
    .portfolio-hero p {
        font-size: 1rem;
    }
    
    .filter-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .templates-count {
        text-align: center;
    }
    
    /* Modal adjustments */
    .template-preview {
        flex-direction: column;
    }
    
    .preview-image, 
    .preview-details {
        max-width: 100%;
    }
    
    .modal-content {
        margin: 20px auto;
        width: 95%;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
}
