/* Report Detail Page Styles - With Header Integration */
/* เพิ่ม namespace และ specificity เพื่อป้องกันความขัดแย้งกับ style.css */
/* ปรับปรุงให้เข้ากับ header/menu ของเว็บไซต์หลัก */

/* Reset เฉพาะสำหรับ report detail page */
.report-detail-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.report-detail-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    /* เพิ่ม padding-top เพื่อให้เนื้อหาไม่ทับกับ fixed header */
    padding-top: 100px;
}

.report-detail-page .main-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 80% 20%;
    gap: 30px;
    min-height: calc(100vh - 120px); /* ปรับให้เหมาะกับ header */
}

.report-detail-page .report-detail-section {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.report-detail-page .report-detail-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.report-detail-page .sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.report-detail-page .sidebar-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.report-detail-page .sidebar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.report-detail-page .report-header {
    margin-bottom: 40px;
}

.report-detail-page .report-title {
    color: #333;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.report-detail-page .report-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.report-detail-page .report-type {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    color: #667eea;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid #e1e8ed;
}

.report-detail-page .report-date {
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

.report-detail-page .report-description {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border-left: 5px solid #667eea;
}

.report-detail-page .report-description h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.report-detail-page .report-description p {
    color: #555;
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.report-detail-page .tags-section {
    margin-bottom: 30px;
}

.report-detail-page .tags-section h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.report-detail-page .tags-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.report-detail-page .tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
}

.report-detail-page .action-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    border: 2px solid #e1e8ed;
}

.report-detail-page .price-display {
    margin-bottom: 25px;
}

.report-detail-page .price-label {
    color: #666;
    font-size: 1rem;
    margin-bottom: 10px;
}

.report-detail-page .price-amount {
    color: #28a745;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.report-detail-page .price-currency {
    color: #666;
    font-size: 1.1rem;
    font-weight: 500;
}

.report-detail-page .action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.report-detail-page .btn {
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    border: none;
    min-width: 140px;
}

.report-detail-page .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.report-detail-page .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.report-detail-page .btn-secondary {
    background: #6c757d;
    color: white;
}

.report-detail-page .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.3);
}

.report-detail-page .features-section {
    margin-top: 30px;
}

.report-detail-page .features-section h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.report-detail-page .features-list {
    list-style: none;
    padding: 0;
}

.report-detail-page .feature-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.report-detail-page .feature-item:last-child {
    border-bottom: none;
}

.report-detail-page .feature-icon {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
    position: relative;
}

.report-detail-page .feature-icon::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.report-detail-page .feature-text {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Sidebar Styles */
.report-detail-page .sidebar h3 {
    color: #333;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.report-detail-page .category-list {
    list-style: none;
    padding: 0;
}

.report-detail-page .category-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    cursor: pointer;
}

.report-detail-page .category-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.report-detail-page .category-item h4 {
    color: #333;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.report-detail-page .category-item p {
    color: #666;
    font-size: 0.8rem;
    line-height: 1.4;
}

.report-detail-page .price-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 5px;
}

.report-detail-page .order-steps {
    list-style: none;
    padding: 0;
}

.report-detail-page .order-step {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.report-detail-page .order-step:last-child {
    border-bottom: none;
}

.report-detail-page .step-number {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.report-detail-page .step-text {
    color: #333;
    font-size: 0.9rem;
    line-height: 1.4;
}

.report-detail-page .contact-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.report-detail-page .contact-info h4 {
    margin-bottom: 15px;
    font-size: 1rem;
}

.report-detail-page .contact-info p {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.report-detail-page .contact-info a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.report-detail-page .contact-info a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .report-detail-page .main-container {
        grid-template-columns: 75% 25%;
    }
}

@media (max-width: 768px) {
    .report-detail-page {
        padding-top: 120px; /* เพิ่ม padding สำหรับ mobile menu */
    }
    
    .report-detail-page .main-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .report-detail-page .report-detail-section {
        padding: 30px 20px;
    }

    .report-detail-page .report-title {
        font-size: 2rem;
    }

    .report-detail-page .sidebar {
        order: -1;
    }

    .report-detail-page .sidebar-card {
        padding: 20px;
    }

    .report-detail-page .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .report-detail-page .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Override styles that might conflict with main site header */
.report-detail-page .header {
    /* ให้ header ของเว็บไซต์หลักมี priority สูงสุด */
    z-index: 1001 !important;
}

/* ป้องกันการทับซ้อนของ styles กับ main site */
.report-detail-page .nav-link {
    /* ไม่ให้ styles ของ report detail page ไปกระทบ navigation */
    color: inherit !important;
    text-decoration: inherit !important;
}

/* เพิ่ม smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* ปรับปรุง focus states สำหรับ accessibility */
.report-detail-page .btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* เพิ่ม animation สำหรับ loading states */
.report-detail-page .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ปรับปรุง hover effects สำหรับ touch devices */
@media (hover: none) {
    .report-detail-page .btn:hover {
        transform: none;
    }
    
    .report-detail-page .category-item:hover {
        transform: none;
    }
}
