/* PlayLúdico Homepage Styles */

/* 
    Usando as cores definidas em :root no custom.css:
    --primary: #881ddb           Roxo vibrante - cor principal
    --primary-light: #a352e8     Roxo claro
    --primary-dark: #390f4a      Roxo escuro
    
    --secondary: #ea5634         Laranja - cor secundária
    --secondary-light: #f07c5d   Laranja claro
    --secondary-dark: #d13f23    Laranja escuro
    
    --tertiary: #3be9c3          Azul turquesa - cor terciária
    --tertiary-light: #68f0d4    Azul turquesa claro
    --tertiary-dark: #2bb397     Azul turquesa escuro
    
    --accent-color: #ffffea      Off-white para destaques
    --text-color: #333333        Cor de texto padrão
    --bg-light: #ffffea          Fundo claro off-white
*/

/* Hero Section */
.hero-section {
    padding: 80px 0;
    background-color: inherit;
    position: relative;
    overflow: hidden;
    font-family: var(--font-body);
}

.hero-section:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url('../images/pattern-lego-amarelo.png') repeat;
    opacity: 0.8;
    z-index: 1;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.hero-text {
    flex: 1;
    padding-right: 40px;
}

.hero-text h2 {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-dark);
    margin-bottom: 20px;
    line-height: 1.2;
    font-family: var(--font-title-fun);
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-color);
    font-family: var(--font-body);
    font-weight: var(--font-regular);
}

.hero-text .hero-subheadline {
    font-size: 1rem;
    margin-bottom: 25px;
    margin-top: 15px;
    color: var(--primary-dark);
    font-family: var(--font-body);
    font-weight: var(--font-medium);
    font-style: italic;
    line-height: 1.5;
    opacity: 0.9;
}

.hero-image {
    flex: 1;
    text-align: center;
    aspect-ratio: 16 / 9;
}

.hero-image img {    object-fit: cover;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(136, 29, 219, 0.2); /* --primary: #881ddb */
    transform: none !important; /* Forçando nenhuma transformação */
    animation: none !important; /* Forçando nenhuma animação */
}

/* Platform Benefits */
.platform-benefits {
    padding: 60px 0;
    background: url(../images/pattern-lego-roxo.png);
    position: relative;
    z-index: 5;
    margin: -4px 0 0;
}

.benefits-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.benefit-item {
    flex: 0 0 calc(20% - 60px);
    text-align: center;
    padding: 15px;
    border-radius: 15px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(169, 38, 254, 0.15); /* --primary: #a926fe */
}

.benefit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    /* Gradiente agora é aplicado via inline style no template */
    background: linear-gradient(45deg, var(--primary), var(--secondary)); /* Fallback */
    border-radius: 50%;
    color: white;
    transition: transform 0.3s ease;
}

.benefit-icon:hover {
    transform: scale(1.1);
}

.benefit-icon i {
    font-size: 32px;
    color: var(--primary);
}

.benefit-item h3 {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.4;
    font-weight: 500;
}

/* Button Styles */
.btn-playludico {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(45deg, var(--primary), var(--secondary)); /* #881ddb, #ea5634 */
    color: var(--accent-color);
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 5px 15px rgba(136, 29, 219, 0.25); /* --primary: #881ddb */
}

.btn-playludico:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(136, 29, 219, 0.4); /* --primary: #881ddb */
    color: var(--accent-color);
}

/* Special styling for demo button */
.btn-playludico.btn-demo {
    position: relative;
    overflow: hidden;
}

.btn-playludico.btn-demo:hover::after {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* Games Section */
.games-section {
    padding: 80px 0;
    background: url(../images/pattern-lego-pinos-verde.png);
    position: relative;
    z-index: 5;
    margin: -3px 0 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    color: var(--primary);
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--tertiary)); /* #a926fe, #39c4c7 */
    border-radius: 4px;
}

.platform-benefits .section-header h2 {
    color: var(--tertiary);
}

.section-header p {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-color);
    font-size: 1.1rem;
}

.games-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.game-card {
    flex: 0 0 calc(33.333% - 30px);
    background: #ffffea;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    padding: 8px;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(169, 38, 254, 0.2); /* --primary: #a926fe */
}

.game-card-image {
    height: 200px;
    overflow: hidden;
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-radius: 15px;
}

