/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.4;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
}

.main-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 25px;
}

.header h1 {
    font-size: 2.2em;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.nav-link {
    margin-top: 10px;
}

.nav-link a {
    color: #4a4a4a;
    text-decoration: underline;
    font-weight: 500;
}

.celestial-icons {
    font-size: 1.5em;
    margin: 15px 0;
}

/* Branding Banner */
.branding-banner {
    width: 100%;
    margin-bottom: 20px;
    background-image: url('../images/banner-bg-re.png');
    background-repeat: repeat;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.banner-left-group {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Space between b1 and title */
}

.banner-img-side {
    height: auto;
    max-height: 80px;
    /* Adjustable constraint */
    object-fit: contain;
}

/* Title centered absolute */
.banner-img-title {
    height: auto;
    max-height: 90px;
    object-fit: contain;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    /* Ensure it doesn't overlap excessively if screen is small - might need media query tweaks */
}

@media (max-width: 768px) {
    .branding-banner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    /* Reset absolute position for mobile stack */
    .banner-img-title {
        position: static;
        transform: none;
        max-width: 100%;
        max-height: 90px;
        margin: 5px 0;
    }

    .banner-img-side {
        display: none;
    }

    .banner-left-group {
        flex-direction: column;
        gap: 10px;
    }
}



/* Form Styles */
.form-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 0.9em;
    background: white;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Style for read-only timezone display */
#timezone-info-display input[readonly] {
    background-color: #e9ecef;
    /* Light gray background */
    cursor: default;
    /* Default cursor */
    border-color: #ced4da;
    /* Match other borders */
    color: #495057;
    /* Slightly muted text */
}

/* Submit Button */
.submit-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 15px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Error Message */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Style for timezone warning text */
.warning-text {
    color: #856404;
    /* Bootstrap warning text color */
    background-color: #fff3cd;
    /* Bootstrap warning background color */
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: bold;
}

.timezone-display-row.warning .detail-value {
    /* Target specific warning display */
    color: #856404;
    background-color: #fff3cd;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: bold;
}


/* Results Layout */
.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

/* Planet Cards */
.planet-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
    min-height: 180px;
    display: flex;
    /* Added for better internal alignment */
    flex-direction: column;
    /* Added */
}

.planet-card h3 {
    font-size: 1.1em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    min-height: 32px;
    justify-content: space-between;
    /* Ensures button stays right */
    width: 100%;
    /* Ensure h3 takes full width */
}


.planet-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    flex-shrink: 0;
    /* Prevent icon from shrinking */
}

/* Planet-specific Colors */
.sun-card {
    border-left-color: #ff6b35;
}

.sun-card .planet-icon {
    background: #ff6b35;
}

.moon-card {
    border-left-color: #4834d4;
}

.moon-card .planet-icon {
    background: #4834d4;
}

.mars-card {
    border-left-color: #e74c3c;
}

.mars-card .planet-icon {
    background: #e74c3c;
}

.mercury-card {
    border-left-color: #f39c12;
}

.mercury-card .planet-icon {
    background: #f39c12;
}

.jupiter-card {
    border-left-color: #f1c40f;
}

.jupiter-card .planet-icon {
    background: #f1c40f;
}

.venus-card {
    border-left-color: #e91e63;
}

.venus-card .planet-icon {
    background: #e91e63;
}

.saturn-card {
    border-left-color: #34495e;
}

.saturn-card .planet-icon {
    background: #34495e;
}

.rahu-card {
    border-left-color: #9b59b6;
}

.rahu-card .planet-icon {
    background: #9b59b6;
}

.ketu-card {
    border-left-color: #16a085;
}

.ketu-card .planet-icon {
    background: #16a085;
}

.info-card {
    border-left-color: #3498db;
}

.info-card .planet-icon {
    background: #3498db;
}

.times-card {
    border-left-color: #e67e22;
}

.times-card .planet-icon {
    background: #e67e22;
}

/* Detail Rows */
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.85em;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #666;
    min-width: 80px;
    flex-shrink: 0;
    padding-right: 5px;
}

