/**
 * Public styles for TWIA Magazine.
 */

/* General Styles */
:root {
    --primary-color: #1a365d !important;
    --primary-light: #2c4c7c !important;
    --primary-dark: #0e2547 !important;
    --accent-color: #e6b980 !important;
    --accent-light: #f0d1a7 !important;
    --accent-dark: #d9a55a !important;
    --text-color: #333 !important;
    --text-light: #666 !important;
    --text-lighter: #888 !important;
    --background-color: #f9f9f9 !important;
    --white: #fff !important;
    --success-color: #34d399 !important;
    --warning-color: #fbbf24 !important;
    --error-color: #ef4444 !important;
    --border-color: #e0e0e0 !important;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    --border-radius: 8px !important;
    --border-radius-sm: 4px !important;
    --border-radius-lg: 12px !important;
    --transition: all 0.3s ease !important;
}

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

.twia-button {
    display: inline-block !important;
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
    padding: 12px 24px !important;
    border-radius: var(--border-radius-sm) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: var(--transition) !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 16px !important;
    text-align: center !important;
}

.twia-button:hover {
    background-color: var(--primary-light) !important;
    color: var(--white) !important;
    text-decoration: none !important;
}

.twia-button.secondary {
    background-color: transparent !important;
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
}

.twia-button.secondary:hover {
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
}

.twia-button.accent {
    background-color: var(--accent-color) !important;
    color: var(--primary-dark) !important;
}

.twia-button.accent:hover {
    background-color: var(--accent-dark) !important;
}

/* Login Prompt */
.twia-login-prompt {
    background-color: var(--white) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow) !important;
    padding: 40px !important;
    text-align: center !important;
    max-width: 500px !important;
    margin: 50px auto !important;
}

.twia-login-prompt h2 {
    color: var(--primary-color) !important;
    margin-bottom: 20px !important;
}

.twia-login-prompt p {
    margin-bottom: 30px !important;
    color: var(--text-light) !important;
}

.twia-login-prompt-buttons {
    display: flex !important;
    justify-content: center !important;
    gap: 16px !important;
}

/* Magazine Grid */
.twia-magazine-grid {
    margin: 40px 0 !important;
}

.twia-magazine-filters {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 30px !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
}

.twia-magazine-filter-label {
    font-weight: 600 !important;
    color: var(--text-color) !important;
    margin-right: 8px !important;
}

.twia-magazine-filter-select {
    padding: 8px 12px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-sm) !important;
    color: var(--text-color) !important;
    background-color: var(--white) !important;
    min-width: 200px !important;
}

.twia-magazine-cards {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 24px !important;
}

.twia-magazine-card {
    background-color: var(--white) !important;
    border-radius: var(--border-radius) !important;
    overflow: hidden !important;
    box-shadow: var(--shadow) !important;
    transition: var(--transition) !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
}

.twia-magazine-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: var(--shadow-lg) !important;
}

.twia-magazine-card-badge {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    z-index: 1 !important;
}

.twia-magazine-card-badge.free {
    background-color: var(--success-color) !important;
    color: var(--white) !important;
}

.twia-magazine-card-badge.paid {
    background-color: var(--accent-color) !important;
    color: var(--primary-dark) !important;
}

.twia-magazine-card-image {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover !important;
    display: block !important;
}

.twia-magazine-card-content {
    padding: 20px !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.twia-magazine-card-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--primary-color) !important;
    margin-bottom: 8px !important;
    line-height: 1.3 !important;
}

.twia-magazine-card-edition {
    font-size: 14px !important;
    color: var(--text-lighter) !important;
    margin-bottom: 8px !important;
}

.twia-magazine-card-sector {
    display: inline-block !important;
    background-color: var(--background-color) !important;
    border-radius: 20px !important;
    padding: 4px 12px !important;
    font-size: 12px !important;
    color: var(--text-light) !important;
    margin-bottom: 16px !important;
}

.twia-magazine-card-actions {
    margin-top: auto !important;
}