.game-card:hover .game-card-image img {
    transform: scale(1.05);
}

.game-card-content {
    padding: 20px;
}

.game-card-title {
    font-size: 1.4rem !important;
    font-weight: 500 !important;
    font-family: var(--font-title-fun) !important;
    color: var(--primary-dark);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.game-card-description {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.game-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-card-age {
    background: var(--tertiary-light);
    color: var(--primary-dark);
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    border: solid 2px var(--primary-dark);
}

.game-card-link {
    color: var(--secondary);
    font-weight: 500;
    font-family: var(--font-title-fun);
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.game-card-link:hover {
    color: var(--secondary-dark);
}

.text-center {
    text-align: center;
}

.mt-5 {
    margin-top: 50px;
}

/* Why Use Section */
.why-use-section {
    padding: 80px 0;
}

/* Accordion Layout */
.reasons-accordion {
    margin: 0 auto;
}

.reasons-accordion .reason-item {
    margin-bottom: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.reasons-accordion .reason-item:hover {
    box-shadow: 0 8px 25px rgba(169, 38, 254, 0.15); /* --primary: #a926fe */
}

.reasons-accordion .reason-item.active .toggle-icon {
    background: var(--tertiary);
}

.reason-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px;
    cursor: pointer;
    background: rgba(224,225,255,0.3);
    transition: background-color 0.3s ease;
}

.reason-question:hover {
    background: rgba(224,225,255,0.5);
}

.question-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.reason-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Gradiente dinâmico será aplicado via style inline do PHP */
    background: linear-gradient(45deg, var(--primary), var(--tertiary)); /* Fallback */
    border-radius: 50%;
    margin-right: 20px;
    flex-shrink: 0;
}

.reason-icon i {
    color: white;
    font-size: 24px;
}

.reason-question h3 {
    margin: 0;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.4;
}

.toggle-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: 50%;
    color: white;
    font-size: 14px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.reason-item.active .toggle-icon {
    transform: rotate(45deg);
}

.reason-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.reason-item.active .reason-answer {
    padding: 0 25px 25px 25px;
    max-height: 200px;
}

.reason-answer p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
}

/* Grid Layout (fallback para formato antigo) */
.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.reasons-grid .reason-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: rgba(224,225,255,0.7);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.reasons-grid .reason-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(169, 38, 254, 0.1);
}

.reasons-grid .reason-icon {
    margin-right: 15px;
}

.reason-text {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.4;
}

/* For Who Section */
.for-who-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.audience-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.audience-card {
    flex: 0 0 calc(25% - 30px);
    background: white;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.audience-card:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 5px;
    bottom: 0;
    left: 0;
    background: linear-gradient(to right, var(--primary), var(--tertiary)); /* #a926fe, #39c4c7 */
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.audience-card:hover:before {
    transform: scaleX(1);
}

.audience-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(169, 38, 254, 0.15); /* --primary: #a926fe */
}

.card-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Gradiente dinâmico será aplicado via style inline do PHP */
    background: linear-gradient(45deg, var(--primary), var(--tertiary)); /* Fallback */
    border-radius: 50%;
    margin: 0 auto 20px;
}

.card-icon i {
    font-size: 36px;
    color: white;
}

.audience-card h3 {
    color: var(--primary-dark);
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: bold;
}

