/* print.css - Print Styles */

@media print {
    /* Reset backgrounds and colors for print */
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Page setup */
    @page {
        margin: 2cm;
        size: A4;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        background: white;
    }
    
    .container {
        max-width: none;
        padding: 0;
        margin: 0;
    }
    
    /* Header adjustments */
    .header {
        background: white;
        border: 2px solid black;
        border-radius: 0;
        padding: 1.5rem;
        margin-bottom: 1rem;
        text-align: center;
        page-break-inside: avoid;
    }
    
    .header::before {
        display: none;
    }
    
    .profile-image {
        width: 80px;
        height: 80px;
        background: #666;
        color: white;
        font-size: 2rem;
        margin: 0 auto 1rem;
        page-break-inside: avoid;
    }
    
    .name {
        font-size: 24pt;
        font-weight: bold;
        color: black;
        margin-bottom: 0.5rem;
    }
    
    .arabic-name {
        font-size: 18pt;
        color: black;
        margin-bottom: 0.5rem;
    }
    
    .tagline {
        font-size: 14pt;
        color: black;
        font-style: italic;
        margin-bottom: 1rem;
    }
    
    /* Hide navigation for print */
    .nav {
        display: none !important;
    }
    
    /* Content sections */
    .content {
        background: white;
        border-radius: 0;
        padding: 0;
        margin: 0;
        box-shadow: none;
    }
    
    .section {
        display: block !important;
        page-break-before: auto;
        margin-bottom: 2rem;
    }
    
    .section:not(:first-child) {
        page-break-before: always;
    }
    
    .section h2 {
        font-size: 18pt;
        font-weight: bold;
        color: black;
        border-bottom: 2px solid black;
        padding-bottom: 0.3rem;
        margin-bottom: 1rem;
        page-break-after: avoid;
    }
    
    .section h3 {
        font-size: 14pt;
        font-weight: bold;
        color: black;
        margin: 1rem 0 0.5rem;
        page-break-after: avoid;
    }
    
    .section p {
        font-size: 11pt;
        line-height: 1.4;
        text-align: justify;
        margin-bottom: 0.8rem;
        orphans: 3;
        widows: 3;
    }
    
    /* Book grid adjustments */
    .book-grid {
        display: block;
        margin-top: 1rem;
    }
    
    .book-card {
        background: white;
        border: 1px solid black;
        border-radius: 0;
        padding: 1rem;
        margin-bottom: 1rem;
        page-break-inside: avoid;
    }
    
    .book-card h3 {
        font-size: 13pt;
        font-weight: bold;
        margin-bottom: 0.5rem;
    }
    
    /* Quote box styling */
    .quote-box {
        background: #f0f0f0;
        color: black;
        border: 2px solid black;
        border-radius: 0;
        padding: 1rem;
        font-style: italic;
        font-size: 12pt;
        text-align: center;
        margin: 1rem 0;
        page-break-inside: avoid;
    }
    
    .quote-box::before {
        color: black;
        opacity: 0.5;
        font-size: 3rem;
        left: 10px;
        top: -10px;
    }
    
    /* Timeline adjustments */
    .timeline {
        margin: 1rem 0;
    }
    
    .timeline::before {
        background: black;
        left: 1rem;
        width: 2px;
    }
    
    .timeline-item {
        padding-left: 3rem;
        margin-bottom: 1.5rem;
        page-break-inside: avoid;
    }
    
    .timeline-item::before {
        background: black;
        left: 0.5rem;
        width: 1rem;
        height: 1rem;
        box-shadow: 0 0 0 2px white, 0 0 0 4px black;
    }
    
    .year {
        font-weight: bold;
        color: black;
        font-size: 12pt;
    }
    
    .timeline-item h3 {
        font-size: 12pt;
        margin: 0.3rem 0;
    }
    
    /* Contact grid adjustments */
    .contact-grid {
        display: block;
        margin-top: 1rem;
    }
    
    .contact-item {
        background: white;
        border: 1px solid black;
        padding: 1rem;
        margin-bottom: 1rem;
        text-align: left;
        page-break-inside: avoid;
    }
    
    .contact-icon {
        display: inline-block;
        margin-right: 0.5rem;
        color: black;
    }
    
    .contact-item h3 {
        display: inline;
        font-size: 12pt;
        margin: 0;
    }
    
    /* Utility classes for print */
    .print-only {
        display: block !important;
    }
    
    .no-print {
        display: none !important;
    }
    
    .page-break-before {
        page-break-before: always;
    }
    
    .page-break-after {
        page-break-after: always;
    }
    
    .page-break-inside-avoid {
        page-break-inside: avoid;
    }
    
    /* Add print-specific content */
    .header::after {
        content: "Printed on " attr(data-print-date);
        display: block;
        font-size: 10pt;
        color: #666;
        margin-top: 1rem;
    }
    
    /* Ensure links are visible in print */
    a:link::after,
    a:visited::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
    
    /* Remove link styling */
    a {
        text-decoration: underline;
        color: black;
    }
}