/* ==========================================
   DOMAC STYLESHEET (style.css)
   ========================================== */

/* Universal Resets */
* {
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

body{
    font-family: Arial, Helvetica, sans-serif !important;
    background-color: #f7ebd9 !important; /* Palette cream backdrop matches sample */
    color: #000000 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    font-weight: 300 !important;
    letter-spacing: -0.1px !important;
    line-height: 1.4 !important;
    padding: 0 10px !important;
}

/* Header Grid Styling */
.main-header {
    background-color: #ffffff !important;
    padding: 15px 0 10px 0 !important;
}

.header-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    display: grid !important;
    grid-template-columns: 1fr 2fr 1fr !important;
    align-items: center !important;
    padding: 0 20px !important;
}

/* Left Brand Components */
.logo-area {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

.crest-container {
    margin-top: 5px !important;
    justify-self: center !important;
    display:flex !important;
    justify-content: center !important;
    /*padding-left: 15px !important;*/
}

.school-crest {
    height: 100px !important;
    width: auto !important;
    display: block !important;
}

/* Center Title Typography */
.school-title {
    text-align: center !important;
}


/* Default for mobile devices */
.school-title h1 {
    font-size: 2.2em !important;
    color: #730F10 !important;
    font-weight: bold !important;
    line-height: 1.2 !important;
}

/* For tablets (600px and up) */
@media (min-width: 600px) {
    .school-title h1 {
        font-size: 3em !important;
    }
}

/* For desktops (1024px and up) */
@media (min-width: 1024px) {
    .school-title h1 {
        font-size: 4em !important;
    }
}

/* Right Side Navigation Search Component */
.search-area {
    display: flex !important;
    justify-content: flex-end !important;
}

.search-box {
    display: flex !important;
    align-items: center !important;
    background-color: #f5edd6 !important;
    border: 1px solid #dcd1b4 !important;
    border-radius: 4px !important;
    width: 300px !important;
    padding: 4px 8px !important;
}

.search-box input {
    display: block !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    width: 200% !important;
    font-size: 13px !important;
    color: #000000 !important;
    font-weight: bold !important;
}


.search-box input::placeholder {
    color: #555555 !important;
}

.search-btn {
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    padding-left: 5px !important;
}

.search-icon {
    width: 18px;
    height: 18px;
    fill: #2c1a4d; /* Navy dark icon trace color */
}






    /* E-Library Search */
    .search-section {
        text-align: center;
        margin: 30px 0;
    }
    .search-section input[type="text"] {
        width: 60%;
        max-width: 500px;
        padding: 12px;
        font-size: 16px;
        border: 2px solid #ddd;
        border-radius: 6px;
    }
    .search-section button {
        padding: 12px 24px;
        font-size: 16px;
        background-color: #D29A11;
        color: #fff;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-weight: bold;
    }
    
    /* Grid system designed earlier to keep cards horizontally aligned */
    .library-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 24px;
        width: 100%;
        box-sizing: border-box;
        padding: 20px 0;
    }
    
    .book-card {
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        padding: 20px;
        text-align: center;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-top: 5px solid #D29A11 !important;
        box-sizing: border-box !important;
        text-decoration: none !important;
        color: inherit !important;
        transition: transform 0.2s ease !important;
    }
    .book-card:hover {
        transform: translateY(-5px);
    }
    .book-cover {
        width: 120px;
        height: 170px;
        object-fit: cover;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        margin-bottom: 12px;
        background: #f0f0f0;
    }
    .book-title {
        font-size: 16px;
        font-weight: bold;
        color: #2c3e50;
        margin: 8px 0 4px 0;
    }
    .book-author {
        font-size: 13px;
        color: #7f8c8d;
        margin-bottom: 10px;
    }
    .read-btn {
        display: inline-block;
        padding: 8px 16px;
        background: #2c3e50;
        color: #fff;
        border-radius: 4px;
        font-size: 12px;
        text-decoration: none;
        margin-top: auto;
    }
  /* THE EMBEDDED CONTAINER WINDOW */
    .iframe-wrapper {
        width: 100%;
        margin-top: 30px;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        border: 2px solid #D29A11;
    }
    
    .library-frame {
        width: 100%;
        height: 750px; /* Adjust height to fit your layout window preferred sizing */
        border: none;
        display: block;
        background: #ffffff;
    }





/* For mobile phones: Default grid */
[class*="col-"] {
    padding: 10px;
}

