/**
 * Max Pro Petition - Frontend Layout Styles
 * Styles for layout shortcodes and page builder elements
 * Version: 2.0.0
 */

/* Layout Row */
.layout-row {
    display: flex;
    flex-wrap: wrap;
    margin: 20px 0;
    gap: 20px;
    align-items: stretch;
}

/* Archive Layout Specific Styles */
.archive-layout {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    align-items: flex-start;
    position: relative;
    overflow: visible;
}

.archive-sidebar {
    width: 350px;
    flex-shrink: 0;
    align-self: flex-start;
    position: sticky;
    top: 20px;
    z-index: 1000;
    height: fit-content;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.archive-content {
    flex: 1;
    min-width: 0;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Layout Columns */
.layout-col {
    flex: 1;
    min-width: 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.layout-col:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Column Widths */
.layout-col-2 {
    flex: 0 0 calc(50% - 10px);
}

.layout-col-3 {
    flex: 0 0 calc(33.333% - 13.33px);
}

.layout-col-4 {
    flex: 0 0 calc(25% - 15px);
}

.layout-col-6 {
    flex: 0 0 calc(16.666% - 16.67px);
}

/* Layout Container */
.layout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Layout Section */
.layout-section {
    padding: 60px 0;
    margin: 40px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-top: 4px solid #0073aa;
    border-bottom: 4px solid #0073aa;
    position: relative;
}

.layout-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

/* Video Embed Styles */
.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 30px 0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: #fff;
}

.video-embed iframe,
.video-embed video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    border: none;
}

.video-embed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 115, 170, 0.1), rgba(70, 180, 80, 0.1));
    pointer-events: none;
    border-radius: 12px;
}

/* Audio Embed Styles */
.audio-embed {
    width: 100%;
    margin: 30px 0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.audio-embed::-webkit-media-controls-panel {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
}

.audio-embed::-webkit-media-controls-play-button {
    background: #0073aa;
    border-radius: 50%;
}

/* Enhanced Typography for Layout Elements */
.layout-col h1,
.layout-col h2,
.layout-col h3,
.layout-col h4,
.layout-col h5,
.layout-col h6 {
    color: #1e293b;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.layout-col h1 { font-size: 2.5rem; }
.layout-col h2 { font-size: 2rem; }
.layout-col h3 { font-size: 1.75rem; }
.layout-col h4 { font-size: 1.5rem; }
.layout-col h5 { font-size: 1.25rem; }
.layout-col h6 { font-size: 1.1rem; }

.layout-col p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 15px;
}

.layout-col ul,
.layout-col ol {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 15px;
    padding-left: 20px;
}

.layout-col li {
    margin-bottom: 8px;
}

/* Link Styles */
.layout-col a {
    color: #0073aa;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.layout-col a:hover {
    color: #005a87;
    border-bottom-color: #005a87;
}

/* Button Styles within Layout */
.layout-col .btn,
.layout-col button {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.layout-col .btn:hover,
.layout-col button:hover {
    background: linear-gradient(135deg, #005a87 0%, #004466 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.4);
}

/* Image Styles within Layout */
.layout-col img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.layout-col img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Table Styles within Layout */
.layout-col table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.layout-col table th,
.layout-col table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.layout-col table th {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    font-weight: 600;
}

.layout-col table tr:nth-child(even) {
    background: #f8f9fa;
}

.layout-col table tr:hover {
    background: #e6f3ff;
}

/* Blockquote Styles within Layout */
.layout-col blockquote {
    margin: 20px 0;
    padding: 20px 30px;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border-left: 4px solid #0073aa;
    border-radius: 8px;
    font-style: italic;
    color: #1e293b;
    position: relative;
}

.layout-col blockquote::before {
    content: '"';
    font-size: 4rem;
    color: #0073aa;
    position: absolute;
    top: -10px;
    left: 10px;
    opacity: 0.3;
}

/* Code Styles within Layout */
.layout-col code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #dc2626;
}

.layout-col pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.layout-col pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .layout-container {
        padding: 20px;
        margin: 0 15px;
    }
    
    .layout-section {
        padding: 40px 0;
        margin: 20px 0;
    }
}

@media (max-width: 768px) {
    .layout-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .layout-col,
    .layout-col-2,
    .layout-col-3,
    .layout-col-4,
    .layout-col-6 {
        flex: 1 1 100%;
        margin: 0;
    }
    
    .layout-container {
        padding: 15px;
        margin: 0 10px;
    }
    
    .layout-section {
        padding: 30px 0;
        margin: 15px 0;
    }
    
    .video-embed {
        margin: 20px 0;
    }
    
    .audio-embed {
        margin: 20px 0;
    }
    
    .layout-col h1 { font-size: 2rem; }
    .layout-col h2 { font-size: 1.75rem; }
    .layout-col h3 { font-size: 1.5rem; }
    .layout-col h4 { font-size: 1.25rem; }
    .layout-col h5 { font-size: 1.1rem; }
    .layout-col h6 { font-size: 1rem; }
    
    /* Archive layout responsive */
    .archive-layout {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }
    
    .archive-sidebar {
        width: 100%;
        position: static;
        order: 2;
    }
    
    .archive-content {
        order: 1;
    }
}

@media (max-width: 480px) {
    .layout-container {
        padding: 10px;
        margin: 0 5px;
    }
    
    .layout-section {
        padding: 20px 0;
        margin: 10px 0;
    }
    
    .layout-col {
        padding: 15px;
    }
    
    .layout-col h1 { font-size: 1.75rem; }
    .layout-col h2 { font-size: 1.5rem; }
    .layout-col h3 { font-size: 1.25rem; }
    .layout-col h4 { font-size: 1.1rem; }
    .layout-col h5 { font-size: 1rem; }
    .layout-col h6 { font-size: 0.9rem; }
}

/* Animation Classes */
.layout-col.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

.layout-section.slide-up {
    animation: slideUp 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print Styles */
@media print {
    .layout-row {
        display: block;
    }
    
    .layout-col,
    .layout-col-2,
    .layout-col-3,
    .layout-col-4,
    .layout-col-6 {
        display: block;
        width: 100%;
        margin: 10px 0;
        page-break-inside: avoid;
    }
    
    .layout-container,
    .layout-section {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .video-embed,
    .audio-embed {
        display: none;
    }
} 