
/*
 * COMPLETE STYLESHEET (V5 Final)
 * Incorporates all design improvements for index.html, REQUEST-1.html, and concordance_list-B.html
 * Designed for professionalism, compactness, and readability.
 */



/* --- Global Styles & Reset --- */
body {
    font-family: 'Noto Serif Tamil', 'serif'; 
    /* 💥 FINAL AESTHETIC CHANGE: Soft, light blue-gray */
/*    background-color: #fdfdff; */
    background-color: #faf5e8; 
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.5; 

/* 💥 CRITICAL CHECK: Remove any float or text-align that might be inherited */
    float: none; 
    text-align: left; /* Ensure text alignment doesn't force content left */
}


.container {
    max-width: 1300px !important; 
    margin: 0 auto !important; 
    padding: 0 15px; 
/* CRITICAL CHECK: Ensure it's not floating */
    float: none !important;
overflow-y: auto !important;
height:auto
}




/* --- Header Styling (Consistent & Compact) --- */
.site-header {
    background-color: #004d99; 
    color: #fff;
padding-top: 20px;
/* ---    padding: 15px 0; ---*/
    text-align: center;
    border-bottom: 5px solid #ffaa00; 
}

.site-header h1 {
    font-family: 'Roboto Serif', 'serif';
    font-size: 2.2em; 
    margin: 0;
    font-weight: 700;
}

.site-header h2 {
    font-size: 1.5em; 
    margin-top: 3px; 
    font-weight: 400;
    opacity: 0.9;
}

/* --- Call to Action Section (index.html) --- */
.call-to-action {
    text-align: center;
/* ---    padding: 30px 20px 35px 5px; --- */
padding:20px 20px;
    padding-bottom: 1px; 
    padding-top: 1px;
/*   background-color: #f3e5f5; */  /* pale lavender*/
background-color: #e8fff5;  /* Changed from #f3e5f5 (pale lavender) */

    border-radius: 6px; 
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 5px; 
}

.call-to-action h3 {
    color: #004d99;
    font-size: 1.4em;
    margin-bottom: 15px; 
}

.main-button {
    display: inline-block;
    background-color: #ffaa00; 
    color: #004d99;
    padding: 12px 25px; 
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 700;
    border-radius: 4px;
    transition: background-color 0.3s;
    border: 2px solid #ffaa00;
}

.main-button:hover {
    background-color: #e69500;
    border-color: #e69500;
}

.guide-text {
    margin-top: 15px; 
    font-size: 0.9em;
    color: #555;
}


/* --- Creator Bio Section (index.html - Framed Layout) --- */
.creator-bio.framed-layout {
    display: flex;
 /*   justify-content: space-between; */
    align-items: center; 
    padding: 20px; 
/*   background-color: #e9eff2; */ /* Pale complementary blue/gray for accent */

 background-color: #f5f0e9;  /* Changed from #e9eff2 (Pale complementary blue/gray) */

    border-radius: 6px; 
    margin-bottom: 20px; 
    text-align: center; 
}

.bio-text-center {
    flex: 2; 
    padding: 0 20px;
    padding: 0 10px;

    text-align: center;
}

.bio-photo {
    flex: 1; 
    max-width: 150px; 
    min-width: 100px;
}

.creator-bio h3 {
    color: #333;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
    margin-top: 0;
    font-size: 1.1em; 
}

.creator-name {
    font-size: 1.3em;
    color: #333;
    font-weight: bold;
    margin: 5px 0;
}

.bio-details {
    font-size: 0.95em;
    line-height: 1.4;
}

/* Image Sizing and Styling for Symmetry and Fix */
.college-photo {
    width: 100%; 
    height: 120px; 
    object-fit: cover; 
    border-radius: 4px;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #004d99;
}

.profile-photo {
    width: 120px; 
    height: 120px; 
    border-radius: 50%; 
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #ffaa00; 
    
    /* FIX: Prevents slicing of the face */
  /*  object-fit: contain;  */
object-fit: cover; 
    margin: 0 auto;
    display: block; 
}

.city-note {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}

/* --- Secondary Navigation (index.html - Quick Access Cards) --- */
.secondary-nav {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-bottom: 30px; 
}

.quick-access-cards .nav-link {
    flex: 1 1 200px; 
    margin: 10px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    padding: 18px 10px; 
    font-size: 1.1em;
    border-radius: 8px; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); 
    transition: all 0.3s ease;
    border: none;
}

