/* Print-optimized CSS for Features Brochure */

@media print {
    /* Reset and base styles */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    body {
        font-size: 10pt;
        line-height: 1.4;
        color: #000;
        background: white;
    }
    
    /* Page setup */
    @page {
        size: A4;
        margin: 1.5cm;
    }
    
    /* Hide non-printable elements */
    .no-print,
    nav,
    footer,
    button,
    .sticky {
        display: none !important;
    }
    
    /* Headers and titles */
    h1 {
        font-size: 24pt;
        font-weight: bold;
        margin-bottom: 12pt;
        color: #1e40af;
    }
    
    h2 {
        font-size: 18pt;
        font-weight: bold;
        margin-top: 16pt;
        margin-bottom: 10pt;
        color: #1e40af;
    }
    
    h3 {
        font-size: 14pt;
        font-weight: bold;
        margin-top: 12pt;
        margin-bottom: 8pt;
        color: #374151;
    }
    
    /* Paragraphs */
    p {
        margin-bottom: 8pt;
        text-align: justify;
    }
    
    /* Tables */
    table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 16pt;
        page-break-inside: avoid;
    }
    
    thead {
        background-color: #1e40af !important;
        color: white !important;
    }
    
    th {
        padding: 8pt;
        text-align: left;
        font-weight: bold;
        border: 1px solid #d1d5db;
    }
    
    td {
        padding: 6pt 8pt;
        border: 1px solid #d1d5db;
    }
    
    tbody tr:nth-child(even) {
        background-color: #f9fafb !important;
    }
    
    /* Feature cards */
    .grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12pt;
        margin-bottom: 16pt;
    }
    
    .rounded-xl,
    .rounded-2xl {
        border: 1px solid #d1d5db;
        padding: 10pt;
        margin-bottom: 10pt;
        page-break-inside: avoid;
    }
    
    /* Lists */
    ul {
        margin-left: 16pt;
        margin-bottom: 10pt;
    }
    
    li {
        margin-bottom: 4pt;
        page-break-inside: avoid;
    }
    
    /* Icons and SVG */
    svg {
        width: 12pt;
        height: 12pt;
        vertical-align: middle;
    }
    
    .feature-check {
        color: #10b981 !important;
    }
    
    .feature-cross {
        color: #ef4444 !important;
    }
    
    /* Shadows and effects (remove for print) */
    .shadow,
    .shadow-sm,
    .shadow-md,
    .shadow-lg,
    .shadow-xl,
    .shadow-2xl {
        box-shadow: none !important;
    }
    
    /* Backgrounds - light colors for print readability */
    .bg-primary-600,
    .bg-primary-700,
    .bg-blue-600,
    .bg-purple-600 {
        background-color: white !important;
        color: #1e40af !important;
        border: 2pt solid #1e40af !important;
    }
    
    .bg-primary-50 {
        background-color: #eff6ff !important;
    }
    
    .bg-gray-50,
    .bg-gray-100 {
        background-color: #f9fafb !important;
    }
    
    /* Feature card backgrounds - keep light for readability */
    .rounded-xl.bg-white,
    .rounded-2xl.bg-white {
        background-color: white !important;
    }
    
    /* Text colors for print */
    .text-white {
        color: #1f2937 !important;
    }
    
    /* Keep only header backgrounds dark */
    thead,
    section:first-of-type,
    section:first-of-type * {
        color: white !important;
    }
    
    section:first-of-type .text-white {
        color: white !important;
    }
    
    /* Page breaks */
    .page-break {
        page-break-after: always;
    }
    
    /* Avoid breaking inside these elements */
    .avoid-break {
        page-break-inside: avoid;
    }
    
    /* Hero section - compact for print */
    section:first-of-type {
        background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%) !important;
        color: white !important;
        padding: 16pt 20pt !important;
        margin-bottom: 12pt !important;
        text-align: center;
        page-break-after: avoid !important;
    }
    
    section:first-of-type h1 {
        font-size: 20pt !important;
        margin-bottom: 8pt !important;
    }
    
    section:first-of-type p {
        font-size: 10pt !important;
        margin-bottom: 0 !important;
    }
    
    /* Branding */
    .print-logo {
        text-align: center;
        margin-bottom: 16pt;
    }
    
    .print-logo::before {
        content: "TrillED School Management System";
        font-size: 20pt;
        font-weight: bold;
        color: #1e40af;
        display: block;
        margin-bottom: 8pt;
    }
    
    /* Footer for each page */
    @page {
        @bottom-center {
            content: "TrillED - Complete School Management Platform | www.trilled.app";
            font-size: 8pt;
            color: #6b7280;
        }
        
        @bottom-right {
            content: "Page " counter(page) " of " counter(pages);
            font-size: 8pt;
            color: #6b7280;
        }
    }
    
    /* Optimize spacing for print */
    .py-16,
    .py-20 {
        padding-top: 8pt !important;
        padding-bottom: 8pt !important;
    }
    
    .py-12 {
        padding-top: 8pt !important;
        padding-bottom: 8pt !important;
    }
    
    .px-4,
    .px-6 {
        padding-left: 8pt !important;
        padding-right: 8pt !important;
    }
    
    /* Compact margins */
    .mb-8,
    .mb-12 {
        margin-bottom: 8pt !important;
    }
    
    .mt-8,
    .mt-12 {
        margin-top: 8pt !important;
    }
    
    /* Section spacing */
    section {
        page-break-inside: avoid;
    }
    
    section + section {
        margin-top: 0 !important;
    }
    
    /* Ensure links are visible */
    a {
        color: #1e40af;
        text-decoration: none;
    }
    
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 8pt;
        color: #6b7280;
    }
    
    /* Optimize images for print */
    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
    
    /* Border utilities */
    .border-t-4,
    .border-l-4 {
        border-left: 3pt solid #1e40af !important;
        border-top: none !important;
    }
    
    /* Plan badges - keep visible */
    .inline-block.px-4.py-2.rounded-full {
        background-color: #1e40af !important;
        color: white !important;
        padding: 4pt 8pt !important;
        font-weight: bold !important;
    }
    
    /* Category headers in feature cards */
    h3 {
        color: #1e40af !important;
        font-weight: bold !important;
        font-size: 11pt !important;
        border-bottom: 1pt solid #d1d5db !important;
        padding-bottom: 4pt !important;
        margin-bottom: 6pt !important;
    }
    
    /* Feature list items */
    li {
        font-size: 9pt !important;
        line-height: 1.3 !important;
    }
    
    li span {
        font-size: 9pt !important;
    }
    
    /* Checkmarks - keep green */
    .text-green-500,
    svg.text-green-500 {
        color: #10b981 !important;
    }
    
    /* Responsive grid for print */
    @media print {
        .md\:grid-cols-2,
        .lg\:grid-cols-3 {
            grid-template-columns: repeat(2, 1fr) !important;
        }
    }
}
