/*
Theme Name: WP AI Theme
Theme URI: https://wp-ai.it
Author:Raffaele Mele powered AI
Author URI: https://wp-ai.it
Description: Tema minimalista ottimizzato per Gutenberg e landing page AI
Version: 2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wp-ai-theme
Tags: gutenberg, landing-page, ai, one-page
*/

/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: #6366f1;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.site {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.site-content {
    flex: 1;
}

/* Header */
.site-header {
    padding: 20px 0;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: #333;
    text-decoration: none;
}

.site-description {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Navigation */
.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin-left: 20px;
}

.main-navigation a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.main-navigation a:hover {
    color: #6366f1;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    width: 40px;
    height: 40px;
}

/* Hamburger Menu Icon */
.hamburger {
    width: 24px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Hamburger Animation */
.menu-toggle.toggled .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.toggled .hamburger span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.toggled .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hover effect */
.menu-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.menu-toggle:hover .hamburger span {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Content */
.site-content {
    width: 100%;
}

.content-area {
    width: 100%;
}

/* Footer */
.site-footer {
    background-color: #1f2937;
    color: #fff;
    padding: 40px 0;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget {
    margin-bottom: 20px;
}

.footer-widget h2 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
}

.footer-widget li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: #d1d5db;
    text-decoration: none;
}

.footer-widget a:hover {
    color: #fff;
}

.site-info {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 14px;
}

/* Gutenberg Support */
.entry-content {
    max-width: 100%;
}

.entry-content > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.entry-content > .alignwide {
    max-width: 1400px;
}

.entry-content > .alignfull {
    max-width: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        position: relative;
        width: auto;
    }

    .main-navigation ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
        padding: 20px;
        flex-direction: column;
        border-radius: 0 0 12px 12px;
        border-top: 3px solid;
        border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) 1;
        animation: slideDown 0.3s ease-out;
        z-index: 1000;
        width: 100vw;
        margin-left: calc(-50vw + 50%);
    }

    .main-navigation.toggled ul {
        display: flex;
    }

    .main-navigation li {
        margin: 8px 0;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .main-navigation li:hover {
        background: rgba(102, 126, 234, 0.05);
    }

    .main-navigation a {
        display: block;
        padding: 12px 16px;
        border-radius: 8px;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .main-navigation a:hover {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: #fff;
        transform: translateX(5px);
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 20px;
    }

    .site-description {
        display: none;
    }
}
/* Layout Blog */
.blog-layout {
    padding: 40px 0;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-content {
    margin-bottom: 40px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.blog-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.blog-card .post-thumbnail {
    height: 200px;
    overflow: hidden;
}

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

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

.blog-card .card-content {
    padding: 20px;
}

.blog-card .entry-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.blog-card .entry-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.blog-card .entry-summary {
    font-size: 15px;
    color: #444;
}

.blog-card .read-more {
    display: inline-block;
    margin-top: 15px;
    color: #6366f1;
    font-weight: 500;
}

.pagination {
    text-align: center;
    margin-top: 40px;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    border-radius: 4px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
}

.pagination .page-numbers.current {
    background: #6366f1;
    color: #fff;
}

/* Layout Video Corsi */
.video-courses-layout {
    padding: 40px 0;
    background-color: #f9fafb;
}

.video-courses-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.course-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.course-thumbnail {
    height: 180px;
    position: relative;
    overflow: hidden;
}

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

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

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.course-card:hover .play-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.course-content {
    padding: 20px;
}

.course-card .entry-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.course-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.course-button {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background-color: #6366f1;
    color: #fff;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.course-button:hover {
    background-color: #4f46e5;
    text-decoration: none;
    color: #fff;
}

.entry-summary {
    color: #4b5563;
    font-size: 15px;
    line-height: 1.5;
}

/* Responsive per layout blog e video corsi */
@media (max-width: 768px) {
    .blog-grid, .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .blog-grid, .courses-grid {
        grid-template-columns: 1fr;
    }

    .course-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* Single Course Page */
.single-course {
    background-color: #f9fafb;
    padding: 40px 0;
}

.single-course-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.course-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.course-header {
    padding: 30px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.course-title {
    font-size: 28px;
    margin-bottom: 15px;
    color: #1e293b;
}

.course-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    font-size: 15px;
    color: #64748b;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.course-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
}

.course-video-container iframe,
.course-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.course-featured-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    overflow: hidden;
}

.course-featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.course-content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding: 30px;
}

.course-description h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #1e293b;
}

.course-action-card {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 30px;
}

.course-price-large {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    text-align: center;
}

.enroll-button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background-color: #6366f1;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 25px;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.enroll-button:hover {
    background-color: #4f46e5;
    text-decoration: none;
    color: #fff;
}

.course-includes h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #1e293b;
}

.course-includes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-includes li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #64748b;
    font-size: 15px;
}

.course-includes svg {
    color: #6366f1;
    flex-shrink: 0;
}

.related-courses {
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 0 20px;
}

.related-courses h2 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #1e293b;
}

/* Responsive styles for single course */
@media (max-width: 992px) {
    .course-content-wrapper {
        grid-template-columns: 1fr;
    }

    .course-action-card {
        position: static;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .course-meta {
        flex-direction: column;
        gap: 10px;
    }

    .course-title {
        font-size: 24px;
    }

    .course-header {
        padding: 20px;
    }

    .course-content-wrapper {
        padding: 20px;
    }
}

/* Miglioramenti per i video corsi */
.course-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.course-meta {
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.course-button {
    margin-top: auto;
    align-self: flex-start;
}

/* Payment processing styles */
.payment-processing {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #10b981;
}

.processing-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #10b981;
}

.processing-status .dashicons {
    font-size: 24px;
}

.spin {
    animation: spin 1s linear infinite;
}

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

.payment-processing p {
    color: #6c757d;
    margin: 0;
    font-size: 0.95rem;
}
