/* Home Page Custom Styles - Maritime Tickers Design */

/* Site Name Header Styling */
.site-name-header {
    font-family: 'Playfair Display', 'Times New Roman', serif !important;
    font-style: italic !important;
    font-weight: 400 !important;
    color: #1e40af !important;
    text-align: center !important;
    letter-spacing: -1px !important;
    text-shadow: none !important;
    margin-bottom: 0.5rem !important;
}

.card {
    transition: all 0.3s ease;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.img-fluid {
    transition: transform 0.3s ease;
}

.img-fluid:hover {
    transform: scale(1.05);
}

/* Hero Section */
.hero-overlay {
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

/* Latest News Hero Section Styling */
.hero-side-news-container {
    height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 123, 255, 0.3) transparent;
}

.hero-side-news-container::-webkit-scrollbar {
    width: 6px;
}

.hero-side-news-container::-webkit-scrollbar-track {
    background: transparent;
}

.hero-side-news-container::-webkit-scrollbar-thumb {
    background: rgba(0, 123, 255, 0.3);
    border-radius: 3px;
}

.hero-side-news-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 123, 255, 0.5);
}

.hero-side-news-container .card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.hero-side-news-container .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    border-color: rgba(0, 123, 255, 0.2);
}

.hero-side-news-container .card-title:hover {
    color: #002751 !important;
}

.hero-side-news-container .card-body {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* Ensure card titles are always visible */
.hero-side-news-container .card-title {
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
}

/* Main News Enhancement */
.hero-container .col-lg-8 .position-relative:hover img {
    transform: scale(1.02);
    transition: transform 0.5s ease;
}

/* Section Headers */
h3.text-center {
    position: relative;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2rem;
}

h3.text-center::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #002751;
}

/* Podcast Banner */
.podcast-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    overflow: hidden;
}

