/* 
 * Forma CSS
 * Main stylesheet for Forma CMS templates
 */

/* -----------------------------------------------------------------------------
 * 1. CSS Variables and Root Settings
 * -------------------------------------------------------------------------- */
:root {
    --primary: #fcbe34;
    --primary-end: #e6a912;
    --primary-dark: #d99e00;
    --bg: #1e1e1e;
    --bg-end: #252526;
    --text: #d4d4d4;
    --text-muted: #888888;
    --border: #3e3e42;
    --hover-bg: rgba(255, 255, 255, 0.1);
    --error: #f44336;
    --error-end: #d32f2f;
    --footer-bg: #2d2d2d;
    --footer-bg-end: #252526;
    --accent: #fcbe34;
    --accent-hover: #e6a912;
    --accent-text: #121212;
    --font-family: 'Chakra Petch', sans-serif;
}

/* -----------------------------------------------------------------------------
 * 2. Base Styles
 * -------------------------------------------------------------------------- */
* {
    font-family: var(--font-family);
}

body {
    background-color: var(--bg);
    color: var(--text);
}

.text-muted {
    color: var(--text-muted) !important;
}

/* -----------------------------------------------------------------------------
 * 3. Navigation and Header
 * -------------------------------------------------------------------------- */
.navbar {
    background-color: var(--bg-end);
    border-bottom: 1px solid var(--border);
}

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

.nav-link {
    color: var(--text);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link-page {
    background-color: rgba(252, 190, 52, 0.1);
    border: 1px solid rgba(252, 190, 52, 0.3);
    border-radius: 4px;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    transition: all 0.2s;
}

.nav-link-page:hover {
    background-color: rgba(252, 190, 52, 0.2);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.navbar-brand svg {
    fill: var(--primary);
    color: var(--primary);
}

/* -----------------------------------------------------------------------------
 * 4. Buttons and CTAs
 * -------------------------------------------------------------------------- */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--accent-text);
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--primary-end);
    border-color: var(--primary-end);
    color: var(--accent-text);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: var(--accent-text);
}