.detail-value {
    font-weight: 500;
    color: #333;
    text-align: right;
    flex-grow: 1;
}

/* Timing Sections */
.times-header {
    font-size: 0.9em;
    margin-bottom: 8px;
    font-weight: 600;
    padding-bottom: 4px;
    border-bottom: 2px solid;
}

.times-header.auspicious {
    color: #28a745;
    border-color: #28a745;
}

.times-header.inauspicious {
    color: #dc3545;
    border-color: #dc3545;
}

.timing-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75em;
    margin-bottom: 4px;
    align-items: center;
}

.timing-row:last-child {
    margin-bottom: 0;
}

.timing-label {
    color: #666;
    font-weight: 600;
    min-width: 80px;
}

.timing-value {
    font-family: 'Courier New', monospace;
    color: #333;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    text-align: right;
    flex: 1;
    margin-left: 8px;
}

/* Retrograde indicator styles */
.retrograde-indicator {
    color: #e74c3c;
    font-weight: bold;
    font-size: 0.75em;
    margin-left: 8px;
    background: rgba(231, 76, 60, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid rgba(231, 76, 60, 0.3);
    white-space: nowrap;
    /* Prevent wrapping */
}

.planet-name-with-retrograde {
    display: flex;
    align-items: center;
    /* justify-content: space-between; REMOVED - h3 handles this */
    flex-grow: 1;
    /* Allow name part to grow */
    margin-right: 10px;
    /* Space before button */
    overflow: hidden;
    /* Prevent long names overlapping button */
}

.planet-name-with-retrograde>span:first-child {
    white-space: nowrap;
    /* Prevent name wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
    /* Add ... for very long names if needed */
}


/* Inline timing sections in planet cards */
.inline-timing-section {
    padding: 8px 10px;
    margin: 5px 0 10px 0;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #667eea;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.inline-timing-section .timing-row {
    font-size: 0.85em;
    padding: 3px 0;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.inline-timing-section .timing-label {
    min-width: 70px;
    font-weight: 600;
    color: #4a5568;
}

.inline-timing-section .timing-value {
    font-size: 1em;
    padding: 2px 8px;
    background: #ffffff;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    color: #2d3748;
    font-weight: 600;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

/* STYLES FOR PANCHANGAM CARD */
.full-panchanga-section {
    padding: 0;
    background: none;
}

.panchanga-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9em;
}

.panchanga-row:last-child {
    border-bottom: none;
}

.panchanga-label {
    font-weight: 600;
    color: #666;
    min-width: 100px;
    flex-shrink: 0;
    padding-right: 10px;
}

.panchanga-value {
    font-weight: 500;
    color: #333;
    text-align: right;
    flex-grow: 1;
}

.panchanga-sub-value {
    font-size: 0.8em;
    color: #777;
    margin-top: 4px;
}

/* NEW: Style for the active panchanga item */
.active-panchanga-item {
    background-color: rgba(102, 126, 234, 0.1);
    /* Light blue background */
    border-left: 3px solid #667eea;
    /* Accent border */
    padding: 8px;
    margin: -5px -8px;
    /* Adjust padding/margin to fit nicely */
    border-radius: 4px;
}

.next-panchanga-item {
    margin-top: 12px;
    /* Increased margin to separate from highlighted block */
    padding-top: 8px;
    border-top: 1px dashed #ddd;
}

/* NEW: Styles for two-row panchanga timings */
.panchanga-time-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95em;
    margin-top: 2px;
    line-height: 1.3;
}

.panchanga-time-row span:first-child {
    font-weight: 600;
    color: #666;
    padding-right: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.panchanga-time-row span:last-child {
    font-family: 'Courier New', monospace;
    font-weight: 500;
    color: #333;
}

.next-panchanga-item {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #ddd;
}

/* END NEW STYLES */


/* Inline Karana List */
.panchanga-karana-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.panchanga-karana-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.panchanga-karana-item .panchanga-sub-value {
    margin-top: 0;
}


/* Grouped Nakshatra Pada Display */
.nakshatra-pada-container-timed {
    margin-top: 10px;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

/* NEW: Tight two-column layout for padas */
.pada-two-column-list {
    margin-top: 8px;
}

.pada-two-col-row {
    display: flex;
    align-items: flex-start;
    padding: 3px 4px;
    margin-bottom: 4px;
    gap: 8px;
    /* Minimal gap between columns */
    font-size: 0.8em;
    line-height: 1.3;
}

.pada-two-col-row[title] {
    cursor: help;
}

.pada-col-label {
    color: #666;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 55px;
}

.pada-col-times {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex-grow: 1;
}

.pada-time-line {
    font-family: 'Courier New', monospace;
    color: #333;
    font-size: 0.95em;
    line-height: 1.2;
}

.pada-two-col-row.active-pada {
    background-color: rgba(102, 126, 234, 0.15);
    font-weight: 700;
    border-radius: 3px;
}

.pada-two-col-row.active-pada .pada-col-label,
.pada-two-col-row.active-pada .pada-time-line {
    color: #333;
}

/* Legacy styles - keeping for backward compatibility */
.pada-chronological-list {
    margin-top: 8px;
}

.pada-row-compact {
    display: block;
    font-size: 0.8em;
    padding: 2px 4px;
    margin-bottom: 3px;
    line-height: 1.4;
}

.pada-row-compact[title] {
    cursor: help;
}

.pada-label-compact {
    color: #666;
    font-weight: 600;
    display: inline;
}

.pada-value-compact {
    font-family: 'Courier New', monospace;
    color: #333;
    font-weight: 500;
    display: inline;
    word-wrap: break-word;
}

.pada-row-compact.active-pada {
    background-color: rgba(102, 126, 234, 0.15);
    font-weight: 700;
    border-radius: 3px;
}

.pada-row-compact.active-pada .pada-label-compact,
.pada-row-compact.active-pada .pada-value-compact {
    color: #333;
}

/* Legacy pada styles - keeping for backward compatibility */
.pada-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75em;
    padding: 3px 4px;
    border-radius: 3px;
    margin-bottom: 2px;
}

.pada-row[title] {
    cursor: help;
}

.pada-label {
    color: #666;
    font-weight: 500;
    min-width: 160px;
}

.pada-value {
    font-family: 'Courier New', monospace;
    color: #333;
    font-weight: 500;
}

.pada-row.active-pada {
    background-color: rgba(102, 126, 234, 0.15);
    font-weight: 700;
}

.pada-row.active-pada .pada-label,
.pada-row.active-pada .pada-value {
    color: #333;
}

.footer {
    text-align: center;
    margin-top: 30px;
    color: #6c757d;
}

/* --- STYLES FOR DATE-RANGE PAGE --- */
.results-actions {
    margin-bottom: 20px;
}

.download-btn {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
}

.download-btn:hover {
    background: #218838;
}

.results-table-container {
    overflow-x: auto;
    margin-top: 25px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8em;
}

.results-table th,
.results-table td {
    border: 1px solid #dee2e6;
    padding: 8px 10px;
    text-align: left;
    white-space: nowrap;
}

.results-table thead {
    background-color: #e9ecef;
}

.results-table th {
    font-weight: 600;
    position: sticky;
    top: 0;
    background-color: #e9ecef;
    z-index: 1;
    /* Keep header above scrolling content */
}

.results-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}


/* --- STYLES FOR TRANSIT BUTTON --- */
.transit-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 3px 7px;
    font-size: 0.9em;
    cursor: pointer;
    margin-left: auto;
    /* Pushes it to the right */
    transition: all 0.2s ease;
    flex-shrink: 0;
    /* Prevent button shrinking */
}