/* Desktop Stylesheet Media Query */
    .col-1 {width: 8.33%;}
    .col-2 {width: 16.66%;}
    .col-3 {width: 25%;}
    .col-4 {width: 33.33%;}
    .col-5 {width: 41.66%;}
    .col-6 {width: 50%;}
    .col-7 {width: 58.33%;}
    .col-8 {width: 66.66%;}
    .col-9 {width: 75%;}
    .col-10 {width: 83.33%;}
    .col-11 {width: 91.66%;}
    .col-12 {width: 100%;}

    .col-a1 {width: 12.5%;}
    .col-a2 {width: 25%;}
    .col-a3 {width: 37.5%;}
    .col-a4 {width: 50%;}
    .col-a5 {width: 62.5%;}
    .col-a6 {width: 75%;}
    .col-a7 {width: 87.5%;}
    .col-a8 {width: 100%;}

    .col-b1 {width: 11.11% !important;}
    .col-b2 {width: 22.22% !important;}
    .col-b3 {width: 33.33% !important;}
    .col-b4 {width: 44.44% !important;}
    .col-b5 {width: 55.55% !important;}
    .col-b6 {width: 66.66% !important;}
    .col-b7 {width: 77.78% !important;}
    .col-b8 {width: 88.89% !important;}
    .col-b9 {width: 100% !important;}


/* Desktop menu */
    .main-nav {
    background: #730F10 !important;
    width: 100% !important;
}

.menu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
}

.menu li {
    margin: 0 15px !important;
}

.menu a {
    color: white !important;
    text-decoration: none !important;
    text-align: center !important;
    padding: 15px !important;
    display: block !important;
    font-size: 1rem !important;
    text-underline-offset: .1em !important;
}


.menu a:hover {
    background: #D29A11 !important;
}

.menu li.active a,
.menu li.current-menu-item a,               /* WordPress active menu item class */
.menu li.current_page_item a {
    background-color: #D29A11 !important;
    border-color: #FFFFFF !important;
}



/* Burger Button hidden on desktop */
.burger-btn {
    display: none; 
}


/* Mobile styles */
@media (max-width: 768px) {
    .burger-btn {
        display: block; 
        padding: 10px;
        background: #730F10;
        color: white;
}

    .burger-btn:hover {
        background: #D29A11;
    }

/* Hide the menu by default on mobile */
    .menu {
        display: none !important;
        flex-direction: column !important;
        width: 40% !important;
    }


    .menu li {
        text-align: center !important;
        display: block !important;
        width: 100% !important;
        font-size: 14px !important;
    }

    .menu li a:hover {
        background-color: #D29A11 !important;
        display: block !important;
        width: 90% !important;
        padding: 12px 0 !important;
    }

    .menu li a:active {
    background-color: #D29A11 !important;
        display: block !important;
        width: 90% !important;
        padding: 12px 0 !important;
    }

    /* Alternative using JavaScript to toggle 'is-active' class */
    .menu.is-active {
        display: flex !important;
        flex-direction: column !important;
        text-underline-offset: .1em !important;
    }
    
}


.row::after {
    content: "";
    clear: both;
    display: flex;
    flex-wrap: wrap;
}


/* Main Core Layout Space */
.content-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
}

.welcome-container {
    max-width: 800px;
    text-align: center;
    margin-top: 10px;
}

.welcome-container h2 {
    font-size: 28px;
    color: #000000;
    font-weight: bold;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
}

.hero-text {
    font-size: 15px;
    font-weight: bold;
    line-height: 1.45;
    color: #000000;
    padding: 0 20px;
    word-spacing: 1px;
}

/* Base Structural Footer Layout */
.main-footer {
    background-color: #730F10 !important; /* Darker tone maroon block */
    color: #ffffff !important;
    padding: 15px 20px !important;
    font-size: 10px !important;
    line-height: 1.4 !important;
}

.footer-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
}

.footer-left p {
    margin: 1px 0 !important;
}

/* Centered Social Utilities Area */
.footer-socials {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    margin-bottom: 2px !important;
}

.social-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
}

.social-icon.fb {
    background-color: #3b5998;
    font-family: 'Georgia', serif !important;
    font-size: 16px !important;
    padding-top: 2px !important;
}

.social-icon.tt {
    background-color: #000000;
    padding: 4px;
}

.social-icon.ig {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%);
}

.ig-inner {
    width: 12px;
    height: 12px;
    border: 2px solid #ffffff;
    border-radius: 3px;
    position: relative;
}

.ig-inner::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: #ffffff;
    border-radius: 50%;
    top: 1px;
    right: 1px;
}

/* Right Aligned Legal Actions Links */
.footer-right {
    text-align: right !important;
}

.footer-right p {
    margin: 2px 0 !important;
}

.footer-right a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: normal !important;
}

.footer-right a:hover {
    text-decoration: underline !important;
}

