:root {
    --bs-primary: #8b1e1e;
    --bs-primary-rgb: 139, 30, 30;
}

body {
    color: #222;
    font-family: "Inter", sans-serif;
}

.btn-primary {
    --bs-btn-bg: #8b1e1e;
    --bs-btn-border-color: #8b1e1e;

    --bs-btn-hover-bg: #6f1818;
    --bs-btn-hover-border-color: #6f1818;
}

main {
    background-color: #000;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    background-color: #8b1e1e;
    border-bottom: 2px solid #4a0d12;
}

.navbar-brand {
    font-weight: 700;
}

.navbar-brand,
.navbar .nav-link {
    color: white;
}

.navbar-brand:hover,
.navbar .nav-link:hover {
    color: white;
}
/* */

/* HERO */
.hero {
    position: relative;
    min-height: 550px;

    background-image: url("banner.webp");
    background-size: cover;
    background-position: 45% 50%;
    background-repeat: no-repeat;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(31, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: white;

    min-height: 550px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-main {
    text-align: center;
    transform: translateY(-40px);
}

.hero-caption {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    right: 0;

    margin: 0;

    font-size: clamp(1.1rem, 2vw, 1.3rem);
    font-weight: 600;
    text-align: center;

    text-shadow:
        0 2px 16px #000,
        0 2px 16px #000,
        0 2px 16px #000;
}

.hero h1 {
    margin: 0;
    color: #d71920;
    font-size: clamp(5rem, 12vw, 10rem);
    line-height: 0.9;
}

.hero h2 {
    margin-top: 0.5rem;
    font-size: clamp(1.8rem, 5vw, 4.5rem);
    line-height: 1;
}

.hero h1,
.hero h2 {
    font-family: "Oswald", sans-serif;
    text-transform: uppercase;
    text-shadow:
        0 2px 3px #000,
        0 2px 3px #000,
        0 2px 3px #000,
        0 5px 8px #000,
        0 5px 8px #000,
        0 5px 8px #000,
        0 8px 10px #000,
        0 8px 10px #000,
        0 8px 10px #000,
        0 12px 30px #000;
}
/* */

/* SECCIÓN PETICIÓN */
.petition {
    background-color: #e5e5e5;
    padding: 70px 0;
}

.petition > .container {
    background-color: #f5f5f5;
    padding: 60px;
}

.petition-heading {
    margin-bottom: 2.5rem;
    text-align: center;
}

.petition h2 {
    margin: 0;

    color: #8b1e1e;
    font-family: "Oswald", sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-transform: uppercase;
}

.petition-content h3 {
    margin-bottom: 2rem;

    color: #111;
    font-family: "Oswald", sans-serif;
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 700;
    text-align: center;
}

.petition-content ul {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.petition-content li {
    margin-bottom: 1.25rem;

    color: #111;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.7;
}

.petition-content li::marker {
    font-weight: 700;
}

.petition-line {
    width: 90px;
    height: 5px;
    margin: 0.75rem auto 0;
    background: linear-gradient(
        to right,
        #111 0%,
        #111 33.33%,
        #d71920 33.33%,
        #d71920 66.66%,
        #16803c 66.66%,
        #16803c 100%
    );
}

.petition-content {
    max-width: 900px;
    margin: 0 auto;
}

.petition p {
    margin-bottom: 1.5rem;
    color: #111;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.7;
    text-align: justify;
}

.petition-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.petition-button {
    margin: 0;
    font-weight: 700;
    text-transform: uppercase;
}

.petition-text {
    position: relative;
    max-height: 550px;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.petition-text::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 140px;
    background: linear-gradient(
        to bottom,
        rgba(245, 245, 245, 0),
        #f5f5f5
    );
    pointer-events: none;
}

.petition-text.expanded {
    max-height: none;
}

.petition-text.expanded::after {
    display: none;
}

.petition-toggle {
    display: block;
    margin: 1.5rem auto 0;
    padding: 0;

    border: 0;
    background: none;

    color: #8b1e1e;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;

    cursor: pointer;
}

.petition-toggle:hover {
    text-decoration: underline;
}

.petition-names {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem 1rem;

    max-width: 750px;
    margin: 2rem auto 0;

    color: #444;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
}

@media (max-width: 576px) {
    .petition {
        padding: 40px 0;
    }

    .petition > .container {
        padding: 40px 25px;
    }

    .petition p {
        font-size: 1.05rem;
    }

    .petition-text {
        max-height: 500px;
    }

    .petition-names {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-top: 2.5rem;
    }
}
/* */

/* SECCIÓN FIRMAS */
.signatures {
    background-color: #f5f5f5;
    padding: 70px 0;
}

.signatures > .container {
    max-width: 1400px;
    background-color: #f5f5f5;
    padding: 60px 30px;
}

.signatures-heading {
    margin-bottom: 3rem;
    text-align: center;
}

.signatures-count {
    color: #8b1e1e;
    font-family: "Oswald", sans-serif;
    font-size: clamp(5rem, 12vw, 9rem);
    font-weight: 700;
    line-height: 0.85;
}

.signatures-heading h2 {
    margin: 0.5rem 0 0;

    font-family: "Oswald", sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    text-transform: uppercase;
}

.signatures-heading .petition-line {
    margin-top: 1rem;
}

.signatures-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.signature-form,
.signature-list {
    height: 605px;
    padding: 30px;

    background-color: white;
    border-radius: 4px;
}

.signature-form h3,
.signature-list h3 {
    margin-bottom: 1.5rem;

    font-family: "Oswald", sans-serif;
    font-size: 2rem;
    text-transform: uppercase;
}

.signature-form .form-control {
    border: 1px solid #999;
    border-radius: 3px;
}

.signature-form .form-control:focus {
    border-color: #8b1e1e;
    box-shadow: 0 0 0 2px rgba(139, 30, 30, 0.15);
}

.signature-form .btn {
    margin-top: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
}

.btn-primary:disabled {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    opacity: 0.5;
}

.signers {
    height: calc(100% - 60px);
    overflow-y: auto;

    border-top: 1px solid #ddd;
}

.signer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    padding: 12px 5px;
    border-bottom: 1px solid #ddd;
}

.signer-name {
    font-weight: 500;
}

.signer-description {
    margin-top: 2px;
    color: #888;
    font-size: 0.85rem;
}

.signer-date {
    flex-shrink: 0;
    color: #999;
    font-size: 0.85rem;
    font-weight: 400;
}

.required {
    color: #d71920;
}

@media (max-width: 1000px) {
    .signatures-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .signatures {
        padding: 40px 0;
    }

    .signatures > .container {
        padding: 40px 20px;
    }

    .signature-form,
    .signature-list {
        width: 100%;
        max-width: 100%;
        height: auto;
        padding: 25px;
    }

    .signature-list {
        height: 400px;
    }
}

@media (max-width: 576px) {
    .signatures > .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .signature-form,
    .signature-list {
        padding-left: 15px;
        padding-right: 15px;
        min-width: 0;
    }
}

/* SECCIÓN COMPARTIR */
.share {
    background-color: #8b1e1e;
    padding: 70px 0;
    color: white;
}

.share-content {
    text-align: center;
}

.share h2 {
    margin: 0;

    font-family: "Oswald", sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-transform: uppercase;
}

.share .petition-line {
    margin-top: 1rem;
    background: linear-gradient(
        to right,
        #111 0%,
        #111 33.33%,
        #d71920 33.33%,
        #d71920 66.66%,
        #16803c 66.66%,
        #16803c 100%
    );
}

.share p {
    margin: 1.5rem auto 2rem;
    font-size: 1.1rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.share-button {
    width: 56px;
    height: 56px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: white;
    color: #8b1e1e;

    font-size: 1.6rem;
    text-decoration: none;

    border-radius: 3px;
}

.share-button:hover {
    background-color: #eee;
    color: #6f1818;
}

#share-copylink i {
    font-size: 2rem !important;
}

@media (max-width: 576px) {
    .share-buttons {
        gap: 12px;
    }

    .share-button {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }
}

/* ANIMACIONES */
.petition-content,
.signature-form,
.signature-list,
.share-content {
    opacity: 0;
    transform: translateY(25px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

.petition-content.visible,
.signature-form.visible,
.signature-list.visible,
.share-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* MODAL */
.signature-success-icon,
.signature-error-icon {
    display: block;
    margin-bottom: 1rem;
    font-size: 3rem;
}

.signature-success-icon {
    color: #16803c;
}

.signature-error-icon {
    color: #d71920;
}

#signature-modal h3 {
    font-family: "Oswald", sans-serif;
    text-transform: uppercase;
}

/* FIRMAS DESTACADAS */
.featured-signatures {
    width: 100%;
    margin-bottom: 3rem;
}

.featured-signatures-label {
    margin-bottom: 0.5rem;

    color: #8b1e1e;
    font-family: "Oswald", sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.featured-signatures-ticker {
    position: relative;

    width: 100%;
    overflow: hidden;

    background-color: #8b1e1e;
    color: white;

    padding: 12px 0;
}

.featured-signatures-ticker::before,
.featured-signatures-ticker::after {
    content: "";

    position: absolute;
    top: 0;
    bottom: 0;

    width: 80px;

    z-index: 1;
    pointer-events: none;
}

.featured-signatures-ticker::before {
    left: 0;

    background: linear-gradient(
        to right,
        #8b1e1e,
        rgba(139, 30, 30, 0)
    );
}

.featured-signatures-ticker::after {
    right: 0;

    background: linear-gradient(
        to left,
        #8b1e1e,
        rgba(139, 30, 30, 0)
    );
}

.featured-signatures-track {
    display: flex;
    width: max-content;

    animation: featured-signatures-scroll var(--ticker-duration) linear infinite;
}

.featured-signatures-list {
    display: flex;
    flex-shrink: 0;
}

.featured-signatures-list span {
    display: flex;
    align-items: center;

    white-space: nowrap;

    font-size: 1.15rem;
    font-weight: 600;
}

.featured-signatures-list span::after {
    content: "•";
    margin: 0 2rem;
    opacity: 0.6;
}

.featured-signatures-group {
    display: flex;
    flex-shrink: 0;
}

@keyframes featured-signatures-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-2 * var(--ticker-distance)));
    }
}