.transit-btn:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
}


/* --- STYLES FOR MODAL POPUP --- */
.hidden {
    display: none !important;
    /* Use important to override potential conflicts */
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    /* Start hidden for transition */
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s linear;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    /* Wider for better table display */
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay:not(.hidden) .modal-content {
    transform: scale(1);
}


.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.8em;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

#transit-modal-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: #4a4a4a;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    padding-right: 30px;
    /* Space for close button */
}

#transit-modal-body {
    min-height: 100px;
}

/* --- STYLES FOR MODAL TABLE --- */
.transit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
    /* Slightly smaller for modal */
    margin-top: 10px;
}

.transit-table th,
.transit-table td {
    padding: 6px 8px;
    /* Slightly less padding */
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
    /* Align content to top */
}

.transit-table th {
    background-color: #f4f4f4;
    font-weight: 600;
    white-space: nowrap;
}

.transit-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Adjust column widths if needed */
.transit-table th:nth-child(1),
.transit-table td:nth-child(1) {
    width: 15%;
}

/* Type */
.transit-table th:nth-child(2),
.transit-table td:nth-child(2) {
    width: 45%;
    white-space: normal;
}

/* Event (allow wrap) */
.transit-table th:nth-child(3),
.transit-table td:nth-child(3) {
    width: 10%;
    text-align: center;
}