.quick-access-cards .nav-link:hover {
    transform: translateY(-3px); 
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Individual Card Styling */
.card-cyan { background-color: #e0f7fa; color: #00838f; }
.card-cyan:hover { background-color: #b2ebf2; }

.card-thistle { background-color: #f3e5f5; color: #6a1b9a; }
.card-thistle:hover { background-color: #e1bee7; }

.card-orange { background-color: #fff3e0; color: #ff6f00; }
.card-orange:hover { background-color: #ffe0b2; }

.card-yellow { background-color: #fffde7; color: #fbc02d; }
.card-yellow:hover { background-color: #fff59d; }


/* --- Footer Styling --- */
.site-footer {
    background-color: #333;
    color: #ddd;
    text-align: center;
    padding: 15px 0; 
    font-size: 0.8em; 
}

.site-footer p {
    margin: 3px 0;
}

.counters {
    margin-top: 10px;
}

/* ========================================================================= */
/* --- STYLES SPECIFIC TO REQUEST-1.HTML (Request/Citation Page) --- */
/* ========================================================================= */

/* Note: .request-page-body is not needed as it inherits global body color */

.request-nav-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.nav-link-button {
    background-color: #f0f0f0;
    color: #333;
    padding: 8px 15px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid #ccc;
    transition: background-color 0.2s;
}

.nav-link-button:hover {
    background-color: #e0e0e0;
}

.page-heading {
    text-align: center;
    color: #004d99;
    font-size: .10em;
    margin-bottom: 5px;
    border-bottom: 2px solid #ffaa00;
    padding-bottom: 0; 
}

.request-content-grid {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.info-card {
    flex: 1;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.announcement-card {
/*    background-color: #e0f8f7; */ /* Pale Cyan */

background-color: #e5f3ff; /* Changed from #e0f8f7 */

    border: 2px solid #00838f;
}

.request-card {
/*    background-color: #fff3e0; */ /* Pale Orange/Yellow */

background-color: #fff9e5; /* Changed from #fff3e0 */

    border: 2px solid #ff9800;
}

.info-card h3 {
    text-align: center;
    color: #d84315; 
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 15px;
}

.content-text p {
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 0.95em;
}

.content-text ol {
    padding-left: 20px;
}

.content-text li {
    margin-bottom: 10px;
    font-size: 0.95em;
}

.highlight-text-red {
    color: #d84315;
    font-weight: bold;
}

.highlight-text {
    color: #00838f;
    font-weight: bold;
}

.signature {
    text-align: right;
    font-weight: bold;
    margin-top: 20px;
    color: #333;
}

/* Bottom Announcement Section */
.bottom-announcement {
    text-align: center;
    background-color: #e3f2fd;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 30px;
    font-size: 0.9em;
    border-left: 5px solid #2196f3;
}

.highlight-text-blue {
    color: #2196f3;
    font-weight: bold;
}

.external-link-blue {
    color: #2196f3;
    font-weight: bold;
    text-decoration: none;
}
.external-link-blue:hover {
    text-decoration: underline;
}

/* Action Button */
.action-section {
    text-align: center;
    margin-bottom: 50px;
}

.acceptance-note {
    font-size: 1em;
    color: #555;
    margin-bottom: 15px;
}

.main-proceed-button {
    display: inline-block;
    background-color: #4CAF50; 
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 700;
    border-radius: 6px;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.main-proceed-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}


/* ========================================================================= */
/* --- STYLES SPECIFIC TO CONCORDANCE_LIST-B.HTML (Text List Page) --- */
/* ========================================================================= */

/* Note: .concordance-list-body is not needed as it inherits global body color */

.concordance-nav-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.page-heading {
    text-align: center;
    color: #333;
    font-size: 2em;
    margin-bottom: 10px;
    padding-bottom: 0;
}

.page-heading .highlight-text {
    color: #004d99;
    font-weight: 700;
}

/* ---
.content-wrapper-grid {
    display: flex;
    gap: 30px;
    align-items: stretch; 
}
-- */
/* Find and replace this rule in your styles.css */
.content-wrapper-grid {
    display: grid;
    /* REDUCE THE LEFT COLUMN WIDTH: 200px for the sidebar, 1fr for the list */
    grid-template-columns: 200px 1fr; 
    gap: 30px; /* Keep space between the sidebar and the list */
}


/* 1. Sidebar for Principles/Tools */
.principles-sidebar {
    flex: 0 0 250px; 
/*    background-color: #fff; */
/*  background-color: gray;  */
 /*  background-color: #e9f4f3f3; */
 /* background-color: #f3f6fa;  */ /* Changed from #e9f4f3f3 */
  background-color: #e5f3ff;  
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-right: 3px solid #ffaa00; 
}

.principles-sidebar h3 {
    font-size: 1.2em;
    color: #004d99;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
padding: 20px 0 20px 10px;
    margin-top: 0;
/* background-color: #f8f8f8; */
margin-bottom: 10px;

}

/* --
.tool-link-box {
    margin-bottom: 15px;
}
-- */

/* 

/* Add/Update this rule in styles.css for the standard links */
.tool-link-box {
    /* Subtle background for the standard links */
    background-color: #f8f8f8; 
    /* Add padding so the background is noticeable around the link */
    padding: 2px; 
    /* Add a small bottom margin to separate the boxes */
    margin-bottom: 2px; 
    /* Optional: round the corners slightly */
    border-radius: 5px; 
}

*/

/* Update this rule in styles.css to ensure the special color overrides the default */
.tool-link-box.special-link {
    /* Use the light blue color for emphasis */
    background-color: #e6f2ff; 
    /* Optional: You can make the border or text bolder here too */
    border: 1px solid #cce0ff;
}


.principle-link {
    display: block;
    color: #004d99;
    text-decoration: none;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.4;
    padding: 5px 0;
    transition: color 0.2s;
}

.principle-link:hover {
    color: #d84315; 
    text-decoration: underline;
}

.special-link .principle-link {
    background-color: #e0f7fa;
    padding: 10px;
    border-radius: 4px;
    border: 1px dashed #b2ebf2;
    font-size: 1.05em;
    margin-top: 5px;
}





/* 2. Main Text List */
.texts-main-list {
    flex-grow: 1;
 /*   background-color: #fff;*/
background-color: #ededed; /* Changed from #fff */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.texts-main-list h3 {
    font-size: 1.5em;
    color: #333;
    margin-top: 0;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
/* -- text-align: center; -- */
}

.guide-text {
    color: #666;
    margin-top: -10px;
    margin-bottom: 25px;
    font-style: italic;
text-align: center;
}
/* ----
.text-category-grid 
{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); 
    gap: 20px;
}

---*/

/* Update this rule in styles.css to show 3 or 4 columns */
.text-category-grid {
    display: grid;
    /* Try 3 columns first. Adjust to 4 if needed and space allows. */
    grid-template-columns: repeat(4, 1fr); 
    gap: 0px; /* Space between columns */
}

.category-group {
/*   background-color: #DCDCDC; */
background-color: #e8fff5;
    padding: 15px;
    border-radius: 6px;
    border-left: 5px solid #00838f; 
/* Keep the subtle shadow to define the box */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.category-group h4.category-title {
    color: #004d99;
    font-size: 1.1em;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-top: 0;
}

.category-group ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.category-group li {
    margin-bottom: 8px;
}

.category-group a {
    color: #333;
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.2s;
}

.category-group a:hover {
    color: #00838f;
    text-decoration: underline;
}

.new-tag {
    background-color: #d84315;
    color: white;
    font-size: 0.7em;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
    font-weight: bold;
    vertical-align: top;
}

/* --- GRAMMAR/CENTERED LIST STYLES (Cleaned and consolidated) --- */

/* Base Centering for ALL lists (Consolidated and Working) */
.texts-main-list-centered {
background-color: #ededed !important; /* Changed from #f5f5f5 */
    padding: 1px 30px 0px 30px !important; 
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    max-width: 550px; 
    margin: 2px auto 10px auto;

    /* CRITICAL RULES CONSOLIDATED FROM THE OLD BLOCK */
    overflow: hidden !important; /* Ensures background color wraps children */
    text-align: left !important; /* Guarantees text alignment */
    float: none !important;      /* Prevents unwanted floating */
}

/* Wide Override for Grammar and Bakthi */
.list-container-wide {
    display: block !important;
    max-width: 1150px !important;
    margin: 5px auto 10px auto !important;
    clear: both !important; /* Retaining the nuclear option */
}

/* Base Grid Definition (for mobile and small screens) */
.list-grid {
    display: grid;
    width: 100%; 
    grid-template-columns: 1fr; /* Default 1 column */
    gap: 15px; 
    box-sizing: border-box;

/* 💥 CRITICAL CENTERING FIX FOR GRID 💥 */
    /* Center the grid itself within the container */
    margin: 0 auto !important; 
    
    /* Ensure the grid does not exceed the container width */
    max-width: 1050px !important;

}

/* ========================================================================= */
/* --- RESPONSIVE ADJUSTMENTS --- */
/* ========================================================================= */

@media (max-width: 1200px) {       /* it was 900 px */
    /* List Page (Sidebar stacking) */
    .content-wrapper-grid {
        flex-direction: column;
    }
    .principles-sidebar {
        flex: 1 1 100%; 
        border-right: none;
        border-bottom: 3px solid #ffaa00;
        order: -1; 
    }
    .text-category-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 100%) { /** it was 768 px */
    /* Homepage (Bio stacking) */
    .creator-bio.framed-layout {
        flex-direction: column; 
    }
    .bio-photo {
        max-width: 100%; 
        margin-bottom: 15px;
    }
    .creator-bio.framed-layout .bio-photo:first-child { order: 3; } 
    .bio-text-center { order: 1; margin-bottom: 15px; } 
    .creator-bio.framed-layout .bio-photo:last-child { order: 2; } 
    
    .profile-photo {
        width: 100px; 
        height: 100px;
        margin: 0 auto;
    }
    .college-photo {
        width: 150px;
        height: 100px;
        margin: 0 auto;

    }
    .quick-access-cards .nav-link {
        flex: 1 1 100%; 
    }
    
    /* Request Page (Two columns stacking) */
    .request-content-grid {
        flex-direction: column;
        gap: 20px;
    }
    .main-proceed-button {
        padding: 12px 20px;
        font-size: 1em;
    }
}

@media (max-width: 100%) {
    /* List Page (Single column for categories) */
    .text-category-grid {
        grid-template-columns: 1fr; 
    }
    .page-heading {
        font-size: 1.5em;
    }
}

/** NEWLY ADDED -- **/

/* Styling for the smaller descriptive text (replaces <font size=2>) */
.text-subnote {
    display: block; /* Forces the text onto a new line */
    font-size: 0.85em; /* Small font size */
    font-weight: 400; /* Ensures it is lighter than the main title */
    margin-top: 2px;
}

/* Styling for the separator (replaces the hyphen line) */
.separator-item {
    list-style: none; /* Removes the bullet point */
    padding: 10px 0; /* Adds vertical space */
}

.separator-item hr {
    border: none;
    border-top: 1px solid #ccc; /* A thin gray line */
    margin: 0;
}

/* --- START OF NEW RULES FOR CONCORDANCE LIST PAGE --- */

/* Styling for the smaller descriptive text (replaces <font size=2>) */
.text-subnote {
    display: block; /* Forces the text onto a new line below the main title */
    font-size: 0.85em; /* A slightly smaller font size */
    font-weight: 400; /* Ensures it is lighter than the main title */
    margin-top: 2px; /* Small space above the sub-note */
}

/* Styling for the list item that acts as a separator (replaces the hyphen line) */
.separator-item {
    list-style: none; /* Removes the bullet point */
    padding: 10px 0; /* Adds vertical space around the line */
}

.separator-item hr {
    border: none;
    border-top: 1px solid #ccc; /* Creates a thin gray line */
    margin: 0;
}

/*

/* Use a dedicated class to widen the container only for two columns */
.list-container-two-col {
    max-width: 800px;
}

*/


/* Ensure tables inside the grid expand to fill the available column width */
.list-grid .simple-list-table {
    width: 100%; 
}

/* --- END OF NEW RULES --- */
/* ========================================================================= */
/* --- V6 COMPACT STYLES FOR REQUEST-1.HTML (To eliminate vertical scrolling) --- */
/* ========================================================================= */

/* General reduction in header padding */
.site-header {
    padding-top: 10px; /* Reduced from 20px */
    padding-bottom: 10px; /* Ensure some vertical padding remains */
}
.site-header h1 {
    font-size: 1.8em; /* Slightly smaller title */
}
.site-header h2 {
    font-size: 1.2em; /* Slightly smaller subtitle */
    margin-top: 2px;
}

/* Reduced spacing for the navigation header */
.request-nav-header {
    margin-bottom: 15px; /* Reduced from 20px */
}

/* Reduced spacing for the main page heading */
.page-heading {
    margin-bottom: 5px; /* Reduced from 10px */
}

/* Reduced gap between the two main cards */
.request-content-grid {
    gap: 20px; /* Reduced from 30px */
    margin-bottom: 20px; /* Reduced from 30px */
}

/* Compacting the inner padding of the information cards */
.info-card {
    padding: 15px; /* Reduced from 25px */
}
.info-card h3 {
    font-size: 1.2em; /* Slightly smaller heading */
    margin-bottom: 10px; /* Reduced from 15px */
}

/* Making the list and paragraph text within the cards more compact */
.content-text p, .content-text li {
    font-size: 0.9em; /* Slightly smaller text for compactness */
    line-height: 1.4; /* Tighter line spacing (reduced from 1.6) */
    margin-bottom: 8px; /* Reduced vertical gap */
}
.content-text ol {
    padding-left: 18px; /* Reduced list indent */
    margin-top: 5px;
}

/* Compacting the bottom announcement section */
.bottom-announcement {
    padding: 10px; /* Reduced from 15px */
    margin-bottom: 20px; /* Reduced from 30px */
    font-size: 0.85em; /* Smaller text */
}

/* Compacting the action section */
.action-section {
    margin-bottom: 30px; /* Reduced from 50px */
}
.acceptance-note {
    font-size: 0.9em; /* Smaller note text */
    margin-bottom: 10px; /* Reduced from 15px */
}

/* Minor reduction in main button size */
.main-proceed-button {
    padding: 12px 25px; /* Reduced from 15px 30px */
    font-size: 1.1em; /* Reduced from 1.2em */
}

/* Mobile Adjustments for extreme compactness */ /max width was 768px */
@media (max-width: 100%) {
    .info-card {
        padding: 12px;
    }
    .main-proceed-button {
        padding: 10px 20px;
        font-size: 1em;
    }
    .content-text p, .content-text li {
        margin-bottom: 5px; /* Tighter spacing on mobile */
    }
}

/* ========================================================================= */
/* --- V7 COMPACT HEADER STYLES (Extreme Reduction for REQUEST-1.HTML) --- */
/* ========================================================================= */

/* Target the main site header for maximum height reduction */
.site-header {
    padding-top: 5px; /* Extremely small top padding */
    padding-bottom: 5px; /* Extremely small bottom padding */
    min-height: 0; /* Ensures content dictates height */
    border-bottom: 3px solid #ffaa00; /* Reduced from 5px to 3px */
}

/* Target the main title */
.site-header h1 {
    font-size: 1.5em; /* Reduced from 1.8em to 1.5em */
    margin-bottom: 2px; /* Small gap below the main title */
}

/* Target the subtitle */
.site-header h2 {
    font-size: 1em; /* Reduced from 1.2em to 1.0em (very small) */
    margin-top: 0; /* Remove top margin */
}

/* Ensure mobile header is also compact */
@media (max-width: 100%) {
    .site-header h1 {
        font-size: 1.2em;
    }
    .site-header h2 {
        font-size: 0.8em;
    }
    .site-header {
        padding-top: 3px;
        padding-bottom: 3px;
    }
}

/* ========================================================================= */
/* --- V8 FINAL COMPACT STYLES (Targeting Heading and Bottom Box) --- */
/* ========================================================================= */

/* 1. Compacting the Main Heading: "முக்கிய அறிவிப்புகளும் வேண்டுகோளும்" */
/* Targetting .page-heading specifically for REQUEST-1.html's heading */
.page-heading {
    /* Reduced font size (e.g., from 1.5em to 1.1em or 1.2em if needed) */
    font-size: 1.2em;
    /* Reduced margin below the heading */
    margin-bottom: 5px; /* Keep this small */
    /* Reduce padding below the border */
    padding-bottom: 3px;
    border-bottom: 1px solid #ffaa00; /* Made the dividing line thinner */
}

/* 2. Compacting the Bottom Announcement Box (Part 3) */
.bottom-announcement {
    /* Reduced vertical padding inside the box */
    padding-top: 5px;   /* Reduced from 10px */
    padding-bottom: 5px; /* Reduced from 10px */
    padding-left: 10px;  /* Keep horizontal padding */
    padding-right: 10px; /* Keep horizontal padding */
    
    /* Reduced margin below the box */
    margin-bottom: 15px; /* Reduced from 20px */
    
    /* Ensure paragraphs inside the box are tightly packed */
    font-size: 0.8em; /* Slightly smaller text for maximum space saving */
}

.bottom-announcement p {
    margin: 3px 0; /* Remove default paragraph margins, adding a very small vertical space */
}

/* 3. Minor adjustment to the Signature/CTA Area */
.signature {
    margin-top: 10px; /* Reduced space above the signature */
}

.action-section {
    margin-bottom: 20px; /* Reduced from 30px */
}

.acceptance-note {
    margin-bottom: 8px; /* Reduced from 10px */
}

/* 4. Footer Compaction */
.site-footer {
    padding: 10px 0; /* Reduced from 15px 0 */
}

/* ========================================================================= */
/* --- V9 HEADER SYMMETRY FIX (Ensures equal top/bottom padding inside header) --- */
/* ========================================================================= */

/* Target the site header padding (already minimal, ensuring symmetry) */
.site-header {
    padding-top: 5px; 
    padding-bottom: 5px; 
    /* The border-bottom remains as the separator */
}

/* Ensure the subtitle (h2) has zero bottom margin so it doesn't push the padding down */
.site-header h2 {
    font-size: 1em; 
    margin-top: 0; 
    margin-bottom: 0; /* <<< CRITICAL FIX: Ensures no extra space below the last element */
}

/* Ensure the main title (h1) also has a reduced margin */
.site-header h1 {
    font-size: 1.5em; 
    margin-bottom: 2px; /* Smallest necessary separation from h2 */
}

/* Mobile symmetry adjustment */
@media (max-width: 100%) {
    .site-header {
        padding-top: 3px;
        padding-bottom: 3px;
    }
    .site-header h2 {
        margin-bottom: 0; /* Keep zero margin on mobile too */
    }
}

/* --- NEW RULE for short, single-column lists --- */
/* This restores the narrow width when needed, ensuring the block is contained */
.list-container-narrow {
    max-width: 350px !important; 
}






.simple-list-table {
    width: 100%;
    border-collapse: separate; /* Allows for spacing between rows */
    border-spacing: 0 5px; /* Vertical spacing between links */
}

.simple-list-table td.list-item {
    padding: 0;
    /* Uses the same background color as the category groups for consistency */
    background-color: #e8fff5; 
    border-radius: 6px;
    border-left: 5px solid #004d99; /* Strong blue border for academic emphasis */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}




/* Large screens (901px and up) - Use 3 columns */
@media (min-width: 100%) {
    .texts-main-list-centered.list-container-wide .list-grid {
        grid-template-columns: repeat(3, minmax(300px, 1fr));
        gap: 20px;
    }
}

.simple-list-table td.list-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.simple-list-table a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #004d99; /* Primary blue for main link text */
    font-weight: 700;
    font-size: 1.1em;
}

.simple-list-table a:hover {
    color: #d84315; /* Hover color (Red/Orange) */
}

.text-link-title {
    display: inline-block;
}

.text-subnote-small {
   /* display: inline;*/
   display:block;
    font-size: 0.85em;
    font-weight: 400;
    color: #555;
    margin-left: 0;
margin-top: 2px;
}

/* ========================================================================= */
/* --- VERY COMPACT OVERRIDE FOR LONG LISTS (e.g., Bakthi.html) --- */
/* ========================================================================= */

.very-compact-list {
    /* Significantly reduce the vertical gap between link rows */
    border-spacing: 0 2px; /* Reduced from 5px for extreme compactness */
}

.very-compact-list td.list-item {
    /* Shrink the top/bottom margin */
    margin-bottom: 2px;
}

.very-compact-list a {
    /* Drastically reduce internal padding to shrink link height */
    padding: 7px 15px; /* Reduced from 10px 15px */
    font-size: 1.05em; /* Slightly smaller font to allow more content */
}

/* Ensure the sub-note is also compact */
.very-compact-list .text-subnote-small {
    margin-top: 1px; /* Minimal space above the sub-note */
    font-size: 0.8em; /* Slightly smaller sub-note font */
}




/* 3-Column Layout for Bakthi and Long Lists (Screens > 900px) */
@media (min-width: 901px) {
    /* Targets the list-grid inside the wide container */
    .texts-main-list-centered.list-container-wide .list-grid {
        /* Creates 3 columns */
        grid-template-columns: repeat(3, minmax(300px, 1fr));
    }
}


/* --- FINAL RESPONSIVE LAYOUT MEDIA QUERIES (Place at end of stylesheet) --- */

/* 2-Column Layout for Grammar and Medium Lists (Screens 601px to 900px) */
@media (min-width: 601px) {
    .texts-main-list-centered .list-grid { 
        grid-template-columns: repeat(2, minmax(300px, 1fr));
        gap: 20px;
    }
}

/* 3-Column Layout for Bakthi and Long Lists (Screens > 900px) */
@media (min-width: 901px) {
    .texts-main-list-centered.list-container-wide .list-grid {
        grid-template-columns: repeat(3, minmax(300px, 1fr));
        gap: 20px; /* Add gap here for consistency */
    }
}


/************************************************************/
/* --- NEW RULES: TEXT CONCORDANCE INDEX MATRIX (General) --- */
/************************************************************/

/* Main layout for the matrix and image side-by-side */
.matrix-layout-grid {
    display: grid;
    grid-template-columns: 2.0fr 0.5fr; /* 2 parts for matrix, 0.5 part for image */
    gap: 5px;
    margin-top: 25px;
 border: 5px solid #336699; /* Outer border */

}

.matrix-layout-grid1 {
    display: grid; /* or flex */
    grid-template-columns: auto auto; /* ensure they sit side-by-side */
    
    /* Set this to a low value like 5px or 10px */
    gap: 10px; 
    
    /* This pulls both containers toward the center */
    justify-content: center; 
}

.matrix-layout-grid2 {
    display: flex; /* or grid */
    
    /* 'center' packs them tightly in the middle of the page */
    /* 'start' packs them tightly to the left */
    justify-content: center; 
    
    gap: 15px; /* Control the exact spacing here */
}

/* 12-column Grid for the Tamil Letters */
.letter-matrix-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr); /* 12 equal-width columns */
    grid-auto-rows: 1fr;
    background-color: #eef3f6;

}

.letter-matrix-grid11 {
    display: grid;
    grid-template-columns: repeat(3, 80px); /* 3 equal-width columns */
    grid-auto-rows: 1fr;
   grid-auto-rows: 40px; /* determines height of each cell */

    background-color: #eef3f6;
justify-content: center;
align: left;
    font-size: 0.65em; 


}


.letter-matrix-grid1 {
    display: grid;
    grid-template-columns: repeat(12, 60px); /* 12 equal-width columns */
    grid-auto-rows: 1fr;
    background-color: #eef3f6;
justify-content: center;
}

.letter-matrix-grid2 {
    display: grid;
    grid-template-columns: repeat(12, 70px); /* 12 equal-width columns */
    grid-auto-rows: 1fr;
    background-color: #eef3f6;
justify-content: center;
}



/* 13-column Grid for the Tamil Letters */
.letter-matrix-grid13 {
    display: grid;
    grid-template-columns: repeat(13, 1fr); /* 13 equal-width columns */
    grid-auto-rows: 1fr;
    background-color: #eef3f6;
}


/* Styling for each cell (both active and inactive) */
.matrix-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1px 0;
    font-size: 1.0em;
    font-weight: bold;
    border: 1px solid #ddd; /* Inner border */
    text-decoration: none;
    transition: background-color 0.1s;
}

/* Style for letters that are valid/linked (Red) */
.matrix-cell.active {
    color: red;
}

/* Style for letters that are invalid/unlinked (Blue) */
.matrix-cell.inactive {
    color: blue;
    cursor: default;
    /* Remove hover effect for inactive cells */
    pointer-events: none; 
}

/* Hover effect for active (linked) cells */
.matrix-cell.active:hover {
    background-color: #ffcccc; /* Light red background on hover */
}

/* Last Row Fixes (Standalone Consonants) */
.hidden-fill, .hidden-fill-long {
    background-color: #ffffff;
    border: none;
    /* Ensure the grid area is filled but remains invisible */
    visibility: hidden; 
}
.hidden-fill-long {
    grid-column: span 2; /* Spans the last two cells */
}

/* --- IMAGE AND LINK STYLES --- */
.image-link-container {
    text-align: center;
    / *padding: 15px; */
padding-top: 5px;    /* Reduced from a larger value */
    padding-bottom: 5px; /* Reduced from a larger value */
    border: 4px solid #f0f0f0;
    background-color: #ffe0e6;
    border-radius: 8px;
max-width:200px;
}




/* --- IMAGE AND LINK STYLES --- */
.image-link-container1 {
    text-align: center;
   
max-width:200px;
}

.image-link-container11 {
    text-align: center;
   
    width: fit-content;   
}


.image-link-container3 {
 /*   text-align: center; */
display: flex;          /* This aligns children horizontally */
    flex-direction: row;    /* Ensures they stay in a row */
border: 2px solid red;  /* Your box border */
    padding: 5px;
    gap: 10px;              /* Space between the images */
    width: fit-content;   
}

.image-link-container4 {
 text-align: center;
display: flex;          /* This aligns children horizontally */
    flex-direction: row;    /* Ensures they stay in a row */
border: 2px solid red;  /* Your box border */
    padding: 5px;
    gap: 10px;              /* Space between the images */
    width: fit-content;   
}



.image-link-container2 {
 /*   text-align: left; */
    / *padding: 15px; */
padding-top: 5px;    /* Reduced from a larger value */
    padding-bottom: 5px; /* Reduced from a larger value */
    border: 4px solid #f0f0f0;
    background-color: #ffe0e6;
    border-radius: 8px;
/* max-width:50px;*/
}

.image-link-container5 {
    text-align: center;
    / *padding: 15px; */
padding-top: 5px;    /* Reduced from a larger value */
    padding-bottom: 5px; /* Reduced from a larger value */
   border: 4px solid #f0f0f0;
    background-color: #ffe0e6;
    border-radius: 8px;
width: fit-content;
}


.image-text-caption {
    text-align: center;
    font-size: 0.8em;
    font-weight: bold;
    color: #444;
/*    margin-bottom: 15px; */
    line-height: 1.4;
margin-top: 5px;    /* Reduced from a larger value */
    margin-bottom: 10px; /* Reduced from a larger value */
}

.subtitle-text-caption {
    font-size: 0.7em;
    font-weight: bold;
    color: #444;
/*    margin-bottom: 15px; */
    line-height: 1.4;
margin-top: 0px;    /* Reduced from a larger value */
    margin-bottom: 0px; /* Reduced from a larger value */
}

.small-letter{
font-size: 0.7em;
    }

.responsive-image {
    max-width: 100%;
    height: auto;
    display: block;
    border: 2px solid #555; /* border on the image */
    border-radius: 4px;
    margin: 0 auto;
    transition: transform 0.3s;
}

.image-link:hover .responsive-image {
    transform: scale(1.02);
    border-color: red;
}

/* --- SPECIAL ACTION LINK STYLES --- */
.special-link-box {
    text-align: center;
    margin: 0px 0;
font-size: 1.3em;
padding: 0px 0px;


}

.special-link-box1 {
    text-align: center;
    margin: 20px 0;
font-size: 1.2em;


}


.bottom-special-link-box {
    text-align: center;
    margin: 10px 0;
font-size: 0.9em;

}

.TOP-special-link-box {
    text-align: center;
    margin: 10px 0;
font-size: 0.8em;

}


.special-action-link {
    font-size: 0.8em;
    color: red;
    text-decoration: underline;
    font-weight: bold;
    padding: 0px 5px;
/* color: #444; */
margin-top: 0px; /* NEW: Reduced space above the text */
    margin-bottom: 0px;

}

.special-action-link-large {
    font-size: 1.4em;
    border: 2px solid red;
    padding: 2px 2px;
    border-radius: 10px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.special-action-link-large:hover {
    background-color: #ffe6e6;
}

/* --- INSTRUCTION TEXT STYLES --- */
.instruction-box {
    text-align: center;
    font-size: 1.0em;
    line-height: 1.5;
    color: #444;
    margin-top: 1px; /* NEW: Reduced space above the text */
    margin-bottom: 1px;
}

.red-text-bold {
    color: red;
    font-weight: bold;
}

/* MEDIA QUERY for smaller screens (Stacks the matrix and image) */
@media (max-width: 100%) {
    .matrix-layout-grid {
        grid-template-columns: 1fr; /* Stack into a single column */
        gap: 20px;
    }
}

/* Reduce margin on the main heading */
.page-heading-centered {
    margin-top: 10px; /* Reduced from a larger default */
    margin-bottom: 5px;
padding-bottom: 0px; /* Keep padding minimal */
/* ADD A BACKGROUND COLOR */
    background-color: #e0ffff; /* Use a distinct color, */
    padding-top: 15px; /* Add some padding for height */
    padding-bottom: 15px; /* Add padding here too */
    /* Center the block itself and give it a max width if desired */
    max-width: 1050px; /* Match the wide container width */
    margin-left: auto;
    margin-right: auto;
}