/* Single Magazine */
.twia-single-magazine {
    background-color: var(--white) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow) !important;
    overflow: hidden !important;
    margin: 40px 0 !important;
}

.twia-magazine-header {
    padding: 30px !important;
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 30px !important;
    align-items: center !important;
}

.twia-magazine-cover {
    width: 200px !important;
    height: 280px !important;
    object-fit: cover !important;
    border-radius: var(--border-radius-sm) !important;
    box-shadow: var(--shadow) !important;
}

.twia-magazine-info {
    flex: 1 !important;
    min-width: 300px !important;
}

.twia-magazine-title {
    font-size: 28px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
}

.twia-magazine-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    margin-bottom: 16px !important;
}

.twia-magazine-meta-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
}

.twia-magazine-description {
    margin-bottom: 20px !important;
    line-height: 1.6 !important;
}

.twia-magazine-actions {
    display: flex !important;
    gap: 16px !important;
    margin-top: 20px !important;
    flex-wrap: wrap !important;
}

.twia-magazine-content {
    padding: 30px !important;
}

.twia-magazine-flipbook {
    width: 100% !important;
    min-height: 600px !important;
    margin-bottom: 30px !important;
}

.twia-magazine-message {
    background-color: var(--background-color) !important;
    padding: 20px !important;
    border-radius: var(--border-radius-sm) !important;
    margin-bottom: 30px !important;
}

.twia-magazine-message.error {
    background-color: #ffe6e6 !important;
    border-left: 4px solid var(--error-color) !important;
}

.twia-magazine-message.info {
    background-color: #e6f7ff !important;
    border-left: 4px solid #1890ff !important;
}

.twia-magazine-article-links {
    margin-top: 30px !important;
}

.twia-magazine-article-links h3 {
    color: var(--primary-color) !important;
    margin-bottom: 16px !important;
    font-size: 20px !important;
}

.twia-magazine-article-links ul {
    list-style: none !important;
    padding: 0 !important;
}

.twia-magazine-article-links li {
    margin-bottom: 12px !important;
}

.twia-magazine-article-links a {
    color: var(--primary-color) !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: var(--transition) !important;
}

.twia-magazine-article-links a:hover {
    color: var(--primary-light) !important;
    text-decoration: underline !important;
}

/* Sectors */
.twia-sectors {
    margin: 40px 0 !important;
}

.twia-sectors-grid {
    display: grid !important;
    gap: 24px !important;
}

.twia-sectors-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.twia-sectors-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.twia-sectors-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

.twia-sector-card {
    background-color: var(--white) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow) !important;
    overflow: hidden !important;
    transition: var(--transition) !important;
    position: relative !important;
    text-decoration: none !important;
    display: block !important;
}

.twia-sector-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: var(--shadow-lg) !important;
}

.twia-sector-card-image {
    height: 200px !important;
    width: 100% !important;
    object-fit: cover !important;
}

.twia-sector-card-content {
    padding: 20px !important;
}

.twia-sector-card-title {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: var(--primary-color) !important;
    margin-bottom: 8px !important;
}

.twia-sector-card-count {
    font-size: 14px !important;
    color: var(--text-light) !important;
}

/* Dashboard */
.twia-dashboard {
    margin: 40px 0 !important;
}

.twia-dashboard-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 30px !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

.twia-dashboard-title {
    color: var(--primary-color) !important;
    margin: 0 !important;
}

.twia-dashboard-subscription {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

.twia-subscription-badge {
    display: inline-block !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.twia-subscription-badge.free {
    background-color: var(--background-color) !important;
    color: var(--text-light) !important;
}

.twia-subscription-badge.paid {
    background-color: var(--success-color) !important;
    color: var(--white) !important;
}

.twia-dashboard-cards {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 24px !important;
    margin-bottom: 40px !important;
}

.twia-dashboard-card {
    background-color: var(--white) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow) !important;
    padding: 24px !important;
}

.twia-dashboard-card-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--primary-color) !important;
    margin-bottom: 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.twia-dashboard-card-icon {
    width: 24px !important;
    height: 24px !important;
    color: var(--primary-color) !important;
}

