/* --- THEY DIGITAL ID - COMPLETE STYLES V4.1 --- */

/* 1. Global Styles & Variables */
:root {
    --primary-color: #007bff;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --border-color: #dee2e6;
    --font-family: 'Lato', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --light-blue-accent: #A8D8FF; /* Light blue for logo */
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --border-radius: 0.5rem;
}

body {
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-wrap: break-word; /* Helps prevent long text breaking layout */
}

.container {
    max-width: 1100px; /* Reduced max-width slightly */
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
a:hover {
    text-decoration: underline;
}
img {
    max-width: 100%;
    height: auto;
    display: block; /* Prevents small gaps below images */
}

/* 2. Header & Footer */
.main-header, .main-footer {
    background-color: var(--dark-color);
    color: white;
    padding: 15px 0; /* Slightly reduced padding */
}
.main-footer {
    margin-top: 40px;
    padding: 20px 0;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* Logo Styles with Hover Effect */
/* --- UPDATED LOGO STYLES (OCT 20, 2025) --- */

/* 1. Set a smaller base font size */
.logo-link h1 {
    margin: 0;
    color: var(--light-blue-accent);
    font-size: 1.5em; /* Reduced from 1.8em */
    transition: text-shadow 0.3s ease-in-out, font-size 0.3s ease-in-out;
}

.logo-link:hover {
    text-decoration: none;
}

/* 2. Set a smaller hover size and keep the glow */
.logo-link:hover h1 {
    font-size: 1.8em; /* Reduced from 2.2em */
    text-shadow: 0 0 8px var(--light-blue-accent), 0 0 10px rgba(168, 216, 255, 0.7);
}
/* Main Navigation */
.main-nav {
    display: flex;
    gap: 1.5rem;
}
.main-nav a {
    color: white;
    font-weight: 600;
    font-size: 0.9em;
    padding: 0.5rem 0;
}
.main-nav a:hover {
    color: var(--light-blue-accent);
    text-decoration: none;
}
/* Footer Navigation */
.footer-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #4B5563;
}
.footer-nav a {
    color: #D1D5DB;
    font-weight: 400;
}
.footer-nav a:hover {
    color: white;
}

/* 3. Homepage & Search */
.hero-section {
    text-align: center;
    padding: 1rem 0;
}
.hero-section .subtitle {
    font-size: 1.2em;
    color: #6c757d;
}
.search-section {
    margin-top: 15px;
    margin-bottom: 30px;
}
/* Search Form with Inline Button */
.search-form {
    position: relative;
}
.search-form input {
    width: 100%;
    padding: 10px 50px 10px 20px; /* Space for button */
    font-size: 1.1em;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
}
.search-form button {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 50px;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 1.2em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
}
.search-form button:hover {
    color: var(--light-blue-accent);
}
/* Homepage Grid Title */
.trending-section h2 {
    font-size: 1.5em;
    font-weight: 400;
    text-align: center;
    color: var(--text-secondary);
    max-width: 70ch;
    margin: 0 auto 3rem auto;
    line-height: 1.5;
    border: none;
}
.trending-section h2.search-title {
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    margin: 0 0 1.5rem 0;
    font-size: 2em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}
/* Homepage Figure Grid */
.figure-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); /* Slightly larger min size */
    gap: 20px;
}
.figure-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: block;
    color: var(--dark-color);
    border: 2px solid transparent; /* Start with transparent border */
}
.figure-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); /* More prominent shadow */
    text-decoration: none;
    border-color: var(--light-blue-accent); /* Use border-color instead of border */
}
.figure-card img {
    width: 100%;
    height: 280px; /* Consistent height */
    object-fit: cover;
    object-position: top;
}
.card-info {
    padding: 15px;
}
.card-info h3 {
    margin: 0 0 5px;
    font-size: 1.1em;
}
.card-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9em;
}

/* 4. Profile Page */
.profile-header { /* Simple header above profile */
    padding: 15px 0;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
}
.profile-main-header { /* Section with Pic, Name, QR */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 30px; /* Reduced margin */
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}
.profile-header-content { display: flex; align-items: center; gap: 20px; }
.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: var(--shadow-md);
}
.profile-main-header h1 { margin: 0; font-size: 2.5em; }
.profile-tagline { font-size: 1.1em; color: var(--text-secondary); margin: 5px 0 0; }
.qr-code { text-align: center; flex-shrink: 0; }
.qr-code img { width: 120px; height: 120px; }
.qr-code p { font-size: 0.9em; margin-top: 5px; color: var(--text-secondary);}
/* Profile Layout Grid */
.profile-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Default two columns */
    gap: 30px;
    align-items: start;
}
/* Profile Section Cards */
.profile-section {
    background: #fff;
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 25px; /* Reduced margin */
    box-shadow: var(--shadow-md);
}
.profile-section h2 {
    margin-top: 0;
    font-size: 1.5em;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
.topic-group { margin-bottom: 1.5rem; }
.hot-topic-card {
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 1rem;
    background-color: var(--light-color);
}
.statement-text { font-style: italic; margin: 0 0 10px; }
.statement-source { font-size: 0.9em; color: var(--text-secondary); }
.timeline { list-style: none; padding-left: 0; }
.timeline li { padding: 10px 0; border-bottom: 1px dashed var(--border-color); }
.timeline li:last-child { border-bottom: none; }
.stances-table { width: 100%; border-collapse: collapse; }
.stances-table td { padding: 12px; border-bottom: 1px solid var(--border-color); word-break: break-word; }
.stances-table tr:last-child td { border-bottom: none; }
.stances-table td:first-child { font-weight: 600; width: 150px; }
.details-list { list-style: none; padding: 0; margin: 0; }
.details-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0; /* Increased padding */
    border-bottom: 1px solid var(--border-color); /* Solid border */
    align-items: baseline;
}
.details-list li:last-child { border-bottom: none; }
.details-list li strong { color: var(--text-secondary); font-weight: 600; margin-right: 1rem; flex-shrink: 0;}
.details-list li span { text-align: right; } /* Align value to the right */
.details-list.links-list li { display: block; }

