/* Import Mandali font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Ramabhadra&display=swap');

/* Custom News Portal Styles */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* General Styles */
body {
    font-family: 'Ramabhadra', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Global Typography Adjustments */

/* Headings */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.75rem;
    font-weight: 600;
}

h4 {
    font-size: 1.5rem;
    font-weight: 500;
}

h5 {
    font-size: 1.25rem;
    font-weight: 500;
}

h6 {
    font-size: 1rem;
    font-weight: 500;
}

/* Paragraphs */
p {
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.6;
}

/* Links */
a {
    font-weight: 500;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Small Text */
small {
    font-size: 0.875rem;
    font-weight: 400;
}

/* Header Styles */
.top-bar {
    font-size: 0.875rem;
}

.main-header {
    border-bottom: 1px solid #eee;
}

.logo h3 {
    font-weight: bold;
}

/* Mobile-only: show search bar on click */
@media (max-width: 767.98px) {
    #subscribeBtn {
        display: none !important;
    }

    #desktopSearchForm {
        display: none !important;
    }

    #mobileSearchIcon {
        display: inline-block !important;
    }
}

@media (min-width: 768px) {
    #mobileSearchIcon,
    #mobileSearchForm {
        display: none !important;
    }
}

/* Mobile search form toggle */
#mobileSearchModal input::placeholder {
    font-style: italic;
}
.modal-content {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.main-header {
    border-bottom: 1px solid #e0e0e0;
}

.hover-underline:hover {
    text-decoration: underline;
    color: #ff0000 !important;
}

@media (max-width: 767.98px) {
    .carousel-item .position-relative {
        height: 250px !important;
    }

    .carousel-item h3 {
        font-size: 1.1rem;
    }

    .carousel-caption p {
        font-size: 0.85rem;
    }

    /* Clamp title to 2 lines with ellipsis */
    .clamp-2-lines {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Dots (indicators) at bottom center */
.carousel-indicators {
    position: static;
    margin-top: 0px;
    justify-content: center;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #999;
    opacity: 0.6;
    margin: 0 5px;
    transition: opacity 0.3s;
}

.carousel-indicators .active {
    background-color: #0d6efd;
    opacity: 1;
}

.custom-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, transform 0.3s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.custom-arrow:hover {
    background-color: rgba(13, 110, 253, 0.9); /* Bootstrap primary */
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev.custom-arrow {
    left: 15px;
}

.carousel-control-next.custom-arrow {
    right: 15px;
}

.custom-arrow i {
    font-size: 1.2rem;
}

/* Breaking News Ticker */
.breaking-news {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    background: #dc3545;
    color: white;
    padding: 8px 0;
    margin-bottom: 20px;
    z-index: 10;
}

.breaking-news-label {
    background: #fff;
    color: #dc3545;
    padding: 4px 12px;
    font-weight: bold;
    margin-right: 15px;
    border-radius: 3px;
    font-size: 0.9rem;
}

.news-ticker {
    display: inline-block;
    animation: scroll-left 30s linear infinite;
    line-height: 1.4;
}

.ticker-item {
    margin-right: 50px;
    color: white;
    text-decoration: none;
}

.ticker-item:hover {
    color: #ffeb3b;
    text-decoration: underline;
}

@keyframes scroll-left {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Navigation */
.scrolling-navbar {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    background-color: white;
}

.scrolling-navbar::-webkit-scrollbar {
    display: none;
}

.scrolling-navbar .nav-item:not(:last-child) {
    border-right: 1px solid #ccc; /* vertical line */
    margin-right: 10px;
    padding-right: 10px;
}

.scrolling-navbar .nav-item:last-child {
    border-right: none;
}

.scrolling-navbar .nav-link {
    color: black !important;
    font-weight: 500;
    display: inline-block;
    padding: 0;
    transition: color 0.3s ease;
    font-family: 'Noto Sans Telugu', sans-serif;
    font-size: 16px;
}

.scrolling-navbar .nav-link:hover {
    color: #0d6efd !important;
    text-decoration: none;
}

/* News Cards */
.news-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-card .card-img-top {
    transition: transform 0.3s ease;
}

.news-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Section Headers */
.section-title {
    color: var(--primary-color);
    font-weight: bold;
    position: relative;
}

.section-line {
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), transparent);
}

/* Sidebar */
.sidebar-section {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1.5rem;
}

.sidebar-title {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

/* News Detail Page */
.news-detail-image {
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.news-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.news-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.news-meta {
    background: var(--light-color);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

/* Tags */
.news-tags .badge {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Share Buttons */
.share-buttons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.share-buttons a:hover {
    transform: scale(1.1);
}

.share-facebook { background-color: #3b5998; }
.share-twitter { background-color: #1da1f2; }
.share-whatsapp { background-color: #25d366; }
.share-linkedin { background-color: #0077b5; }

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: var(--secondary-color);
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Newsletter Section */
.newsletter-signup {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

/* Footer */
.footer {
    background: var(--dark-color) !important;
}

.footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .featured-news-item .carousel-caption h3 {
        font-size: 1.2rem;
    }

    .breaking-news {
        padding: 6px 0;
        margin-bottom: 15px;
    }

    .breaking-news-label {
        font-size: 0.8rem;
        padding: 3px 8px;
        margin-right: 10px;
    }

    .news-ticker {
        animation-duration: 20s;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .news-card .card-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .top-bar {
        font-size: 0.75rem;
    }

    .main-header .row > div {
        text-align: center !important;
        margin-bottom: 1rem;
    }

    .main-header .row > div:last-child {
        margin-bottom: 0;
    }

    .carousel-caption {
        position: static;
        color: inherit;
        padding: 1rem;
        background: rgba(0, 0, 0, 0.8) !important;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Back to top button animation */
.back-to-top {
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.back-to-top.show {
    transform: translateY(0);
    opacity: 1;
}

/* Video Ad Styling */
.video-ad-container {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.video-ad-container h6 {
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-align: center;
}

.video-ad-container iframe {
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}


.recent-news-list .list-group-item:not(:last-child) {
        border-bottom: 1px dotted #ccc !important;
    }