.twia-dashboard-section {
    margin-bottom: 40px !important;
}

.twia-dashboard-section-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
}

.twia-dashboard-section-title {
    font-size: 24px !important;
    color: var(--primary-color) !important;
    margin: 0 !important;
}

.twia-dashboard-table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.twia-dashboard-table th,
.twia-dashboard-table td {
    padding: 12px 15px !important;
    text-align: left !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.twia-dashboard-table th {
    background-color: var(--background-color) !important;
    font-weight: 600 !important;
    color: var(--text-color) !important;
}

.twia-dashboard-profile {
    background-color: var(--white) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow) !important;
    padding: 24px !important;
    margin-bottom: 40px !important;
}

.twia-profile-header {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    margin-bottom: 20px !important;
}

.twia-profile-avatar {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    background-color: var(--primary-light) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    color: var(--white) !important;
    font-size: 32px !important;
    font-weight: 600 !important;
}

.twia-profile-info h2 {
    margin: 0 0 5px 0 !important;
    color: var(--primary-color) !important;
}

.twia-profile-info p {
    margin: 0 !important;
    color: var(--text-light) !important;
}

.twia-profile-details {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 20px !important;
}

.twia-profile-item {
    margin-bottom: 16px !important;
}

.twia-profile-item-label {
    font-size: 14px !important;
    color: var(--text-lighter) !important;
    margin-bottom: 4px !important;
}

.twia-profile-item-value {
    font-weight: 600 !important;
    color: var(--text-color) !important;
}

/* Login & Register */
.twia-auth-container {
    max-width: 500px !important;
    margin: 40px auto !important;
    background-color: var(--white) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow) !important;
    padding: 40px !important;
}

.twia-auth-header {
    text-align: center !important;
    margin-bottom: 30px !important;
}

.twia-auth-header h1 {
    color: var(--primary-color) !important;
    margin-bottom: 10px !important;
}

.twia-auth-header p {
    color: var(--text-light) !important;
    margin-bottom: 0 !important;
}

.twia-auth-form {
    margin-bottom: 20px !important;
}

.twia-form-group {
    margin-bottom: 20px !important;
}

.twia-form-label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
    color: var(--text-color) !important;
}

.twia-form-control {
    width: 100% !important;
    padding: 12px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-sm) !important;
    font-size: 16px !important;
    color: var(--text-color) !important;
}

.twia-form-control:focus {
    border-color: var(--primary-color) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(26, 54, 93, 0.2) !important;
}

.twia-form-row {
    display: flex !important;
    gap: 16px !important;
}

.twia-form-row .twia-form-group {
    flex: 1 !important;
}

.twia-form-check {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 20px !important;
}

.twia-form-check-input {
    margin-right: 10px !important;
}

.twia-form-check-label {
    color: var(--text-color) !important;
}

.twia-auth-footer {
    text-align: center !important;
    margin-top: 30px !important;
    padding-top: 20px !important;
    border-top: 1px solid var(--border-color) !important;
}

.twia-auth-footer p {
    color: var(--text-light) !important;
    margin-bottom: 10px !important;
}

.twia-auth-footer a {
    color: var(--primary-color) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

.twia-auth-footer a:hover {
    text-decoration: underline !important;
}

.twia-auth-error {
    background-color: #ffe6e6 !important;
    border-left: 4px solid var(--error-color) !important;
    padding: 12px 16px !important;
    margin-bottom: 20px !important;
    color: #d32f2f !important;
}

.twia-auth-success {
    background-color: #e6f7e6 !important;
    border-left: 4px solid var(--success-color) !important;
    padding: 12px 16px !important;
    margin-bottom: 20px !important;
    color: #2e7d32 !important;
}

/* Plans Page */
.twia-plans {
    margin: 40px 0 !important;
}

.twia-plans-header {
    text-align: center !important;
    margin-bottom: 40px !important;
}

.twia-plans-header h1 {
    color: var(--primary-color) !important;
    margin-bottom: 16px !important;
}

.twia-plans-header p {
    color: var(--text-light) !important;
    max-width: 600px !important;
    margin: 0 auto !important;
}

.twia-plans-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 30px !important;
    margin-bottom: 40px !important;
}

