/* Global styles */
:root {
    --primary-color: #EA7125;
    --secondary-color: #00338A;
    --hover-color: #FF9A47;
    --text-color: #00338A;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    line-height: 1.6;
}

/* Header styles with gradient and animation */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--hover-color));
    color: white;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-speed) ease;
}

header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%);
    background-size: 3em 3em;
    animation: headerPattern 60s linear infinite;
}

@keyframes headerPattern {
    0% { background-position: 0 0; }
    100% { background-position: 100em 100em; }
}

/* Navigation styles with hover effects */
nav {
    background-color: var(--secondary-color);
    padding: 15px 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all var(--transition-speed) ease;
}

nav a:hover {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

nav a.active {
    background-color: var(--primary-color);
    color: white;
}

/* Typography with animations */
h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
    animation: fadeInUp 1s ease-out;
}

h2 {
    font-size: 28px;
    font-weight: normal;
    color: var(--text-color);
    margin-top: 20px;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo with circular frame and hover effect */
img.logo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    transition: all var(--transition-speed) ease;
    animation: logoAppear 1s ease-out;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.8);
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

img.logo:hover {
    transform: scale(1.1) rotate(5deg);
    border-color: white;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

@keyframes logoAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Content sections with animations */
.content {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    animation: fadeIn 1s ease-out;
}

/* Intro section */
.intro {
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

/* Feature cards */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
    margin-bottom: 40px;
}

.feature-card {
    position: relative;
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
    text-decoration: none;
    color: white;
    display: block;
    cursor: pointer;
}

@media (max-width: 768px) {
    .feature-cards {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 40px;
        margin-bottom: 100px;
    }

    .feature-card {
        min-height: 300px; /* Changed from fixed height to min-height */
        height: auto; /* Allow height to adjust based on content */
    }

    .content {
        padding: 20px 10px 80px;
        margin-bottom: 40px;
    }

    .intro {
        margin-bottom: 30px;
    }

    /* Remove margin from individual cards and let grid gap handle spacing */
    .feature-card:last-child {
        margin-bottom: 0;
    }

    /* Ensure footer doesn't overlap with content */
    footer {
        margin-top: 0;
        position: relative;
        z-index: 1;
    }
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.feature-card:hover::before {
    transform: scale(1.1);
}

.youtube-card::before {
    background-image: url('https://images.unsplash.com/photo-1598550476439-6847785fcea6?q=80&w=2070&auto=format&fit=crop');
}

.podcast-card::before {
    background-image: url('https://images.unsplash.com/photo-1589903308904-1010c2294adc?q=80&w=1972&auto=format&fit=crop');
}

.blog-card::before {
    background-image: url('https://images.unsplash.com/photo-1499750310107-5fef28a66643?q=80&w=2070&auto=format&fit=crop');
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2));
    z-index: 1;
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    color: white;
    z-index: 2;
    transform: translateY(30px);
    transition: transform 0.5s ease;
}

.feature-card:hover .card-content {
    transform: translateY(0);
}

.card-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: white;
}

.card-content p {
    font-size: 16px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.card-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.feature-card:hover .card-btn {
    opacity: 1;
    transform: translateY(0);
    background: var(--hover-color);
}

/* Blog specific styles */
.blog-content {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.blog-frame {
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
    opacity: 1;
}

/* Blog grid layout */
.blog-grid {
    display: grid;
    gap: 25px;
    margin-top: 20px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* Style for individual blog post cards */
.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    display: block;
    text-decoration: none;
    color: var(--text-color);
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(234, 113, 37, 0.15);
}

.blog-card-image {
    width: 100%;
    overflow: hidden;
}

.blog-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-card-content {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    color: var(--text-color);
    background: white;
    position: relative;
    z-index: 2;
}

.blog-card h2 {
    color: var(--text-color);
    font-size: 18px;
    margin: 8px 0;
    line-height: 1.4;
    font-weight: 600;
}

.blog-card .post-meta {
    color: #666;
    font-size: 13px;
    margin-bottom: 8px;
}

.blog-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(234, 113, 37, 0.12);
    margin-top: auto;
    width: fit-content;
}

.blog-card:hover .blog-button {
    background: var(--hover-color);
}

/* Podcast specific styles */
.podcast-content {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
}

.podcast-description {
    margin-bottom: 30px;
    text-align: left;
    animation: fadeIn 1s ease-out;
}

.podcast-frame {
    width: 100%;
    max-width: 800px;
    height: 600px;
    border: none;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.podcast-frame.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Footer with gradient */
footer {
    background: linear-gradient(135deg, var(--secondary-color), #002266);
    color: white;
    padding: 30px;
    margin-top: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--hover-color));
}

footer p {
    font-size: 16px;
    color: white;
    position: relative;
    z-index: 1;
}

footer a {
    color: white;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* General animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Medium feed section */
.medium-feed {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid rgba(0, 0, 0, 0.05);
}

.medium-feed h2 {
    text-align: left;
    margin-bottom: 30px;
}

.error-message {
    color: #dc3545;
    text-align: center;
    padding: 20px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 8px;
    margin: 20px 0;
}

/* Responsive design */
@media (max-width: 768px) {
    h1 { font-size: 36px; }
    h2 { font-size: 24px; }
    .btn { margin: 10px 5px; }
    nav a { margin: 0 8px; }
    
    header {
        padding: 40px 20px;
    }

    .feature-cards {
        margin-top: 20px;
    }

    body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Blog description */
.blog-description {
    margin-bottom: 30px;
    text-align: left;
    animation: fadeIn 1s ease-out;
}
