/* 
 * PARTHANA PREMIUM PANCHANG CSS
 * Modern, beautiful, robust layout.
 * TYPOGRAPHY SYNCHRONIZED WITH KUNDLI.PHP
 */

.parthana-panchang {
    background: #f8f9fa;
    padding: 40px 0;
    font-family: 'Inter', sans-serif; /* Matches Kundli */
    color: #333;
    font-size: 16px; /* Matches Kundli body default */
    line-height: 1.5; /* Standard readable line-height */
}

/* Header Nav */
.p-header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.p-loc-selector {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #e65100;
}

.loc-icon { font-size: inherit; }

.p-btn-small {
    background: #fff3e0;
    color: #e65100;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    font-size: inherit;
}
.p-btn-small:hover { background: #ffe0b2; }

#loc-search-box {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 100;
    width: 280px;
}
.p-input {
    width: 100%;
    padding: 12px; /* Matches Kundli input padding */
    border: 1px solid #ddd;
    border-radius: 4px; /* Matches Kundli input border-radius */
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 15px; /* Matches Kundli input font-size */
}
.p-input:focus { border-color: #ff9800; }
.p-autocomplete-results {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
}
.p-autocomplete-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}
.p-autocomplete-item:hover { background: #fdf5e6; color: #e65100; }

.p-date-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}
.p-btn-nav {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    font-size: inherit;
}
.p-btn-nav:hover { background: #fdf5e6; border-color: #ff9800; color: #e65100; }
.p-input-date {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-weight: 600;
    color: #333;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: inherit;
}

/* Loader */
.p-loader {
    text-align: center;
    padding: 60px 20px;
}
.p-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #fdf5e6;
    border-top: 4px solid #ff9800;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Summary Card */
.p-summary-card {
    background: linear-gradient(135deg, #ff9800 0%, #e65100 100%);
    color: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(230, 81, 0, 0.2);
    position: relative;
    overflow: hidden;
    text-align: center; /* Center to match Kundli header style slightly */
}
.p-summary-card::after {
    content: 'ॐ';
    position: absolute;
    right: -20px;
    bottom: -40px;
    font-size: 150px;
    opacity: 0.1;
    pointer-events: none;
}
.p-summary-header {
    margin-bottom: 25px;
}
.p-summary-header h2 {
    font-size: 32px; /* Matches Kundli main title size */
    margin: 0 0 5px 0;
    font-weight: 700;
    color: white;
}
.p-summary-header h3 {
    font-size: 16px; /* Matches Kundli subtitle size */
    margin: 0;
    font-weight: 400; /* Normal weight like Kundli description */
    opacity: 0.9;
    color: white;
}

.p-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    text-align: left; /* Keep grid left aligned */
}
.sum-item {
    display: flex;
    flex-direction: column;
}
/* Matches Kundli Label System: Bold Label, Normal Value */
.sum-item span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600; /* Bold label */
    margin-bottom: 5px;
}
.sum-item strong {
    font-weight: 400; /* Normal value */
}
.p-info-text {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
    line-height: 1.2;
    display: block;
}

/* Main Grid Layout */
.p-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 40px;
}
@media (max-width: 991px) {
    .p-main-grid { grid-template-columns: 1fr; }
}
.p-col {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Cards (matches Kundli .result-card) */
.p-card {
    background: #fff;
    border: 1px solid #eee; /* Match Kundli result-card */
    border-radius: 8px; /* Match Kundli result-card border-radius */
    box-shadow: 0 2px 10px rgba(0,0,0,0.03); /* Match Kundli box-shadow */
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.p-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}
.p-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 25px 25px 10px 25px; /* Adjust padding to match Kundli card */
}
.p-card-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: #fdf5e6;
    color: #e65100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem; /* Keep icon size */
}
.p-card-header h3 {
    margin: 0;
    font-weight: bold; /* Default h3 weight */
    color: #333; /* Matches Kundli card heading */
    border-bottom: 2px solid #ff9800; /* Similar to Kundli's red border */
    padding-bottom: 10px;
    flex-grow: 1; /* Stretch to fill */
}
.p-card-body {
    padding: 10px 25px 25px 25px;
}