/* Retro */
.transit-table th:nth-child(4),
.transit-table td:nth-child(4) {
    width: 30%;
    white-space: nowrap;
}

/* Time */


.transit-section-title {
    /* No longer used for single table */
    /* display: none; */
}

.no-transit-data {
    color: #777;
    font-style: italic;
    text-align: center;
    padding: 20px;
}


/* --- STYLES FOR LOADING SPINNER --- */
.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 30px auto;
    /* More margin */
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- STYLES FOR NEW LAGNAM CARD --- */
.lagnam-list-container {
    font-size: 0.9em;
}

.lagnam-list-container .lagnam-name {
    font-weight: 500;
}

/* Override text-align for lagnam card's sub-value */
.lagnam-list-container .panchanga-sub-value {
    text-align: left;
}

/* Adjustments for nested panchanga-time-row */
.lagnam-list-container .panchanga-time-row {
    justify-content: flex-start;
    /* Align to left */
    gap: 10px;
    /* Add gap between label and value */
}

.lagnam-list-container .panchanga-time-row span:first-child {
    min-width: 60px;
    /* Give 'Start'/'End' a fixed width */
    flex-shrink: 0;
}

.lagnam-list-container .panchanga-time-row span:last-child {
    text-align: left;
    /* Align time to left */
}

/* Tweak active/next styles to remove negative margins and set padding */
.lagnam-list-container .active-panchanga-item {
    padding: 8px;
    margin: 0;
    border-radius: 4px;
    /* Already part of base class, but good to be sure */
}

.lagnam-list-container .next-panchanga-item {
    padding: 8px 8px 8px 5px;
    margin: 0;
    /* border-top is already part of base class */
}

/* --- END NEW LAGNAM STYLES --- */


/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .main-card {
        padding: 15px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .results-container {
        grid-template-columns: 1fr;
    }

    .planet-name-with-retrograde {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-right: 5px;
    }

    .retrograde-indicator {
        font-size: 0.65em;
        margin-left: 0;
    }

    .transit-btn {
        font-size: 0.8em;
        padding: 2px 5px;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
        padding: 15px;
    }

    #transit-modal-title {
        font-size: 1.1em;
    }

    .transit-table {
        font-size: 0.8em;
    }

    .transit-table th,
    .transit-table td {
        padding: 4px 6px;
    }
}

@media (max-width: 480px) {
    .timing-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .timing-value {
        margin-left: 0;
        text-align: left;
    }

    .modal-content {
        padding: 10px;
    }

    /* Fixed broken line here */
    .modal-close {
        top: 5px;
        right: 10px;
        font-size: 1.5em;
    }

    #transit-modal-title {
        font-size: 1em;
        padding-right: 25px;
    }

    .transit-table th,
    .transit-table td {
        white-space: normal;
    }

    /* Allow wrapping on small screens */
    .transit-table th:nth-child(4),
    .transit-table td:nth-child(4) {
        white-space: normal;
    }

    /* Allow Time wrapping */
}

/* --- ADVERTISING STYLES (Fixed Structure) --- */
/* --- ADVERTISING STYLES (Clean Image Display) --- */
.ad-container {
    /* Removed placeholder background/border */
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
    /* Prevents image spillover */
}

