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

:root {
    --primary-color: #e02020;
    --primary-dark: #c01818;
    --secondary-color: #333333;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --bg-light: #f8f8f8;
    --white: #ffffff;
    --success: #28a745;
    --error: #dc3545;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

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

/* Header */
.main-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 24px;
    font-weight: bold;
}

.logo i {
    font-size: 28px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 2000;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
}

.mobile-nav ul {
    list-style: none;
    padding: 20px;
}

.mobile-nav li {
    margin-bottom: 15px;
}

.mobile-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 18px;
    display: block;
    padding: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: #222;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-large {
    padding: 16px 40px;
    font-size: 18px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

/* Search Section */
.search-section {
    padding: 40px 0;
    background: var(--bg-light);
}

.search-form {
    display: flex;
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-input-wrapper input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 16px;
}

.category-select {
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 16px;
    background: var(--white);
    cursor: pointer;
}

/* Petitions Section */
.petitions-section {
    padding: 60px 0;
}

.petitions-section h2 {
    font-size: 36px;
    margin-bottom: 40px;
    text-align: center;
}

.petitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.petition-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.petition-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.petition-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.petition-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.petition-content {
    padding: 20px;
}

.petition-category {
    display: inline-block;
    background: var(--bg-light);
    color: var(--text-color);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.petition-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.petition-excerpt {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 14px;
}

.petition-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.petition-author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 14px;
}

.petition-signatures {
    text-align: right;
}

.petition-signatures strong {
    display: block;
    font-size: 24px;
    color: var(--primary-color);
}

.petition-signatures span {
    font-size: 12px;
    color: var(--text-light);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
}

.progress-text {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 15px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.no-results i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* CTA Section */
.cta-section {
    background: var(--bg-light);
    padding: 80px 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.cta-content p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Footer */
.main-footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

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

.footer-section h4 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    font-size: 18px;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Create Petition Page */
.create-petition-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.create-petition-header {
    text-align: center;
    margin-bottom: 50px;
}

.create-petition-header h1 {
    font-size: 42px;
    margin-bottom: 15px;
}

.create-petition-header p {
    font-size: 18px;
    color: var(--text-light);
}

.petition-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.form-section h2 {
    font-size: 24px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
}

.form-group {
    margin-bottom: 25px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-light);
    font-size: 13px;
}

.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: var(--bg-light);
    cursor: pointer;
    transition: border-color 0.3s;
}

.file-upload-label:hover {
    border-color: var(--primary-color);
}

.file-upload-label i {
    font-size: 48px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.image-preview {
    margin-top: 15px;
}

.image-preview img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert i {
    font-size: 20px;
}

.alert-error {
    background: #fee;
    color: var(--error);
    border: 1px solid var(--error);
}

.alert-success {
    background: #efe;
    color: var(--success);
    border: 1px solid var(--success);
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

/* Petition Detail Page */
.success-banner {
    background: var(--success);
    color: var(--white);
    padding: 15px 0;
    text-align: center;
}

.success-banner i {
    margin-right: 10px;
}

.petition-detail {
    padding: 40px 0;
}

.petition-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
}

.petition-header {
    margin-bottom: 30px;
}

.petition-header h1 {
    font-size: 36px;
    margin-top: 10px;
    line-height: 1.3;
}

.petition-image-large {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
}

.petition-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.petition-description {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 40px;
}

.petition-author-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
    margin-bottom: 40px;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-avatar i {
    font-size: 48px;
    color: var(--text-light);
}

.author-details strong {
    display: block;
    font-size: 18px;
    margin-bottom: 5px;
}

.author-details span {
    display: block;
    color: var(--text-light);
}

.author-details small {
    display: block;
    color: var(--text-light);
    font-size: 13px;
    margin-top: 5px;
}

/* Recent Signatures */
.recent-signatures {
    margin-top: 40px;
}

.recent-signatures h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.signatures-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.signature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 8px;
}

.signature-avatar i {
    font-size: 32px;
    color: var(--text-light);
}

.signature-info strong {
    display: block;
    margin-bottom: 5px;
}

.signature-info small {
    color: var(--text-light);
    font-size: 13px;
}

.no-signatures {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

/* Sign Card */
.sign-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 30px;
}

.sign-card.sticky {
    position: sticky;
    top: 100px;
}

.sign-card-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.signature-count {
    text-align: center;
    margin-bottom: 20px;
}

.signature-count strong {
    display: block;
    font-size: 48px;
    color: var(--primary-color);
    line-height: 1;
}

.signature-count span {
    font-size: 16px;
    color: var(--text-light);
}

.goal-text {
    text-align: center;
    color: var(--text-light);
    margin-top: 10px;
}

.sign-form {
    margin-bottom: 30px;
}

/* Share Section */
.share-section {
    border-top: 2px solid var(--border-color);
    padding-top: 25px;
}

.share-section h4 {
    margin-bottom: 15px;
    font-size: 18px;
}

.share-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.facebook {
    background: #1877f2;
    color: var(--white);
}

.share-btn.twitter {
    background: #1da1f2;
    color: var(--white);
}

.share-btn.whatsapp {
    background: #25d366;
    color: var(--white);
}

.share-btn.copy {
    background: var(--secondary-color);
    color: var(--white);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .petition-layout {
        grid-template-columns: 1fr;
    }
    
    .sign-card.sticky {
        position: static;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .petitions-grid {
        grid-template-columns: 1fr;
    }
    
    .petition-header h1 {
        font-size: 28px;
    }
    
    .petition-image-large {
        height: 250px;
    }
    
    .form-section {
        padding: 25px;
    }
    
    .share-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .hero-content h1 {
        font-size: 26px;
    }
    
    .btn-large {
        padding: 14px 30px;
        font-size: 16px;
    }
}
