/* AP Temples Style Design System */
:root {
    --ap-orange: #FB8B24;
    --ap-maroon: #9A031E;
    --ap-dark-maroon: #40102E;
    --ap-cream: #FDF9F3;
    --ap-gray: #EFEFEF;
    --ap-text-dark: #222222;
    --ap-text-body: #444444;
    --ap-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.temple-body {
    background-color: #fff;
    color: var(--ap-text-body);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

/* Header Section */
.ap-header {
    display: block;
    position: sticky;
    top: 0;
    z-index: 2000;
    width: 100%;
    left: 0;
}

.ap-top-bar {
    background-color: var(--ap-orange);
    color: white;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.ap-logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ap-logo-box {
    background: transparent;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ap-logo-text-group {
    display: flex;
    flex-direction: column;
}

.ap-logo-main {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}

.ap-logo-sub {
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.ap-search-area {
    flex: 0 1 600px;
    position: relative;
    display: flex;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin: 0 20px;
}

.ap-search-area input {
    border: none;
    padding: 12px 15px;
    width: 100%;
    outline: none;
    font-size: 14px;
    color: #333;
}

.ap-search-area .search-btn {
    background: transparent;
    border: none;
    padding: 0 15px;
    color: #666;
    cursor: pointer;
    font-size: 16px;
}

.ap-top-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ap-social-links {
    display: flex;
    gap: 10px;
    margin-right: 10px;
}

.ap-social-links a {
    color: white;
    font-size: 14px;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.ap-social-links a:hover {
    opacity: 1;
}

.ap-utility-links {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    font-weight: 700;
    padding: 0 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.ap-utility-links .util-link {
    color: white;
    text-decoration: none;
    white-space: nowrap;
}

.ap-signin-btn {
    background-color: #9A031E;
    /* Maroon for high contrast as seen in screenshot */
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.ap-signin-btn:hover {
    background-color: #7a0218;
}

.mobile-menu-toggle,
.mobile-user-icon {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Mobile Sidebar Styling */
.mobile-nav-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 3000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.mobile-nav-sidebar.active {
    left: 0;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2999;
    display: none;
}

.mobile-nav-overlay.active {
    display: block;
}

.mobile-nav-header {
    background: var(--ap-orange);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-nav-logo {
    font-size: 20px;
    font-weight: 800;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
}

.mobile-nav-list li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid #eee;
}

.mobile-nav-list li a i {
    width: 20px;
    color: var(--ap-maroon);
}

.mobile-nav-list li.divider {
    height: 10px;
    background: #f5f5f5;
}

/* Maroon Nav Bar */
.ap-nav-bar {
    background-color: var(--ap-maroon);
    height: 45px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    width: 100%;
}

.ap-nav-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.ap-nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ap-nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 13.5px;
    transition: opacity 0.2s;
    letter-spacing: 0.3px;
}

.ap-nav-links a:hover {
    opacity: 0.7;
}

/* Horizontal Temple Slider */
.temple-icon-slider {
    padding: 30px 5%;
    background: white;
    border-bottom: 1px solid var(--ap-gray);
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    transition: transform 0.2s;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    /* Vertically center the image and name together */
}

.icon-item:hover {
    transform: translateY(-5px);
}

.icon-img-wrapper {
    width: 80px;
    height: 80px;
    min-width: 80px;
    min-height: 80px;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid var(--ap-orange);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.icon-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--ap-text-dark);
    text-align: center;
    width: 100%;
    line-height: 1.3;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 32px;
    /* Fixed height for 2 lines of text ensures all names align on the same plane */
    overflow: hidden;
    word-wrap: break-word;
}

/* Decorative Hero Banner */
.ap-hero-banner {
    background: linear-gradient(135deg, #a02222 0%, #d85d2d 50%, #a02222 100%);
    padding: 20px 0;
    display: flex;
    justify-content: center;
    border-bottom: 5px solid #fff;
    position: relative;
    overflow: hidden;
    height: 350px;
    /* Maintains visual presence even when empty */
}

.ap-hero-banner::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 20px;
    right: 20px;
    bottom: 10px;
    border: 3px solid #f99d1c;
    border-radius: 120px;
    /* Traditional arch shape approximation */
    pointer-events: none;
}

.banner-inner {
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 1;
}

.banner-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 40px 0;
}

.banner-text-left,
.banner-text-right {
    text-align: center;
    color: white;
}

.telugu-text,
.english-text {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.telugu-text {
    font-family: 'Inter', sans-serif;
    /* Placeholder for Telugu if font not loaded */
}

.banner-emblem {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.emblem-circle {
    width: 140px;
    height: 140px;
    background: #fff;
    border: 5px solid #f99d1c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 70px;
    color: #f99d1c;
    box-shadow: 0 0 20px rgba(249, 157, 28, 0.4);
}

.emblem-text {
    color: white;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
}

/* Refined News Section */
.news-section {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 12px 2%;
}

.news-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.news-label {
    background: transparent;
    color: var(--ap-maroon);
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 20px;
    border-right: 1px solid #ddd;
    padding-right: 20px;
}

.news-marquee-box {
    flex: 1;
}

.news-marquee-box marquee {
    font-size: 13px;
    font-weight: 600;
    color: var(--ap-text-dark);
}

.news-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 20px;
}

.click-link {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.click-link a {
    color: #0066cc;
    text-decoration: none;
}

.view-all-btn {
    background: var(--ap-maroon);
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* Devotee Services Grid */
.devotee-services {
    padding: 60px 5%;
    background-color: var(--ap-cream);
    text-align: center;
}

.section-title {
    font-size: 32px;
    color: var(--ap-maroon);
    margin-bottom: 40px;
    font-weight: 800;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--ap-orange);
    margin: 15px auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--ap-shadow);
    transition: transform 0.3s;
    border-bottom: 5px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--ap-orange);
}

.service-icon {
    font-size: 50px;
    color: var(--ap-maroon);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--ap-text-dark);
}

.service-btn {
    background: var(--ap-maroon);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

/* Responsive adjustments */
/* Footer section */
.ap-footer {
    background-color: var(--ap-dark-maroon);
    color: white;
    padding: 60px 5% 30px;
}

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

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 25px;
    color: var(--ap-orange);
    text-transform: uppercase;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 992px) {
    .ap-search-area {
        display: none;
    }

    .hero-content h2 {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .ap-top-bar {
        padding: 0 15px;
    }

    .mobile-menu-toggle,
    .mobile-user-icon {
        display: block;
    }

    .ap-search-area,
    .ap-top-right,
    .ap-nav-bar {
        display: none;
    }

    .ap-logo-main {
        font-size: 18px;
    }

    .ap-logo-box {
        font-size: 28px;
    }

    .ap-header {
        height: auto;
    }
}

/* Temple List Page Styles */
.temple-list-main {
    background-color: #f8f9fa;
    min-height: 80vh;
    padding: 20px 2%;
}

.ap-breadcrumbs {
    font-size: 13px;
    color: var(--ap-maroon);
    margin-bottom: 20px;
    font-weight: 600;
}

.ap-breadcrumbs a {
    color: #cc4400;
    text-decoration: none;
}

.ap-breadcrumbs span {
    color: #444;
}

.list-layout-container {
    display: flex;
    gap: 30px;
}

.list-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.filter-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
}

.filter-header h3 {
    margin: 0 0 20px 0;
    color: var(--ap-maroon);
    font-size: 20px;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title-row .section-title {
    color: #d32f2f;
    font-weight: 700;
    font-size: 15px;
}

.clear-btn {
    font-size: 12px;
    color: #999;
    text-decoration: none;
}

.filter-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.filter-pill.active {
    background: #eee;
    border-color: #ccc;
}

.list-content {
    flex: 1;
}

.list-title {
    font-size: 26px;
    color: #333;
    margin: 0 0 25px 0;
}

.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    background: #fff;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 50px;
    margin-bottom: 25px;
    justify-content: center;
}

.alpha-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 12px;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    border-radius: 50%;
}

.alpha-btn.active {
    background: var(--ap-maroon);
    color: white;
}

.alphabet-filter .alpha-btn:first-child {
    width: auto;
    padding: 0 15px;
    border-radius: 20px;
}

.search-sort-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-count {
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.list-search-box {
    position: relative;
    width: 400px;
}

.list-search-box input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid #333;
    border-radius: 4px;
    outline: none;
    font-weight: 600;
}

.list-search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

.temple-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.temple-card-item {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.temple-card-item:hover {
    transform: translateY(-5px);
}

.card-image-box {
    height: 220px;
    position: relative;
    background: linear-gradient(135deg, #f99d1c, #cc4400);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sunburst-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
}

.card-emblem {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #f99d1c;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.card-footer {
    padding: 12px 15px 15px;
    display: flex;
    flex-direction: column;
}

.card-top-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    /* Small gap to main title */
}

.card-top-row img {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #eee;
}

.card-top-row span {
    font-size: 13px;
    color: #444;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-main-title {
    font-size: 15px;
    font-weight: 700;
    color: #000;
    line-height: 1.3;
    display: block;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-address {
    font-size: 13px;
    color: #777;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.card-bottom-row {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-time-status {
    color: #888;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f8f8f8;
    border-radius: 50%;
    border: 1px solid #eee;
}

.card-time-status i {
    font-size: 14px;
}

.visit-link {
    color: var(--ap-maroon, #9A031E);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.visit-link:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.visit-link::after {
    content: '\f0a9';
    /* fa-arrow-circle-right */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 14px;
}

@media (max-width: 992px) {
    .list-layout-container {
        flex-direction: column;
    }

    .list-sidebar {
        width: 100%;
    }

    .list-search-box {
        width: 100%;
    }

    .search-sort-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}