/**
 * Home Page Specific Styles
 */

/* Main container for home page */
.home-page {
    background-color: var(--background-color);
}

/* Hero Section */
.hero-section {
    padding: 80px 0;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, var(--primary-color, #3498db), var(--secondary-color, #2ecc71));
    overflow: hidden;
    color: #ffffff;
}

body.dark-theme .hero-section,
body.dark-mode .hero-section {
    background: linear-gradient(135deg, var(--dark-primary-color, #2186c4), var(--dark-secondary-color, #27ae60));
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/patterns/wave-pattern.svg');
    background-position: center;
    background-size: cover;
    opacity: 0.3;
    z-index: 1;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-lg);
    color: #ffffff;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 150px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.hero-button.primary {
    background-color: #fff;
    color: var(--primary-color, #3498db);
}

.hero-button.primary:hover {
    color: var(--primary-color, #3498db);
}

.hero-button.secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-button.secondary:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.3);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shapes decoration */
.shape {
    position: absolute;
    z-index: 1;
}

.shape-1 {
    top: 20%;
    left: 5%;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape-2 {
    top: 50%;
    right: 8%;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transform: rotate(45deg);
    animation: float 8s ease-in-out infinite 1s;
}

.shape-3 {
    bottom: 20%;
    left: 8%;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    animation: float 7s ease-in-out infinite 2s;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
    100% {
        transform: translateY(0) rotate(0);
    }
}

/* Latest Blog Posts Section */
.latest-posts-section {
    padding: 100px 0 0;
    background-color: var(--background-color);
    position: relative;
    overflow: hidden;
}

/* Add decorative elements */
.latest-posts-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.1), rgba(var(--secondary-color-rgb), 0.05));
    z-index: 0;
}

.latest-posts-section::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--secondary-color-rgb), 0.08), rgba(var(--primary-color-rgb), 0.05));
    z-index: 0;
}

.section-header {
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: var(--spacing-md);
    color: var(--heading-color);
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

.section-description {
    font-size: 1.2rem;
    color: var(--text-color);
    max-width: 700px;
    margin: 20px auto 0;
    line-height: 1.6;
    opacity: 0.9;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.post-card {
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--card-bg, #ffffff);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.08);
}

.post-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.post-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.4));
    z-index: 1;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.post-card:hover .post-thumbnail::before {
    opacity: 0.5;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.1);
}

.post-category {
    position: absolute;
    bottom: 15px;
    left: 15px;
    padding: 6px 16px;
    background: var(--primary-color);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 2;
    transition: all 0.3s ease;
    text-decoration: none;
}

.post-category:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.post-card-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.entry-header {
    margin-bottom: 8px;
}

.entry-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.entry-title a {
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    position: relative;
    overflow: hidden;
}

.entry-title a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.entry-title a:hover {
    color: var(--primary-color);
}

.entry-title a:hover::after {
    width: 100%;
}

.entry-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted, #666);
}

.post-date, .post-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-date svg, .post-author svg {
    opacity: 0.7;
    color: var(--primary-color);
}

.entry-summary {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-color);
    margin-bottom: 10px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.entry-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 16px;
    background-color: var(--primary-color);
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
}

.read-more-link svg {
    transition: transform 0.3s ease;
    color: #ffffff;
}

.read-more-link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(var(--secondary-color-rgb), 0.4);
    color: #ffffff;
}

.read-more-link:hover svg {
    transform: translateX(6px);
}

