/* ============================================
   Technical PTS - Main Stylesheet
   Updated Version with Full Image Display
   ============================================ */

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 20px rgba(0,0,0,0.05);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.12);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f8fafc;
    color: #1e293b;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   TOP HEADER
   ============================================ */
.top-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
}

.top-header .social-links a {
    color: #fff;
    margin-left: 12px;
    font-size: 14px;
    opacity: 0.85;
    transition: opacity 0.3s;
}

.top-header .social-links a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    background: #fff !important;
}

.navbar-brand .logo-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar .nav-link {
    color: #475569 !important;
    font-weight: 500;
    padding: 8px 16px !important;
    transition: color 0.3s;
    font-size: 15px;
}

.navbar .nav-link:hover {
    color: var(--primary) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 8px 0;
    margin-top: 8px !important;
}

.dropdown-item {
    padding: 10px 18px;
    font-size: 14px;
    color: #475569;
    transition: all 0.3s;
}

.dropdown-item:hover {
    background: rgba(102,126,234,0.1);
    color: var(--primary);
    padding-left: 22px;
}

.search-form {
    min-width: 280px;
}

.search-form .form-control {
    border-radius: 30px 0 0 30px;
    border-color: var(--border);
    padding: 8px 18px;
    font-size: 14px;
}

.search-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.search-form .btn {
    border-radius: 0 30px 30px 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    padding: 8px 20px;
}

.search-form .btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
}

.hero-search .form-control {
    height: 55px;
    border-radius: 50px 0 0 50px;
    border: none;
    padding: 0 25px;
    font-size: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero-search .form-control:focus {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.hero-search .btn {
    height: 55px;
    border-radius: 0 50px 50px 0;
    background: var(--dark);
    border: none;
    padding: 0 30px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero-search .btn:hover {
    background: #0f172a;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat h3 {
    font-size: 36px;
    font-weight: 700;
    margin: 0;
}

.hero-stat p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* ============================================
   SECTION TITLE
   ============================================ */
.section-title {
    margin-bottom: 40px;
    text-align: center;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.section-title p {
    color: var(--gray);
    font-size: 16px;
    margin: 0;
}

.section-title .title-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    margin: 15px auto;
    border-radius: 3px;
}

/* ============================================
   CATEGORIES SECTION
   ============================================ */
.categories-section {
    padding: 70px 0;
    background: #fff;
}

.category-card {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s;
    height: 100%;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(102,126,234,0.15);
    color: inherit;
}

.category-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 15px;
    box-shadow: 0 8px 20px rgba(102,126,234,0.3);
}

.category-card h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark);
}

.category-card .file-count {
    font-size: 13px;
    color: var(--gray);
}

/* ============================================
   FILE CARDS - FULL IMAGE DISPLAY
   ============================================ */
.files-section {
    padding: 70px 0;
}

.file-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #f1f5f9;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

/* IMAGE CONTAINER - Square box with full image */
.file-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1/1;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.file-card-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.4s ease;
    border-radius: 8px;
    display: block;
}

.file-card:hover .file-card-image img {
    transform: scale(1.08);
}

/* File Type Badge */
.file-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Featured Star */
.file-featured {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    z-index: 2;
}