/* 5. Comment Section */
.comments-section {
    grid-column: 1 / -1; /* Make it full-width */
    background-color: #fff;
    padding: 1.75rem;
    border-radius: var(--border-radius);
    margin-top: 2.5rem;
    box-shadow: var(--shadow-md);
}
.comments-section h2 { margin-top: 0; font-size: 1.6em; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
.comment-form-container { margin: 2rem 0; }
.comment-form-container h3 { margin-bottom: 1rem; }
.comment-list { display: flex; flex-direction: column; gap: 1.5rem; }
.comment-card { border: 1px solid var(--border-color); padding: 1.5rem; border-radius: var(--border-radius); }
.comment-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.comment-author { font-weight: 700; font-size: 1.1em; }
.comment-date { font-size: 0.8em; color: var(--text-secondary); }
.comment-body { margin: 0 0 1rem; }
.comment-actions { display: flex; gap: 1rem; }
.action-btn { background: var(--light-color); border: 1px solid var(--border-color); padding: 0.5rem 1rem; border-radius: 999px; cursor: pointer; font-size: 0.9em; color: var(--text-secondary); }
.action-btn:hover:not(:disabled) { background: #E5E7EB; }
.action-btn:disabled { cursor: not-allowed; opacity: 0.6; }

/* 6. Other Pages & Utilities */
.content-page {
    background-color: #fff;
    padding: 2rem;
    margin-top: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}
.no-results {
    font-size: 1.2em;
    color: var(--text-secondary);
    text-align: center;
    padding: 3rem 0;
}
.suggestion-form label { font-weight: 600; display: block; margin-bottom: 0.5rem; }
.suggestion-form input, .suggestion-form textarea { width: 100%; padding: 0.75rem; border: 1px solid var(--border-color); border-radius: 8px; box-sizing: border-box; margin-bottom: 1rem; }
.suggestion-form button, .email-button, .donation-button { display: inline-block; padding: 0.75rem 1.5rem; font-size: 1em; font-weight: 600; border: none; background-color: var(--primary-color); color: white; border-radius: 8px; cursor: pointer; transition: background-color 0.2s ease; text-decoration: none; }
.suggestion-form button:hover, .email-button:hover, .donation-button:hover { background-color: #0056b3; color: white; text-decoration: none; }
.form-success { background-color: #D1FAE5; color: #065F46; padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; border: 1px solid #6EE7B7; }
.form-error { background-color: #FEE2E2; color: #991B1B; padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; border: 1px solid #FCA5A5; }

/* --- RESPONSIVE DESIGN SECTION --- */

/* For Tablets and Smaller Laptops (e.g., up to 1024px) */
@media (max-width: 1024px) {
    .profile-layout {
        grid-template-columns: 1fr !important; /* Force single column */
        gap: 2rem;
    }
    .main-content {
        grid-row: 2; /* Main content below sidebar */
    }
    .sidebar-content {
        grid-row: 1; /* Sidebar goes first */
        position: static;
    }
}

/* For Mobile Phones (e.g., up to 768px) */
@media (max-width: 768px) {
    .logo-link h1 {
        font-size: 1em !important; /* Make logo smaller on mobile */
        /* Optionally, disable hover growth on mobile */
        transition: text-shadow 0.3s ease-in-out; /* Remove font-size transition */
    }
    .logo-link:hover h1 {
        font-size: 1em !important; /* Prevent growth on hover on mobile */
        text-shadow: 0 0 8px var(--light-blue-accent), 0 0 10px rgba(168, 216, 255, 0.7); /* Keep the glow */
    }
    .container {
        padding: 0 1rem;
    }
    /* Stack header items */
    .profile-main-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
        margin-bottom: 2rem;
        padding-bottom: 2rem;
    }
    .profile-header-content {
        flex-direction: column;
        gap: 0.5rem;
    }
    .profile-main-header h1 {
        font-size: 2em;
    }
    .profile-picture {
        width: 100px;
        height: 100px;
    }
    .qr-code {
        margin-top: 1rem;
    }
    .qr-code img {
        width: 90px;
        height: 90px;
    }
    /* Reduce padding in sections */
    .profile-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    .profile-section h2 {
        font-size: 1.4em;
    }
    /* Stack sidebar list items */
    .details-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 8px 0; /* Reduced padding */
    }
    .details-list li strong {
        margin-right: 0;
    }
     .details-list li span {
        text-align: left; /* Align value to the left */
    }
    /* Make tables scrollable */
    .stances-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .stances-table td {
        white-space: normal;
        word-break: break-word;
    }
    .stances-table td:first-child {
        width: auto;
    }
    /* Adjust comment section */
    .comments-section {
        padding: 1rem;
    }
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}