/* Reset any parent container constraints */
body {
    margin: 0 !important;
    padding: 0 !important;
}

/* Full Width Featured Image Section - ULTIMATE FIX */
.petition-featured-image-fullwidth {
    width: 100vw !important;
    position: relative;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    margin-top: 0 !important;
    margin-bottom: 30px !important;
    padding: 0 !important;
    max-width: none !important;
    overflow: hidden;
    box-sizing: border-box;
}

/* Force the image to be truly full width */
.petition-hero-image-full {
    width: 100vw !important;
    max-width: none !important;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    position: relative;
    left: 0 !important;
    right: 0 !important;
}

.image-caption{
    padding: 5px 20px 5px 5px !important;
}
/* Override any theme container constraints */
.site-content,
.content-area,
.site-main,
.hentry,
.entry-content,
.post,
.page,
.container,
.wrap {
    overflow: visible !important;
}

/* Main Container */
.amnesty-petition-wrapper {
    max-width: 1350px;
    margin: 0 auto;
    font-family: -apple-system, 'Amnesty Trade Gothic', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    border-radius: 12px;
    /*box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);*/
    overflow: visible;
    padding: 0 20px;
}

/* Title Section with margin similar to description */
.petition-title-section {
    text-align: left;
    margin: 40px 0 40px 0;
    padding: 0;
}

.petition-main-title {
    font-size: 2.5em;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1.2;
    text-align: left;
}

/* Main Layout Container */
.petition-main-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    min-height: 600px;
    margin-top: 0;
}

/* Left Content Area */
.petition-content-left {
    padding: 0;
    background: transparent;
    font-family: 'Amnesty Trade Gothic';
}

.petition-header {
    margin-bottom: 0;
}

.petition-header h1 {
    display: none; /* Hide the old title location */
}

.petition-description {
    font-size: 1.1em;
    line-height: 1.7;
    color: #555;
    margin-bottom: 30px;
}

.petition-description p {
    margin-bottom: 15px;
    font-family: 'Amnesty Trade Gothic' !important;
}

.petition-letter-section {
    margin-top: 30px;
    font-family: 'Amnesty Trade Gothic' !important;
}

.preview-email-link{
    font-family: 'Amnesty Trade Gothic' !important;
}


.view-letter-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.view-letter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Right Form Area */

/* Fix for petition-form-right box shadow wrapping */
.petition-form-right {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    /* Add these properties to fix the wrapping issue */
    overflow: hidden;
    display: block;
    position: relative;
    /* Ensure the container wraps its content properly */
    contain: layout;
    /* Force proper height calculation */
    height: fit-content;
    min-height: auto;
}

/* Alternative clearfix method if overflow: hidden doesn't work */
.petition-form-right::after {
    content: "";
    display: table;
    clear: both;
    height: 0;
    visibility: hidden;
}

/* Ensure the form container doesn't have floating issues */
.petition-form-container {
    padding: 40px 30px;
    height: auto; /* Changed from 100% to auto */
    display: block;
    position: relative;
    /* Ensure proper content flow */
    overflow: visible;
}

/* Fix for form elements that might be causing the issue */
.petition-form {
    display: block;
    position: relative;
    width: 100%;
}

.petition-form .form-group {
    margin-bottom: 20px;
    display: block;
    clear: both;
    position: relative;
    
    
}

/* Additional fix for honeypot field positioning */
.honeypot-field {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f3f4;
}

.form-header h3 {
    font-size: 1.6em;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.form-header p {
    color: #666;
    margin: 0;
    font-size: 0.95em;
}

/* Form Styling */
.petition-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.petition-form input[type="text"],
.petition-form input[type="email"],
.petition-form input[type="tel"],
.petition-form select,
.petition-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.petition-form input:focus,
.petition-form select:focus,
.petition-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.petition-form textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #555;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 12px;
    transform: scale(1.2);
}

/* Consolidated and fixed submit button styling */
.submit-petition-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 18px 32px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* Ensure it doesn't float and is properly contained */
    float: none;
    clear: both;
    position: relative;
    margin-bottom: 0;
}

.submit-petition-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.submit-petition-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    font-size: 20px;
}

.btn-loader {
    font-size: 18px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fix for the message div */
.petition-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 600;
    text-align: center;
    display: block;
    clear: both;
    position: relative;
}

.petition-message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.petition-message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Signature Stats */
.signature-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    margin: 40px -20px 0 -20px;
    border-radius: 0;
}

.stats-content {
    max-width: 600px;
    margin: 0 auto;
}