.twia-plan-card {
    background-color: var(--white) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow) !important;
    padding: 30px !important;
    text-align: center !important;
    position: relative !important;
    overflow: hidden !important;
    transition: var(--transition) !important;
}

.twia-plan-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: var(--shadow-lg) !important;
}

.twia-plan-card.popular::before {
    content: 'Popular' !important;
    position: absolute !important;
    top: 15px !important;
    right: -30px !important;
    background-color: var(--accent-color) !important;
    color: var(--primary-dark) !important;
    padding: 5px 30px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    transform: rotate(45deg) !important;
}

.twia-plan-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
    margin-bottom: 16px !important;
}

.twia-plan-price {
    font-size: 36px !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
    margin-bottom: 16px !important;
}

.twia-plan-period {
    font-size: 14px !important;
    color: var(--text-light) !important;
}

.twia-plan-features {
    list-style: none !important;
    padding: 0 !important;
    margin: 30px 0 !important;
    text-align: left !important;
}

.twia-plan-features li {
    margin-bottom: 12px !important;
    padding-left: 30px !important;
    position: relative !important;
    color: var(--text-color) !important;
}

.twia-plan-features li::before {
    content: '✓' !important;
    position: absolute !important;
    left: 0 !important;
    color: var(--success-color) !important;
    font-weight: 600 !important;
}

.twia-plan-card .twia-button {
    width: 100% !important;
}

.twia-current-plan {
    background-color: var(--background-color) !important;
    border-radius: var(--border-radius) !important;
    padding: 20px !important;
    margin-bottom: 40px !important;
    text-align: center !important;
}

.twia-current-plan-label {
    display: inline-block !important;
    background-color: var(--success-color) !important;
    color: var(--white) !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin-bottom: 16px !important;
}

.twia-current-plan-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
    margin-bottom: 8px !important;
}

.twia-current-plan-info {
    color: var(--text-light) !important;
    margin-bottom: 16px !important;
}

.twia-payment-methods {
    margin-top: 40px !important;
}

.twia-payment-methods-title {
    text-align: center !important;
    font-size: 24px !important;
    color: var(--primary-color) !important;
    margin-bottom: 30px !important;
}

/* Media Queries */
@media (max-width: 768px) {
    .twia-magazine-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 20px !important;
    }
    
    .twia-magazine-cover {
        width: 150px !important;
        height: 210px !important;
    }
    
    .twia-sectors-grid.columns-3,
    .twia-sectors-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .twia-form-row {
        flex-direction: column !important;
        gap: 0 !important;
    }
    
    .twia-auth-container {
        padding: 30px 20px !important;
    }
}

@media (max-width: 576px) {
    .twia-magazine-cards,
    .twia-sectors-grid,
    .twia-plans-container {
        grid-template-columns: 1fr !important;
    }
    
    .twia-dashboard-cards {
        grid-template-columns: 1fr !important;
    }
    
    .twia-dashboard-table {
        display: block !important;
        overflow-x: auto !important;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0 !important;
        transform: translateY(20px) !important;
    }
    to {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

.twia-magazine-card,
.twia-sector-card,
.twia-plan-card {
    animation: fadeIn 0.5s ease-out !important;
}

.twia-magazine-card:nth-child(2),
.twia-sector-card:nth-child(2),
.twia-plan-card:nth-child(2) {
    animation-delay: 0.1s !important;
}

.twia-magazine-card:nth-child(3),
.twia-sector-card:nth-child(3),
.twia-plan-card:nth-child(3) {
    animation-delay: 0.2s !important;
}

.twia-magazine-card:nth-child(4),
.twia-sector-card:nth-child(4) {
    animation-delay: 0.3s !important;
}