/* News Cards */
.news-card {
    border-radius: 10px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.news-card .card-img-top {
    border-radius: 0;
    transition: transform 0.3s ease;
}

.news-card:hover .card-img-top {
    transform: scale(1.02);
}

/* Category Badge */
.category-badge {
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(5px);
    border: none;
    font-weight: 500;
    font-size: 11px;
    padding: 4px 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Grid */
@media (max-width: 768px) {
    .col-lg-8 .img-fluid,
    .col-lg-4 .img-fluid {
        height: 200px !important;
    }
    
    h3.text-center {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .podcast-banner h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .col-lg-8 .img-fluid {
        height: 250px !important;
    }
    
    .col-lg-4 .img-fluid {
        height: 150px !important;
    }
    
    .news-card .card-img-top {
        height: 180px !important;
    }
}

/* Text Overlays */
.overlay-text {
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.overlay-text h2,
.overlay-text h5,
.overlay-text h6 {
    text-shadow: 0 2px 4px rgba(0,0,0,0.7);
}

/* Loading Animation */
.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Hover Effects */
.news-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.news-link:hover {
    color: #002751 !important;
    text-decoration: none;
}

/* Section Spacing */
.section-spacing {
    padding: 3rem 0;
}

.section-spacing:nth-child(even) {
    background-color: #f8f9fa;
}

/* Animate on scroll effects */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* News Grid Improvements */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Card Title Typography */
.card-title {
    font-weight: 600;
    line-height: 1.4;
    color: #2c3e50;
}

.card-title:hover {
    color: #002751;
}

/* Dynamic Category Containers with Alternating Colors */
.category-container-white {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 123, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.category-container-blue {
    background: linear-gradient(135deg, #002751 0%, #002751 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.25);
}

.category-container-blue h3,
.category-container-blue h4,
.category-container-blue h5,
.category-container-blue h6,
.category-container-blue .card-title,
.category-container-blue .text-white {
    color: white !important;
}

.category-container-blue .news-card {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.category-container-blue .news-card .card-title,
.category-container-blue .news-card .news-link {
    color: #2c3e50 !important;
}

.category-container-black {
    background: linear-gradient(135deg, #343a40 0%, #212529 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.category-container-black h3,
.category-container-black h4,
.category-container-black h5,
.category-container-black h6,
.category-container-black .card-title,
.category-container-black .text-white {
    color: white !important;
}

.category-container-black .news-card {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.category-container-black .news-card .card-title,
.category-container-black .news-card .news-link {
    color: #2c3e50 !important;
}

/* Common styling for all category containers */
.category-container-white,
.category-container-blue,
.category-container-black {
    padding: 4rem 0;
    margin: 2rem 0;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.category-container-white::before,
.category-container-blue::before,
.category-container-black::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    50% { left: 0%; }
    100% { left: 100%; }
}

/* Subcategory styling */
.subcategories-wrapper {
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
}

.category-container-white .subcategories-wrapper {
    border-top-color: rgba(0, 123, 255, 0.2);
}

.subcategory-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.subcategory-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #002751, #002751);
}

.category-container-blue .subcategory-section::before {
    background: linear-gradient(135deg, #ffffff, rgba(255, 255, 255, 0.7));
}

.category-container-black .subcategory-section::before {
    background: linear-gradient(135deg, #ffffff, rgba(255, 255, 255, 0.7));
}

.category-container-white .subcategory-section {
    background: rgba(0, 123, 255, 0.05);
    border: 1px solid rgba(0, 123, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.1);
}

.category-container-blue .subcategory-section {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.category-container-black .subcategory-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.subcategory-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.subcategory-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #002751, #002751);
    border-radius: 2px;
}

.category-container-blue .subcategory-title::after {
    background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.7));
}

.category-container-black .subcategory-title::after {
    background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.7));
}

/* Subcategory hover effects */
.subcategory-section:hover {
    transform: translateY(-3px);
    transition: all 0.3s ease;
}

.category-container-white .subcategory-section:hover {
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.2);
}

.category-container-blue .subcategory-section:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.category-container-black .subcategory-section:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Badge styling for subcategories */
.subcategory-section .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
}

/* News card enhancements for subcategories */
.subcategory-section .news-card {
    border: none;
    transition: all 0.3s ease;
}

.subcategory-section .news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .category-container-white,
    .category-container-blue,
    .category-container-black {
        padding: 2rem 0;
        margin: 1rem 0;
    }
    
    .subcategory-section {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .subcategories-wrapper {
        padding-top: 1.5rem;
        margin-top: 2rem;
    }
    
    .subcategory-title {
        font-size: 1.1rem;
    }
    
    /* Hero section mobile fixes */
    .hero-side-news-container {
        height: auto;
        max-height: none;
        margin-top: 20px;
    }
    
    .hero-side-news-container .col-12 {
        margin-bottom: 15px;
    }
    
    .hero-side-news-container .card .row.g-0 {
        min-height: 80px;
    }
    
    .hero-side-news-container .card-title {
        font-size: 14px !important;
        line-height: 1.2 !important;
    }
    
    .hero-side-news-container .card-body {
        padding: 10px !important;
    }
}

@media (max-width: 576px) {
    /* Extra small screens - improve latest news layout */
    .hero-container .col-lg-8,
    .hero-container .col-lg-4 {
        margin-bottom: 20px;
    }
    
    .hero-side-news-container .card .col-5 {
        flex: 0 0 35%;
    }
    
    .hero-side-news-container .card .col-7 {
        flex: 0 0 65%;
    }
    
    .hero-side-news-container .card-title {
        font-size: 13px !important;
    }
    
    .hero-side-news-container .card-body {
        padding: 8px !important;
    }
    
    /* Subcategory mobile adjustments */
    .subcategory-section {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .subcategories-wrapper {
        padding-top: 1rem;
        margin-top: 1.5rem;
    }
    
    .subcategory-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .subcategory-section .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}