.card-link {
    display: inline-block;
    color: var(--secondary);
    font-weight: bold;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.card-link:after {
    content: '→';
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.card-link:hover {
    color: var(--secondary-dark);
}

.card-link:hover:after {
    transform: translateX(5px);
}

/* About Section */
.about-section {
    padding: 80px 0;
    background: url(../images/pattern-lego-pinos-amarelo.png);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    color: var(--primary);
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 25px;
}

.about-text p {
    color: var(--text-color);
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.impact-number {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.number {
    font-size: 2rem;
    color: var(--secondary);
    line-height: 1;
    font-family: var(--font-title-script);
}

.label {
    font-size: 1.2rem;
    color: var(--text-color);
}

.founder-image {
    flex: 1;
    text-align: center;
}

.founder-image img {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border: solid 3px var(--primary);
}

/* How It Works - FAQ Section */
.how-works-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 15px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.faq-question {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: rgba(169, 38, 254, 0.05); /* --primary: #a926fe */
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary-dark);
    font-weight: bold;
}

.toggle-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-light);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.faq-item.active .toggle-icon {
    transform: rotate(45deg);
    background: var(--tertiary);
}

.faq-answer {
    padding: 0 25px;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 25px 20px;
    height: auto;
}

.faq-answer p {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
}

/* Demo Modal Styles */
.demo-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-modal.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden !important;
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 1290px;
    height: 90vh; /* Aumentado de 85vh para 90vh */
    max-height: 800px; /* Altura máxima definida */
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(0.8) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.demo-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    flex: 1;
    padding: 0;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Importante para flexbox funcionar corretamente */
}

.iframe-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 0; /* Garante que o container possa encolher */
    display: flex;
    flex-direction: column;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    background-color: white;
    flex: 1;
    min-height: 400px; /* Altura mínima para garantir visibilidade */
    /* Otimizações para iframe */
    display: block;
    object-fit: contain;
    overflow: auto;
}

/* Garante que o iframe seja responsivo */
.iframe-container iframe:focus {
    outline: none;
}

/* Loading state */
.modal-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary);
    font-size: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
    z-index: 10;
}

.modal-loading .spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--primary-light);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Toast Notification Styles */
.demo-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.demo-toast.show {
    transform: translateX(0);
}

.demo-toast .toast-icon {
    font-size: 1.2rem;
}

.demo-toast .toast-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
    margin-left: 10px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.demo-toast .toast-close:hover {
    opacity: 1;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
    }
    
    .hero-text {
        padding-right: 0;
        margin-bottom: 40px;
        text-align: center;
    }
    
    .benefit-item {
        flex: 0 0 calc(33.333% - 30px);
    }
    
    .game-card {
        flex: 0 0 calc(50% - 30px);
    }
    
    .audience-card {
        flex: 0 0 calc(50% - 30px);
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-text {
        order: 2;
    }
    
    .founder-image {
        order: 1;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .hero-text h2 {
        font-size: 2rem;
    }
    
    .hero-text .hero-subheadline {
        font-size: 0.9rem;
        margin-bottom: 20px;
        margin-top: 10px;
    }
    
    .benefit-item {
        flex: 0 0 calc(50% - 30px);
    }
    
    .game-card {
        flex: 0 0 100%;
    }
    
    .reason-item {
        padding: 15px;
    }
    
    .audience-card {
        flex: 0 0 100%;
    }
      .modal-content {
        width: 95%;
        height: 92vh; /* Ajustado para manter proporção */
        margin: 15px; /* Reduzido de 20px */
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .modal-close {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }
}

/* Responsividade para accordion reasons */
@media (max-width: 768px) {
    .reasons-accordion {
        margin: 0 15px;
    }
    
    .reason-question {
        padding: 20px;
    }
    
    .question-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .reason-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .reason-question h3 {
        font-size: 1rem;
    }
    
    .reason-item.active .reason-answer {
        padding: 0 20px 20px 20px;
    }
    
    /* FAQ Responsividade */
    .faq-accordion {
        margin: 0 15px;
    }
    
    .faq-question {
        padding: 15px 20px;
    }
    
    .faq-question h3 {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 20px 15px;
    }
}

@media (max-width: 480px) {
    .reason-question {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .toggle-icon {
        align-self: flex-end;
        margin-top: -30px;
    }
    
    .question-content {
        width: 100%;
    }
    
    /* FAQ em telas muito pequenas */
    .faq-accordion {
        margin: 0 10px;
    }
    
    .faq-question {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .faq-question h3 {
        font-size: 0.95rem;
        width: 100%;
    }
    
    .toggle-icon {
        align-self: flex-end;
        margin-top: -30px;
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .hero-text h2 {
        font-size: 1.8rem;
    }
    
    .benefit-item {
        flex: 0 0 100%;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
      .modal-content {
        width: 98%;
        height: 96vh; /* Maximizado para telas pequenas */
        margin: 5px; /* Reduzido ainda mais */
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
}

/* Animation improvements */
@media (prefers-reduced-motion: reduce) {
    .demo-modal,
    .modal-content {
        transition: none;
    }
}

/* Focus management */
.demo-modal:focus {
    outline: none;
}

.modal-close:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}