/* Card Body */
.file-card-body {
    padding: 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.file-category {
    font-size: 11px;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.file-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.file-title a {
    color: inherit;
    transition: color 0.3s;
}

.file-title a:hover {
    color: var(--primary);
}

.file-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
    font-size: 13px;
    color: var(--gray);
}

.file-meta .download-count {
    color: var(--success);
    font-weight: 600;
}

.file-meta .view-count {
    color: var(--gray);
}

.file-meta i {
    margin-right: 4px;
}

/* ============================================
   AD SLOTS
   ============================================ */
.ad-container {
    margin: 30px 0;
    text-align: center;
    background: #f8fafc;
    padding: 15px;
    border-radius: 10px;
    min-height: 100px;
    border: 1px dashed #cbd5e1;
}

.ad-label {
    display: block;
    font-size: 11px;
    color: var(--gray);
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

/* ============================================
   CTA / NEWSLETTER
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 70px 0;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-section > .container {
    position: relative;
    z-index: 2;
}

.cta-section h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
}

.cta-section p {
    font-size: 16px;
    opacity: 0.95;
    margin-bottom: 25px;
}

.cta-section .btn {
    background: #fff;
    color: var(--primary);
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 600;
    border: none;
    font-size: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: all 0.3s;
}

.cta-section .btn:hover {
    background: var(--dark);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--dark);
    color: #cbd5e1;
    padding: 60px 0 30px;
    margin-top: 50px;
}

.footer-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-text {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
    color: #94a3b8;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #cbd5e1;
    font-size: 14px;
    transition: all 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.social-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 50%;
    margin-right: 8px;
    transition: all 0.3s;
    font-size: 14px;
}

.social-footer a:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

.footer-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 30px 0 20px;
}

.copyright {
    font-size: 14px;
    color: #94a3b8;
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(102,126,234,0.4);
    z-index: 999;
    transition: all 0.3s;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102,126,234,0.5);
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumb-section {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--primary);
    font-size: 14px;
}

.breadcrumb-item.active {
    color: var(--gray);
    font-size: 14px;
}

/* ============================================
   CATEGORY/SEARCH PAGE STYLES
   ============================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    padding: 50px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 16px;
    opacity: 0.95;
    margin: 0;
}

/* Pagination */
.pagination {
    justify-content: center;
    margin-top: 40px;
}

.pagination .page-link {
    color: var(--primary);
    border-color: var(--border);
    padding: 8px 16px;
    margin: 0 3px;
    border-radius: 8px;
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: var(--primary);
    color: #fff;
}

.pagination .page-link:hover {
    background: rgba(102,126,234,0.1);
    color: var(--primary);
}

/* ============================================
   SINGLE FILE PAGE
   ============================================ */
.single-file-container {
    padding: 40px 0;
}

.file-main-image {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    padding: 20px;
    text-align: center;
}

.file-main-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.file-info-box {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.file-info-box h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 15px;
}

.file-details-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.file-details-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.file-details-list li:last-child {
    border-bottom: none;
}

.file-details-list strong {
    color: var(--dark);
}

.download-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--success), #059669);
    color: #fff;
    text-align: center;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    margin: 10px 0;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    color: #fff;
}

.download-btn-secondary {
    background: linear-gradient(135deg, var(--info), #0891b2);
}

.download-btn-secondary:hover {
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.4);
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.share-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s;
}

.share-btn:hover {
    transform: translateY(-3px);
    color: #fff;
}

.share-facebook { background: #1877f2; }
.share-twitter { background: #1da1f2; }
.share-whatsapp { background: #25d366; }
.share-telegram { background: #0088cc; }
.share-pinterest { background: #e60023; }

/* Tags */
.file-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.file-tag {
    background: rgba(102,126,234,0.1);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s;
}

.file-tag:hover {
    background: var(--primary);
    color: #fff;
}

/* ============================================
   ALERTS / MESSAGES
   ============================================ */
.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 991px) {
    .navbar-collapse {
        padding: 20px 0;
    }
    
    .search-form {
        margin-top: 15px;
        min-width: 100%;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .hero-stat h3 {
        font-size: 28px;
    }
    
    .section-title h2 {
        font-size: 26px;
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    .hero-section {
        padding: 50px 0 40px;
    }
    
    .hero-content h1 {
        font-size: 24px;
    }
    
    .hero-content p {
        font-size: 14px;
    }
    
    .section-title h2 {
        font-size: 22px;
    }
    
    .categories-section,
    .files-section {
        padding: 50px 0;
    }
    
    .cta-section h2 {
        font-size: 24px;
    }
    
    .hero-search .form-control,
    .hero-search .btn {
        height: 48px;
        font-size: 14px;
    }
    
    .hero-search .btn {
        padding: 0 20px;
    }
    
    .file-card-body {
        padding: 14px;
    }
    
    .file-title {
        font-size: 14px;
        min-height: 38px;
    }
    
    .category-icon {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    .category-card {
        padding: 20px 15px;
    }
    
    .category-card h5 {
        font-size: 14px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE
   ============================================ */
@media (max-width: 576px) {
    .file-title {
        font-size: 13px;
    }
    
    .file-meta {
        font-size: 12px;
    }
    
    .file-category {
        font-size: 10px;
    }
    
    .file-badge {
        font-size: 10px;
        padding: 4px 10px;
    }
    
    .file-featured {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .footer-title {
        font-size: 16px;
        margin-top: 20px;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.file-card,
.category-card {
    animation: fadeIn 0.5s ease forwards;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
    color: #fff;
}