/* Dark theme adjustments */
body.dark-theme .read-more-link,
body.dark-mode .read-more-link {
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-theme .read-more-link:hover,
body.dark-mode .read-more-link:hover {
    background-color: var(--secondary-color);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.view-all-posts {
    text-align: center;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.view-all-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(var(--primary-color-rgb), 0.3);
}

.view-all-button svg {
    transition: transform 0.3s ease;
}

.view-all-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(var(--secondary-color-rgb), 0.4);
}

.view-all-button:hover svg {
    transform: translateX(5px);
}

/* Dark theme adjustments */
body.dark-theme .post-card,
body.dark-mode .post-card {
    background-color: var(--card-bg, #2a2a2a);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

body.dark-theme .post-card:hover,
body.dark-mode .post-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-theme .post-thumbnail::before,
body.dark-mode .post-thumbnail::before {
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.7));
}

body.dark-theme .entry-footer,
body.dark-mode .entry-footer {
    border-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 992px) {
    .section-title {
        font-size: 2.4rem;
    }
    
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .latest-posts-section {
        padding: 70px 0;
    }
    
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .post-thumbnail {
        height: 180px;
    }
    
    .post-card-content {
        padding: 12px;
    }
    
    .entry-title {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    
    .entry-summary {
        font-size: 0.8rem;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 576px) {
    .latest-posts-section {
        padding: 50px 0;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
}

/* Featured Content Sections */
.featured-content-wrapper {
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
    background-color: var(--background-color, #ffffff);
}

.featured-content-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.featured-content-section {
    padding: var(--spacing-xl, 2rem);
    border-radius: var(--border-radius, 8px);
    background-color: var(--card-bg, #f9f9f9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border-top: 3px solid transparent;
}

.featured-content-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.tutorials-section {
    border-top-color: #FF0000;
}

.coding-notes-section {
    border-top-color: #3498db;
}

.featured-content-image {
    margin-bottom: var(--spacing-lg, 1.5rem);
    border-radius: var(--border-radius, 8px);
    overflow: hidden;
    height: 200px;
    position: relative;
}

.featured-content-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.tutorials-section .featured-content-image::after {
    background: linear-gradient(135deg, rgba(255,0,0,0.2), rgba(255,0,0,0));
}

.coding-notes-section .featured-content-image::after {
    background: linear-gradient(135deg, rgba(52,152,219,0.2), rgba(52,152,219,0));
}

.featured-content-section:hover .featured-content-image::after {
    opacity: 0.8;
}

.featured-content-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-content-section:hover .featured-content-image img {
    transform: scale(1.05);
}

.featured-content-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-md, 1rem);
    color: var(--heading-color, #111111);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tutorials-section .featured-content-title svg {
    color: #FF0000;
}

.coding-notes-section .featured-content-title svg {
    color: #3498db;
}

.featured-content-description {
    flex-grow: 1;
    margin-bottom: var(--spacing-lg, 1.5rem);
    color: var(--text-color, #333333);
    line-height: 1.6;
}

.featured-content-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
    align-self: flex-start;
    text-decoration: none;
}

.tutorials-section .featured-content-button {
    background-color: #FF0000;
    color: #ffffff;
}

.coding-notes-section .featured-content-button {
    background-color: #3498db;
    color: #ffffff;
}

.featured-content-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    color: #ffffff;
}

.featured-content-button svg {
    transition: transform 0.3s ease;
}

.featured-content-button:hover svg {
    transform: translateX(4px);
}

/* Dark theme adjustments */
body.dark-theme .featured-content-section,
body.dark-mode .featured-content-section {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    background-color: var(--card-bg, #1e1e1e);
}

body.dark-theme .featured-content-section:hover,
body.dark-mode .featured-content-section:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body.dark-theme .featured-content-title,
body.dark-mode .featured-content-title {
    color: var(--heading-color, #ffffff);
}

body.dark-theme .featured-content-description,
body.dark-mode .featured-content-description {
    color: var(--text-color, rgba(255, 255, 255, 0.9));
}

body.dark-theme .tutorials-section,
body.dark-mode .tutorials-section {
    border-top-color: #FF0000;
}

body.dark-theme .coding-notes-section,
body.dark-mode .coding-notes-section {
    border-top-color: #3498db;
}

body.dark-theme .tutorials-section .featured-content-image::after,
body.dark-mode .tutorials-section .featured-content-image::after {
    background: linear-gradient(135deg, rgba(255,0,0,0.3), rgba(0,0,0,0.6));
}

body.dark-theme .coding-notes-section .featured-content-image::after,
body.dark-mode .coding-notes-section .featured-content-image::after {
    background: linear-gradient(135deg, rgba(52,152,219,0.3), rgba(0,0,0,0.6));
}

/* Media Queries */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .featured-content-container {
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .featured-content-wrapper {
        padding: 60px 0;
    }
    
    .latest-posts-section {
        padding: 60px 0;
    }
    
    .featured-content-section {
        padding: var(--spacing-lg);
    }
    
    .featured-content-title {
        font-size: 1.5rem;
    }
    
    .featured-content-image {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .featured-content-container {
        grid-template-columns: 1fr;
        max-width: 550px;
        margin: 0 auto;
    }
    
    .featured-content-section {
        width: 100%;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-content {
        padding: 0 var(--spacing-md);
    }
    
    .hero-title {
        font-size: 1.8rem;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-button {
        padding: 0.6rem 1.2rem;
        min-width: 130px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .section-description {
        font-size: 0.95rem;
    }
    
    .posts-grid {
        gap: 20px;
    }
    
    .featured-content-wrapper {
        padding: 40px 0;
    }
    
    .featured-content-section {
        padding: var(--spacing-md);
    }
    
    .featured-content-title {
        font-size: 1.3rem;
    }
    
    .featured-content-description {
        font-size: 0.95rem;
        margin-bottom: var(--spacing-md);
    }
    
    .featured-content-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }
    
    .featured-content-image {
        height: 160px;
        margin-bottom: var(--spacing-md);
    }
    
    .view-all-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-content-image {
        height: 140px;
    }
    
    .featured-content-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 360px) {
    .hero-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .hero-button {
        width: 100%;
    }
    
    .hero-title {
        font-size: 1.4rem;
    }
    
    .featured-content-section {
        padding: var(--spacing-sm);
    }
    
    .featured-content-title {
        font-size: 1.2rem;
    }
    
    .featured-content-description {
        font-size: 0.9rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .featured-content-button {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .view-all-button {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        max-width: 220px;
    }
}

/* Additional styles for dark theme */
body.dark-theme .featured-card {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .featured-title {
    color: #ffffff;
}

body.dark-theme .separator-icon {
    background-color: rgba(var(--primary-color-rgb), 0.2);
}

body.dark-theme .featured-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.2), rgba(0,0,0,0));
    z-index: 1;
}

/* Specific image overlays */
.tutorials-section .featured-image::after,
.coding-notes-section .featured-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.tutorials-section .featured-image::after {
    background: linear-gradient(135deg, rgba(255,0,0,0.2), rgba(255,0,0,0));
}

.coding-notes-section .featured-image::after {
    background: linear-gradient(135deg, rgba(52,152,219,0.2), rgba(52,152,219,0));
}

.featured-card:hover .featured-image::after {
    opacity: 0.8;
}

.tutorials-section .featured-card {
    border-top: 3px solid #FF0000;
}

.coding-notes-section .featured-card {
    border-top: 3px solid #3498db;
}

/* Dark theme specific overlays */
body.dark-theme .tutorials-section .featured-image::after {
    background: linear-gradient(135deg, rgba(255,0,0,0.3), rgba(0,0,0,0.6));
}

body.dark-theme .coding-notes-section .featured-image::after {
    background: linear-gradient(135deg, rgba(52,152,219,0.3), rgba(0,0,0,0.6));
}

.view-all-posts {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-xl);
}

.view-all-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.view-all-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    color: #ffffff;
}

.view-all-button svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.view-all-button:hover svg {
    transform: translateX(4px);
} 