/* List Items (Matches Kundli .data-item) */
.p-list-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 8px; /* Match Kundli padding-bottom */
    margin-bottom: 8px;
    border-bottom: 1px solid #f1f1f1; /* Match Kundli border */
}
.p-list-item:last-child { 
    border-bottom: none; 
    margin-bottom: 0; 
    padding-bottom: 0;
}
.p-list-label { color: #555; font-weight: bold; } /* Match Kundli label (strong) */
.p-list-val { color: #333; font-weight: normal; } /* Match Kundli value */

/* Grid specific for sun/moon */
.sm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.sm-item {
    background: #fdf5e6;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}
/* Flip weights to match Kundli */
.sm-item span {
    display: block;
    color: #555;
    font-weight: bold;
    margin-bottom: 5px;
}
.sm-item strong {
    font-weight: normal;
    color: #333;
}

/* Muhurats */
.p-muhurat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.p-muhurat-item:last-child { margin-bottom: 0; }
.p-muhurat-item.shubh { background: #f1f8e9; color: #2e7d32; border-left: 4px solid #43a047; }
.p-muhurat-item.ashubh { background: #ffebee; color: #c62828; border-left: 4px solid #e53935; }
.p-muhurat-title { font-weight: bold; }
.p-muhurat-time { font-weight: normal; }

/* Tabs for Choghadiya/Hora */
.p-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: #f5f5f5;
    padding: 5px;
    border-radius: 8px;
}
.p-tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Inter', sans-serif;
    font-size: inherit;
}
.p-tab-btn.active {
    background: white;
    color: #e65100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Table */
.p-table {
    width: 100%;
    border-collapse: collapse;
}
.p-table th, .p-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #f1f1f1;
}
.p-table th {
    color: #555;
    font-weight: bold;
}
.p-table td {
    font-weight: normal;
    color: #333;
}
.p-table td.shubh { color: #2e7d32; }
.p-table td.ashubh { color: #c62828; }
.p-table td.neutral { color: #1565c0; }

/* Festivals */
.fest-item {
    padding: 15px;
    background: #fff8e1;
    border-left: 4px solid #ffa000;
    border-radius: 8px;
    margin-bottom: 15px;
}
.fest-item strong {
    display: block;
    color: #e65100;
    font-weight: bold;
    margin-bottom: 5px;
}
.fest-item p {
    margin: 0;
    color: #333;
}
.fest-none {
    color: #777;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.upcoming-fest-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.upcoming-fest-list li {
    display: flex;
    gap: 15px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f1f1;
}
.upcoming-fest-list li:last-child { border-bottom: none; }
.fest-date {
    background: #fdf5e6;
    color: #e65100;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: bold;
    white-space: nowrap;
}
.fest-name {
    color: #333;
    align-self: center;
}

/* Services Banner */
.p-services-banner {
    text-align: center;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}
.p-services-banner h3 {
    margin-bottom: 30px;
    font-weight: bold;
    color: #333;
}
.p-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.p-service-card {
    background: white;
    padding: 30px 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    text-decoration: none;
    transition: 0.3s;
    display: block;
}
.p-service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(230, 81, 0, 0.15);
    border-color: #ffcc80;
}
.p-service-card .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}
.p-service-card h4 {
    color: #e65100;
    font-weight: bold;
    margin-bottom: 5px;
}
.p-service-card p {
    color: #555;
    margin: 0;
}

/* Mobile Typography Overrides to match Kundli */
@media (max-width: 768px) {
    .p-summary-header h2 {
        font-size: 24px; /* Slightly smaller on mobile, matches Kundli mobile heading logic */
    }
    .p-summary-header h3 {
        font-size: 14px;
    }
    .parthana-panchang {
        font-size: 14px; /* Kundli generally scales down to 14px on smaller screens for lists */
    }
    .p-card-header h3 {
        font-size: 18px;
    }
    .p-input {
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    .parthana-panchang, .parthana-panchang * {
        visibility: visible;
    }
    .parthana-panchang {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    .p-header-nav, .p-services-banner, .p-btn, .p-btn-small, .p-btn-nav, header, footer, #preloader, #loc-search-box {
        display: none !important;
    }
    .p-card, .p-summary-card {
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
    .p-main-grid {
        display: block;
    }
    .p-col {
        width: 100%;
    }
}

.p-muhurat-help {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.8em;
    font-weight: normal;
}
.p-muhurat-help summary {
    cursor: pointer;
    color: #007bff;
    font-weight: bold;
}
.p-muhurat-meta {
    font-size: 0.85em;
    color: #666;
    margin-top: 4px;
}
.m-status {
    font-weight: bold;
    margin-left: 10px;
}
.m-status.current { color: #2e7d32; }
.m-status.ended { color: #c62828; }
.m-status.upcoming { color: #1976d2; }

/* Timeline */
.p-timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid #e0e0e0;
    margin-top: 10px;
}
.p-timeline-item {
    position: relative;
    margin-bottom: 20px;
}
.p-timeline-item::before {
    content: "";
    position: absolute;
    left: -26px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #b12a2a;
}
.t-time {
    font-size: 0.9em;
    color: #555;
}
.t-title {
    font-weight: bold;
    color: #333;
}


/* Zodiac Predictor */
.zodiac-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 12px;
    padding: 10px;
    background: #fafafa;
}
.zodiac-header {
    display: flex;
    align-items: center;
    font-size: 1.1em;
    font-weight: bold;
    color: #b12a2a;
    margin-bottom: 8px;
}
.zodiac-symbol {
    font-size: 1.4em;
    margin-right: 8px;
}
.zodiac-name-sanskrit {
    font-size: 0.85em;
    color: #666;
    margin-left: 6px;
    font-weight: normal;
}
.zodiac-cat {
    margin-bottom: 6px;
    font-size: 0.9em;
    line-height: 1.4;
}
.zodiac-cat strong {
    color: #333;
}