/* Helper to ensure images scale correctly */
.ad-img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

.ad-image-layer {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Position 1: Desktop Leaderboard (Hidden on Mobile) */
.ad-container-large-leaderboard {
    width: 728px;
    height: 90px;
    margin: 0 auto 20px auto;
    display: none;
    /* Hidden by default (mobile-first) */
}

/* Position 2 & 3: In-Content Medium Rectangle */
/* Inherits basic card styling but removes padding for edge-to-edge image */
.ad-container-medium-rectangle {
    width: 100%;
    min-height: 250px;
    max-width: 300px;
    padding: 0;
    /* Remove padding so image fills the card */
    margin: 0 auto;
    border: none;
    /* Remove border if you want just the image */
    background: transparent;
    /* Remove white background */
    box-shadow: none;
    /* Remove shadow for cleaner look, or keep if preferred */
}

/* Position 4: Mobile Sticky Ad (Hidden on Desktop) */
.ad-container.ad-container-sticky-mobile {
    display: none;
    /* Hidden on desktop */
    position: fixed !important;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    /* 50px image + buffer */
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    padding: 5px 0;
    border-top: 1px solid #ddd;
    backdrop-filter: blur(5px);
}

/* --- Responsive Media Queries for Ads --- */

/* Show Leaderboard on Desktop */
@media (min-width: 769px) {
    .ad-container-large-leaderboard {
        display: flex;
    }
}

/* Show Sticky Ad on Mobile */
@media (max-width: 768px) {
    .ad-container.ad-container-sticky-mobile {
        display: flex;
    }

    .ad-container-medium-rectangle {
        margin-bottom: 15px;
    }

    /* Add padding to body so sticky ad doesn't cover content */
    body {
        padding-bottom: 70px;
    }
}



.pushkara-container {
    margin-top: 6px;
    padding: 4px 6px;
    background-color: rgba(255, 215, 0, 0.15);
    border-radius: 4px;
    border-left: 3px solid #daa520;
    font-size: 0.9em;
}

.pushkara-row {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    color: #b8860b;
    display: flex;
    align-items: center;
}

.pushkara-row span {
    font-family: 'Courier New', monospace;
    color: #333;
    font-weight: 700;
}

/* --- PROFILE AVATAR STYLES --- */
/* --- FIXED PROFILE & CIRCLE IMAGE STYLES --- */

.profiles-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    /* Space between the two people */
    margin: 20px 0 25px 0;
    flex-wrap: wrap;
    /* Allows wrapping on very small screens */
}

.profile-item {
    display: flex;
    flex-direction: column;
    /* Stacks Image -> Name -> Designation vertically */
    align-items: center;
    /* Centers everything horizontally */
    text-align: center;
    /* Ensures text is centered */
    width: 220px;
    /* Fixed width to ensure text wraps nicely */
}

.profile-img {
    /* FORCE CIRCLE SHAPE */
    width: 90px;
    height: 90px;
    border-radius: 50% !important;
    /* The !important ensures it stays circular */

    /* Image Fit */
    object-fit: cover;

    /* Visual styling */
    border: 3px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
    /* Space between image and name */
    transition: transform 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
}

.profile-name {
    display: block;
    font-size: 0.95em;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
    margin-bottom: 4px;
}

.profile-designation {
    display: block;
    font-size: 0.8em;
    color: #666;
    font-weight: 500;
    line-height: 1.4;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .profiles-container {
        gap: 25px;
    }

    .profile-item {
        width: 100%;
        /* Full width on mobile so names don't squish */
        max-width: 260px;
    }
}

/* --- ADVERTISING ROTATOR STYLES --- */
.ad-container {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: #fff;
    /* White background behind images */
}

/* Ensure the image fills the container */
.ad-image-layer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* or cover, depending on preference */
    position: absolute;
    top: 0;
    left: 0;
    display: block;
}

/* The grid cells for the effect */
.checker-cell {
    position: absolute;
    background-color: #fff;
    /* Flash color during transition */
    opacity: 0;
    z-index: 10;
    transition: transform 0.4s ease-in, opacity 0.4s ease-in;
}