.signature-count {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.count-display {
    text-align: center;
}

.count-number {
    font-size: 3em;
    font-weight: 900;
    display: block;
    line-height: 1;
}

.count-label {
    font-size: 1.1em;
    opacity: 0.9;
}

.goal-info {
    font-size: 0.95em;
    opacity: 0.8;
}

.progress-container {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
    border-radius: 6px;
}

.progress-text {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Social Share Section */
.social-share-section {
    background: #f8f9fa;
    padding: 40px;
    text-align: center;
    margin: 0 -20px;
    border-radius: 0;
}

.share-header h4 {
    font-size: 1.5em;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
   
}

.share-header p {
    color: #666;
    margin: 0 0 30px 0;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    min-width: 120px;
    justify-content: center;
}

.social-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-btn.facebook {
    background: #1877f2;
}

.social-btn.facebook:hover {
    background: #166fe5;
    transform: translateY(-2px);
}

.social-btn.twitter {
    background: #1da1f2;
}

.social-btn.twitter:hover {
    background: #0d8bd9;
    transform: translateY(-2px);
}

.social-btn.x {
    background: #000000;
    color: #ffffff;
    transition: all 0.3s ease;
}

.social-btn.x:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-btn.x svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.social-btn.whatsapp {
    background: #25d366;
}

.social-btn.whatsapp:hover {
    background: #128c7e;
    transform: translateY(-2px);
}

.social-btn.copy-link {
    background: #6c757d;
}

.social-btn.copy-link:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.share-stats {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.share-count {
    font-size: 1.1em;
    color: #495057;
}

/* Modal Styling */
.letter-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #ffffff;
    margin: 3% auto;
    padding: 0;
    border: none;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-content h4 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0;
    padding: 20px 30px;
    font-size: 1.3em;
    font-weight: 600;
}

.close {
    color: black;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 1;
}

.letter-content {
    padding: 30px;
}

.letter-section {
    margin-bottom: 25px;
}

.letter-section strong {
    color: #333;
    font-size: 1.1em;
    display: block;
    margin-bottom: 10px;
}

.subject-content, .body-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    line-height: 1.6;
}

/* Remove old featured image styles */
.petition-featured-image {
    display: none;
}

.petition-hero-image {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .petition-main-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .amnesty-petition-wrapper {
        padding: 0 15px;
    }
    
    .petition-main-title {
        font-size: 2em;
    }
    
    .petition-hero-image-full {
        max-height: 250px;
    }
    
    .petition-title-section {
        margin: 30px 0;
    }
    
    .petition-form-container {
        padding: 30px 20px;
    }
    
    .social-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .social-btn {
        width: 200px;
        justify-content: center;
    }
    
    .signature-count {
        flex-direction: column;
        gap: 10px;
    }
    
    .count-number {
        font-size: 2.5em;
    }
    
    .signature-stats,
    .social-share-section {
        margin-left: -15px;
        margin-right: -15px;
        font-family:'Amnesty Trade Gothic' !important;
    }
}

@media (max-width: 480px) {
    .petition-main-title {
        font-size: 1.6em;
    }
    
    .petition-hero-image-full {
        max-height: 200px;
    }
}

.signature-stats-wrapper {
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 0 auto;
}

.signature-stats-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    font-family: 'Amnesty Trade Gothic' !important;
}

.signature-count-box {
    text-align: center;
}

.signature-count-number {
    font-size: 2rem;
    font-weight: bold;
    color: #111827;
}

.signature-count-label {
    display: block;
    font-size: 1rem;
    color: #6b7280;
}

.signature-goal {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: #4b5563;
}

.progress-bar-wrapper {
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.progress-bar-background {
    background-color: #e5e7eb;
    border-radius: 6px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-fill {
    background-color: #10b981;
    height: 100%;
    transition: width 0.3s ease-in-out;
}

.progress-percentage {
    font-size: 0.875rem;
    color: #374151;
}

/* NEW: Category and Tags Styling */
.petition-meta-section {
    margin: 20px 0 30px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.petition-category {
    display: flex;
    align-items: center;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.category-badge i {
    font-size: 16px;
}

.petition-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    text-transform: lowercase;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments for meta section */
@media (max-width: 768px) {
    .petition-meta-section {
        margin: 15px 0 25px 0;
        gap: 10px;
    }
    
    .category-badge {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .tag-badge {
        font-size: 11px;
        padding: 3px 10px;
    }
}

.expired-petition { opacity:.6; }
.expired-badge    { background:#dc3545;color:#fff;padding:2px 6px;
                    border-radius:3px;font-size:10px;margin-left:6px; }
                    
                    /* Banner & Gallery Upload Styles */
.banner-upload-container, .gallery-upload-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background: #f9f9f9;
}

.banner-preview img {
    display: block;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.no-banner {
    color: #666;
    font-style: italic;
    margin-bottom: 10px;
}

.remove-banner {
    margin-left: 10px;
    color: #a00;
}

.gallery-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    min-height: 60px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 10px;
}

.gallery-item {
    position: relative;
    display: inline-block;
}

.gallery-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.remove-gallery-item {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #a00;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-gallery-item:hover {
    background: #d00;
}

.upload-banner, .upload-gallery {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.upload-banner:hover, .upload-gallery:hover {
    background: #005a87;
    border-color: #005a87;
}

/* Banner & Gallery Frontend Styles */
.petition-banner-section {
    margin: 20px 0;
    text-align: center;
}

.petition-banner-image {
    width: 100%;
    max-width: 1200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.masonry-gallery {
  column-count: 1;
  column-gap: 12px;
  margin: 30px 0;
}

.masonry-gallery a {
  display: inline-block;
  margin-bottom: 12px;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
  break-inside: avoid;
}

.masonry-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.masonry-gallery a:hover img {
  transform: scale(1.03);
}

@media (min-width: 600px) {
  .masonry-gallery {
    column-count: 2;
  }
}

@media (min-width: 900px) {
  .masonry-gallery {
    column-count: 3;
  }
}

@media (min-width: 1200px) {
  .masonry-gallery {
    column-count: 4;
  }
}

.petition-video-section {
    margin: 40px 0;
    padding: 0;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-container iframe {
    width: 100%;
    height: 450px;
    border: none;
    display: block;
}


.petition-meta-name {
    display: inline-flex;
    align-items: center;
    background: black;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 17px;
    margin-bottom: 10px;
}

.petition-name,
.petition-country {
    font-weight: 800;
    color: white;
}

.separator {
    margin: 0 5px;
    color: white;
}

.petition-name-overlay {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background-color: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

th a {
    text-decoration: none;
    color: #0073aa;
}
th a:hover {
    text-decoration: underline;
}

