/* Custom CSS for Movie News Hub */

/* Custom Properties */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --info-color: #17a2b8;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #2c3e50;
    --text-muted: #7f8c8d;
    --border-color: #bdc3c7;
    --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 25px rgba(0,0,0,0.2);
    --transition: all 0.3s ease;
}

/* Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    padding: 10px 20px;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-outline-primary {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.card-header {
    background: var(--light-color);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-color) !important;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--secondary-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* Hero Sections */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

/* News Cards */
.news-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card .card-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.news-card .card-title a:hover {
    color: var(--secondary-color);
}

.news-card .btn {
    margin-top: auto;
}

/* Category Cards */
.category-card {
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.category-icon i {
    transition: var(--transition);
    color: var(--accent-color);
}

.category-card:hover .category-icon i {
    transform: scale(1.1);
    color: var(--secondary-color);
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-header h1 {
    color: var(--primary-color);
    line-height: 1.2;
}

.article-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.article-image img {
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}

.content-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* Sidebar */
.sidebar .widget {
    position: sticky;
    top: 100px;
}

.recent-news-item {
    transition: var(--transition);
    border-radius: 8px;
}

.recent-news-item:hover {
    background-color: var(--light-color);
    transform: translateX(5px);
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 60px 0 20px;
}

.footer h5 {
    color: var(--accent-color);
    font-weight: 600;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: white;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

/* Scroll to Top Button */
#scrollToTop {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--secondary-color);
    border: none;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
}

#scrollToTop:hover {
    background: #c0392b;
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .sidebar .widget {
        position: static;
    }
    
    .hero-section {
        padding: 100px 0 60px;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 80px 0 40px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    opacity: 0.3;
    font-size: 4rem;
    color: var(--text-muted);
}

/* Form Elements */
.form-control:focus,
.form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
}

.badge.bg-outline-primary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.badge.bg-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--shadow-medium);
}

.transition-custom {
    transition: var(--transition);
}

/* Fix hero section layout */
.hero.section {
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
    min-height: 400px;
}

.hero.section img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero.section .container {
    position: relative;
    z-index: 2;
}

.hero.section h2 {
    color: #ffffff;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero.section h2 span {
    color: var(--accent-color);
}

.hero.section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Home page hero section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section p {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-section .text-warning {
    color: #ffc107 !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-section img {
    border: 4px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.hero-section img:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Fix news section layout */
.news.section {
    padding: 80px 0;
    background-color: var(--background-color);
}

.news-item {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 25px;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-item .post-img {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.news-item .post-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover .post-img img {
    transform: scale(1.05);
}

.news-item .post-category {
    background: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 15px;
}

.news-item .title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-item .title a {
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-item .title a:hover {
    color: var(--accent-color);
}

.news-item .post-meta {
    margin-bottom: 15px;
}

.news-item .post-author {
    color: var(--accent-color);
    font-weight: 600;
    margin: 0;
    font-size: 0.9rem;
}

.news-item .post-date {
    color: var(--default-color);
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.7;
}

.news-item .post-summary {
    color: var(--default-color);
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.8;
}

.news-item .movie-info {
    background: rgba(0, 0, 0, 0.03);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.news-item .readmore {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.news-item .readmore:hover {
    color: var(--heading-color);
    transform: translateX(5px);
}

/* Fix header and navigation */
.header {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header .logo h1 {
    color: var(--accent-color) !important;
    font-weight: 700;
}

.navmenu a {
    font-weight: 500;
    position: relative;
}

.navmenu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navmenu a:hover::after,
.navmenu a.active::after {
    width: 100%;
}

/* Fix mobile navigation */
@media (max-width: 1199px) {
    .mobile-nav-toggle {
        display: block !important;
    }
    
    .navmenu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--surface-color);
        transition: right 0.3s ease;
        z-index: 9999;
    }
    
    .mobile-nav-active .navmenu {
        right: 0;
    }
    
    .navmenu ul {
        padding: 80px 20px 20px;
        margin: 0;
    }
    
    .navmenu li {
        margin-bottom: 15px;
    }
    
    .navmenu a {
        padding: 12px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
}

/* Fix container spacing */
.container-fluid.container-xl {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Fix footer */
.footer {
    margin-top: 0;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .hero.section h2 {
        font-size: 2rem;
    }
    
    .hero.section p {
        font-size: 1rem;
    }
    
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    .hero-section p {
        font-size: 1rem !important;
    }
    
    .news-item {
        padding: 20px;
    }
    
    .news-item .title {
        font-size: 1.1rem;
    }
}

/* Fix AOS animations */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* Fix scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Fix button styles */
.btn-primary {
    background-color: var(--secondary-color);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-light {
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-light:hover {
    background-color: #ffffff;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
    background-color: transparent;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Fix card shadows */
.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

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

/* Section styling */
.section-subtitle {
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Additional fixes for layout issues */
.section {
    position: relative;
}

.dark-background {
    background-color: #060606;
    color: #ffffff;
}

.light-background {
    background-color: #f3f4f4;
}

/* Fix spacing issues */
.row.gy-4 > * {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* Fix image display */
.img-fluid {
    max-width: 100%;
    height: auto;
}

/* Fix text overflow */
.title a {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Fix mobile layout */
@media (max-width: 576px) {
    .hero.section {
        padding: 80px 0 60px;
        min-height: 300px;
    }
    
    .hero.section h2 {
        font-size: 1.8rem;
    }
    
    .hero-section {
        padding: 80px 0 60px;
    }
    
    .hero-section h1 {
        font-size: 1.8rem !important;
    }
    
    .news.section {
        padding: 60px 0;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Fix navigation active state */
.navmenu a.active {
    color: var(--accent-color) !important;
}

/* Fix mobile nav toggle positioning */
.mobile-nav-toggle {
    position: relative;
    z-index: 10000;
}

/* Fix hero image overlay */
.hero.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero.section .container {
    z-index: 3;
}

/* Color variables for home page */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --text-color: #2c3e50;
    --light-bg: #f8f9fa;
    --border-color: #e9ecef;
}