/* Basic Mobile View Optimization */
@media (max-width: 768px) {
    .header-container {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        text-align: center !important;
    }
    
    .logo-area {
        align-items: center !important;
    }
    
    .crest-container {
        padding-left: 0 !important;
    }
    
    .search-area {
        justify-content: center !important;
    }
    
    .burger-btn {
        display: block !important; 
        padding: 10px !important;
        background: #D29A11 !important;
        color: white !important;
    }

    .main-nav ul {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .nav-btn {
        width: 85% !important;
    }
    
    .footer-container {
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
        text-align: center !important;
    }
    
    .footer-right {
        text-align: center !important;
    }
}




    .update-dashboard-container {
        max-width: 1200px;
        margin: 40px auto;
        padding: 0 20px;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    .dashboard-title {
        text-align: center;
        color: #2c3e50;
        margin-bottom: 40px;
    }

 /* 1. THE PARENT WRAPPER: Forces cards into rows automatically */
.card-container {
    display: grid;
    /* Automatically creates 4 columns on large screens, scales down on laptops, and defaults to 1 column on mobile */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    padding: 20px 0;
}

/* 2. THE INDIVIDUAL CARDS */
.flashcard {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 40px 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    text-decoration: none;
    /* Changed from display: block to help control internal element alignment */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-top: 5px solid #D29A11;
    box-sizing: border-box;
    width: 100%; /* Spans the full space of its grid cell block */
}
 
.flashcard:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.flashcard h2 {
    margin: 10px 0;
    color: #2c3e50;
    font-size: 24px;
}

.flashcard p {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.5;
}




table {
  width: 100%;
  border-collapse: collapse; /* Prevents hidden borders from adding ghost spacing */
  text-align: left; /* Aligns all text consistently to the left */
}

th, td {
  padding: 12px 16px; /* Adds generous breathing room inside cells */
  vertical-align: top; /* Keeps text aligned at the top if rows have uneven text lengths */
}

th {
  font-weight: 600; /* Makes headers stand out without needing lines */
  color: #333333; /* Darker text for visual hierarchy */
}

tr {
  border: none; /* Explicitly strips away all row lines */
}


/* Special styling for Result area*/
/* 1. Global Page Restrictions (Targeting the body tag) */
body.academic_result {
    background-color: #f4f6f9;
    color: #000000;
    padding: 40px 20px;
}

/* 2. Universal Reset scoped only to elements inside this page */
.academic_result * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1em;
    font-weight: 500;
}

/* 3. Component Restrictions (Prepended with your unique page wrapper) */
.academic_result .container {
    max-width: 1000px;
    margin: 0 auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.academic_result .action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.academic_result .btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    gap: 8px;
}

.academic_result .btn-outline {
    background-color: transparent;
    color: #000000;
    border: 1px solid #ced4da;
}

.academic_result .btn-outline:hover {
    background-color: #D29a11;
}

.academic_result .btn-primary {
    background-color: #D29a11;
    color: black;
}

.academic_result .btn-primary:hover {
    background-color: #D29a11;
}

.academic_result .report-header {
    text-align: center;
    border-bottom: 2px solid #D29a11;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.academic_result .report-header h1 {
    font-size: 24px;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.academic_result .report-header p {
    color: #000000;
    margin-top: 5px;
    font-size: 16px;
}

.academic_result .student-profile {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #D29a11;
    margin-bottom: 35px;
}

.academic_result .meta-group label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #000000;
    font-weight: 600;
    margin-bottom: 4px;
}

.academic_result .meta-group span {
    font-size: 1em;
    color: #000000;
    font-weight: 500;
}

.academic_result .table-responsive {
    width: 100%;
    overflow-x: auto;
}

.academic_result table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    margin-bottom: 20px;
}

.academic_result th {
    background-color: #730F10;
    color: #ffffff;
    padding: 14px 16px;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.academic_result td {
    padding: 14px 16px; 
    border-bottom: 5px solid #f8fafc;
    color: #000000;
    font-weight: 400;
    font-size: 1em;     
}

.academic_result tr:hover td {
    background-color: #f8fafc;
}

.academic_result .badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
    text-align: center;
}

.academic_result .badge-excellent { background-color: #def7ec; color: #03543f; }
.academic_result .badge-good { background-color: #e1effe; color: #1e429f; }
.academic_result .badge-pass { background-color: #fef08a; color: #713f12; }
.academic_result .badge-fail { background-color: #fde8e8; color: #9b1c1c; }

/* 4. Print Media Queries (Properly Encapsulated) */
@media print {
    /* 1. Reset page margins and set the size */
    @page {
        size: auto; /* Options: A4, letter, portrait, landscape */
        margin: 15mm; /* Standard margin prevents text clipping */
    }
    body.academic_result {
        background-color: #fff;
        padding: 0;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        color: #000000 !important; /* Save ink and ensure readability */
        font-size: 12pt; /* Point size is best for print typography */
    }
    .academic_result .container {
        box-shadow: none;
        padding: 0;
    }
    .academic_result .action-bar {
        display: none;
    }
    .academic_result th {
        background-color: #333 !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .academic_result .student-profile {
        border: 1px solid #cbd5e1;
        background-color: #f8fafc !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    /* 3. Hide non-printable elements (Navbars, sidebars, buttons) */
    header, footer, nav, .sidebar, .btn, .no-print {
        display: none !important;
    }
/* 4. Prevent elements like images or table rows from splitting mid-page */
    img, tr, pre, blockquote, .card {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* 5. Force major headers to always start on a fresh page */
    h1, .new-page {
        page-break-before: always;
        break-before: page;
    }
}

