/* Blog Page Specific Styles */

/* Blog Hero Section */
.blog-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-main);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow: hidden;
    margin-top: 60px;
}

.hero-bg-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    opacity: 0.1;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--sky-blue);
    border-radius: 50%;
    top: -150px;
    left: -150px;
    animation: float-shape 20s infinite ease-in-out;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--pink);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    bottom: -100px;
    right: -100px;
    animation: float-shape 15s infinite ease-in-out reverse;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--green);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    top: 50%;
    right: 10%;
    animation: rotate-shape 25s infinite linear;
}

@keyframes float-shape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

@keyframes rotate-shape {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.blog-hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.blog-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Section */
.blog-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, #ffffff 0%, var(--gradient-soft) 100%);
    min-height: 100vh;
}

/* Filter Tags */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.tag {
    padding: 0.5rem 1.25rem;
    border: 2px solid transparent;
    background: white;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-main);
    transition: left 0.3s ease;
    z-index: -1;
}

.tag:hover::before {
    left: 0;
}

.tag:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.tag.active {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
    animation: fadeInUp 0.8s ease;
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-main);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.blog-card:hover::before {
    transform: scaleX(1);
}

.blog-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.blog-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.1) rotate(2deg);
}

.blog-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover .blog-card-overlay {
    opacity: 1;
}

.read-time {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.blog-category {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-date {
    color: #999;
    font-size: 0.875rem;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--gradient-soft);
}

.author span {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

.read-more {
    color: var(--sky-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.3s ease;
}

.read-more:hover {
    gap: 0.5rem;
    color: var(--orange);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--gradient-main);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.load-more::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.load-more:hover::after {
    width: 300px;
    height: 300px;
}

.load-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Newsletter Section */
.newsletter-section {
    padding: 4rem 0;
    background: var(--navy);
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--sky-blue) 0%, transparent 70%);
    opacity: 0.05;
    animation: rotate-shape 30s infinite linear;
}

.newsletter-box {
    text-align: center;
    position: relative;
    z-index: 1;
}

.newsletter-title {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.newsletter-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
    flex-direction: column;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--sky-blue);
    background: rgba(255, 255, 255, 0.15);
}

.newsletter-form button {
    padding: 1rem 2rem;
    background: var(--gradient-main);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Footer */
.footer {
    background: #0a0a0a;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 1rem;
}

.footer-links h4,
.footer-social h4 {
    margin-bottom: 1rem;
    color: var(--sky-blue);
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--sky-blue);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--gradient-main);
    transform: translateY(-3px);
}

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


/* Dark Mode Styles */
body.dark-mode {
    background: #0a0a0a;
    color: #e0e0e0;
}

body.dark-mode .blog-section {
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
}

body.dark-mode .blog-card {
    background: #1a1a1a;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

body.dark-mode .blog-title {
    color: #e0e0e0;
}

body.dark-mode .blog-excerpt {
    color: #999;
}

body.dark-mode .tag {
    background: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .navbar {
    background: #1a1a1a;
}

/* Responsive Design */
@media (min-width: 768px) {
    .newsletter-form {
        flex-direction: row;
    }
    
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
    }
    
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

@media (min-width: 1440px) {
    .blog-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Animations for filtered items */
.blog-card.hide {
    display: none;
}

.blog-card.show {
    animation: fadeInScale 0.4s ease forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}