.btn-read-more {
    background-color: var(--primary);
    color: var(--accent-text);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-read-more:hover {
    background-color: var(--primary-end);
    color: var(--accent-text);
}

/* -----------------------------------------------------------------------------
 * 5. Hero Sections
 * -------------------------------------------------------------------------- */
.hero-section {
    background: var(--bg);
    padding: 5rem 0 3rem;
    position: relative;
    overflow: hidden;
}

/* Hero animated background */
.hero-bg {
    animation: slide 8s ease-in-out infinite alternate;
    background-image: linear-gradient(-60deg, rgba(252, 190, 52, 0.1) 50%, rgba(30, 30, 30, 0.8) 50%);
    bottom: 0;
    left: -50%;
    opacity: 0.5;
    position: absolute;
    right: -50%;
    top: 0;
    z-index: 0;
}

.hero-bg.bg1 {
    /* Default styles already applied above */
}

.hero-bg.bg2 {
    animation-direction: alternate-reverse;
    animation-duration: 10s;
    background-image: linear-gradient(-60deg, rgba(30, 30, 30, 0.9) 50%, rgba(217, 158, 0, 0.1) 50%);
}

.hero-bg.bg3 {
    animation-duration: 12s;
    background-image: linear-gradient(-60deg, rgba(37, 37, 38, 0.8) 50%, rgba(230, 169, 18, 0.1) 50%);
}

@keyframes slide {
    0% {
        transform: translateX(-15%);
    }
    100% {
        transform: translateX(15%);
    }
}

.hero-title {
    color: var(--primary);
    font-weight: 800;
    font-size: 2.5rem;
    line-height: 1.1;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    color: var(--text);
    font-size: 1.2rem;
    max-width: 800px;
    margin: 1rem auto;
    position: relative;
    z-index: 1;
}

.hero-logo {
    color: var(--primary);
    filter: drop-shadow(0 0 10px rgba(252, 190, 52, 0.3));
    z-index: 1;
    position: relative;
}

/* Home page specific hero */
.home .hero-title {
    font-size: 3.5rem;
}

.home .hero-subtitle {
    font-size: 1.5rem;
    margin: 1.5rem auto;
}

.home .hero-section {
    padding: 6rem 0;
}

/* -----------------------------------------------------------------------------
 * 6. Cards and Content Sections
 * -------------------------------------------------------------------------- */
.content-section {
    background-color: var(--bg-end);
    border-radius: 8px;
    padding: 2rem;
    margin-top: -2rem;
    position: relative;
    z-index: 2;
    border: 1px solid var(--border);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.card {
    background-color: var(--bg-end);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.card-title {
    color: var(--primary);
    font-weight: 600;
}

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

.card-title a:hover {
    color: var(--primary-end);
    text-decoration: none;
}

.card-text {
    color: var(--text);
}

.card-footer {
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

/* -----------------------------------------------------------------------------
 * 7. Feature Section and Cards
 * -------------------------------------------------------------------------- */
.feature-section {
    background-color: var(--bg-end);
    padding: 5rem 0;
}

.features-title {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 3rem;
}

.feature-card {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    height: 100%;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-title {
    color: var(--primary);
    font-weight: 600;
}

.section-title {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 2rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

/* -----------------------------------------------------------------------------
 * 8. Blog Specific Styles
 * -------------------------------------------------------------------------- */
.blog-section {
    padding: 4rem 0;
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-title {
    color: var(--primary);
    font-weight: 800;
    font-size: 2.75rem;
    line-height: 1.1;
    position: relative;
    z-index: 1;
}

.post-meta {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    display: flex;
    gap: 1.5rem;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.7;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.post-content h2 {
    color: var(--primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-content h3 {
    color: var(--primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.post-content a:hover {
    color: var(--primary-end);
    text-decoration: underline;
}

.post-content pre {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content code {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin-left: 0;
    opacity: 0.9;
}

.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.categories, .tags {
    margin-top: 2.5rem;
    font-size: 0.95rem;
}

.category-item, .tag-item {
    display: inline-block;
    background-color: rgba(252, 190, 52, 0.15);
    color: var(--primary);
    padding: 0.35rem 0.9rem;
    border-radius: 2rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(252, 190, 52, 0.3);
    transition: all 0.2s;
}

.category-item:hover, .tag-item:hover {
    background-color: rgba(252, 190, 52, 0.25);
    transform: translateY(-2px);
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    background-color: rgba(252, 190, 52, 0.1);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    margin-top: 2rem;
    border: 1px solid rgba(252, 190, 52, 0.2);
    transition: all 0.2s;
}

.back-to-blog:hover {
    background-color: rgba(252, 190, 52, 0.2);
    color: var(--primary);
    text-decoration: none;
}

/* -----------------------------------------------------------------------------
 * 9. Podcast Specific Styles
 * -------------------------------------------------------------------------- */
.podcast-cover {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    border: 2px solid var(--primary);
}

.subscribe-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1rem auto;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.subscribe-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: var(--accent-text);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, background 0.2s;
    font-size: 0.9rem;
}

.subscribe-button:hover {
    background: var(--primary-end);
    transform: scale(1.05);
    color: var(--accent-text);
    text-decoration: none;
}

.episodes-section {
    padding: 4rem 0;
}

.episode-card {
    background-color: var(--bg-end);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.episode-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.episode-header {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background-color: rgba(0, 0, 0, 0.2);
}

.episode-number {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: var(--primary);
    color: var(--accent-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    font-size: 1.1rem;
}

.episode-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.3;
}

.episode-title a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

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

.episode-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.episode-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.episode-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.episode-description {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    flex-grow: 1;
}

.episode-footer {
    padding: 1rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.15);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.episode-actions {
    display: flex;
    gap: 0.8rem;
}

.episode-play {
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: var(--primary);
    color: var(--accent-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.episode-play:hover {
    background-color: var(--primary-end);
    color: var(--accent-text);
    text-decoration: none;
}

.episode-details {
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.episode-details:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--text);
    text-decoration: none;
}

.episode-season {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

.episode-art {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}

/* Single episode page */
.episode-cover {
    width: 240px;
    height: 240px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    border: 2px solid var(--primary);
}

.back-to-podcast {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary);
    background-color: rgba(252, 190, 52, 0.1);
    text-decoration: none;
    padding: 0.7rem 1.3rem;
    border-radius: 4px;
    margin-top: 1rem;
    border: 1px solid rgba(252, 190, 52, 0.2);
    transition: all 0.2s;
    font-weight: 500;
}

.back-to-podcast:hover {
    background-color: rgba(252, 190, 52, 0.2);
    color: var(--primary);
    text-decoration: none;
}

.episode-content {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.show-notes {
    margin-bottom: 2.5rem;
}

.show-notes h2 {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.show-notes a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.show-notes a:hover {
    color: var(--primary-end);
    text-decoration: underline;
}

.keywords {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.keyword {
    display: inline-block;
    background-color: rgba(252, 190, 52, 0.15);
    color: var(--primary);
    padding: 0.35rem 0.9rem;
    border-radius: 2rem;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(252, 190, 52, 0.3);
    transition: all 0.2s;
    font-size: 0.9rem;
}

.keyword:hover {
    background-color: rgba(252, 190, 52, 0.25);
    transform: translateY(-2px);
}

/* -----------------------------------------------------------------------------
 * 10. Audio Player Styles
 * -------------------------------------------------------------------------- */
.player-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.media-player {
    display: flex;
    flex-direction: column;
}

.now-playing {
    display: flex;
    align-items: center;
}

.now-playing .badge {
    background-color: var(--primary);
    color: var(--accent-text);
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
}

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

.volume-slider-container {
    width: 80px;
}

.volume-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
}

.waveform-container {
    height: 60px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.waveform-placeholder {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
}

.waveform-placeholder::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 3px,
        rgba(252, 190, 52, 0.2) 3px,
        rgba(252, 190, 52, 0.2) 5px
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        rgba(0, 0, 0, 1) 5%,
        rgba(0, 0, 0, 1) 95%,
        transparent 100%
    ), 
    repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 10px,
        rgba(0, 0, 0, 0.3) 10px,
        rgba(0, 0, 0, 0.3) 12px
    );
    mask-size: 100% 100%, 100% 100%;
    mask-repeat: no-repeat, no-repeat;
    mask-position: center;
    mask-composite: intersect;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.play-pause-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--accent-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.play-pause-btn:hover {
    background-color: var(--primary-end);
    transform: scale(1.05);
}

.player-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.player-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.progress-container {
    position: relative;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 0 0.5rem;
    cursor: pointer;
    width: 100%;
}

.progress-bar {
    height: 100%;
    width: 30%;
    background-color: var(--primary);
    border-radius: 4px;
    position: relative;
}

.progress-handle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary);
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.playback-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
    text-decoration: none;
}

.download-btn {
    background-color: var(--primary);
    color: var(--accent-text);
    border: none;
}

.download-btn:hover {
    background-color: var(--primary-end);
    color: var(--accent-text);
}

/* -----------------------------------------------------------------------------
 * 11. Home Page Specific Styles
 * -------------------------------------------------------------------------- */
.flat-file-section, .usage-section, .install-section {
    padding: 5rem 0;
}

.flat-file-section {
    background-color: var(--bg);
}

.usage-section {
    background-color: var(--bg-end);
}

.usage-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}

.usage-img:hover {
    transform: scale(1.02);
}

.install-section {
    background-color: var(--bg);
}

.install-step {
    background-color: var(--bg-end);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.step-number {
    background-color: var(--primary);
    color: var(--accent-text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 1rem;
    flex-shrink: 0;
}

.cta-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--accent-text);
    padding: 5rem 0;
}

/* -----------------------------------------------------------------------------
 * 12. Footer Styles
 * -------------------------------------------------------------------------- */
.footer {
    background-color: var(--footer-bg);
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.footer-title {
    color: var(--primary);
    font-weight: 700;
}

.footer-link {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--primary);
    text-decoration: none;
}

.footer-logo {
    width: 40px;
    height: 60px;
    margin-right: 10px;
    color: var(--primary);
    opacity: 0.8;
}

/* -----------------------------------------------------------------------------
 * 13. Responsive Styles
 * -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
}
