/* ========================================
   COMPONENTS.CSS - ShadCN-Inspired Components
   Gran Vía Verde
   ======================================== */

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    background-color: var(--color-green-primary);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}

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

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary-large {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--color-green-primary);
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
    text-align: center;
}

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

.btn-secondary {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    background-color: transparent;
    color: var(--color-green-primary);
    font-weight: 600;
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-green-primary);
    transition: all var(--transition-base);
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}

.btn-secondary:hover {
    background-color: var(--color-green-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary-large {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: white;
    color: var(--color-green-primary);
    font-weight: 600;
    font-size: 1.125rem;
    border-radius: var(--radius-xl);
    border: 2px solid white;
    transition: all var(--transition-base);
    cursor: pointer;
    text-align: center;
}

.btn-secondary-large:hover {
    background-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Cards */
.card {
    background-color: white;
    border-radius: var(--radius-2xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.card-image {
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 0.5rem;
}

.card-text {
    color: var(--color-gray-600);
    line-height: 1.75;
}

/* Project Card */
.project-card {
    background-color: white;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    cursor: pointer;
}

.project-card:hover {
    box-shadow: var(--shadow-2xl);
    transform: translateY(-6px);
}

.project-card-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-card-image img {
    transform: scale(1.1);
}

.project-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--color-green-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
}

.project-card-content {
    padding: var(--spacing-lg);
}

.project-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 0.5rem;
}

.project-card-location {
    display: flex;
    align-items: center;
    color: var(--color-gray-600);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.project-card-location svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
}

.project-card-description {
    color: var(--color-gray-600);
    line-height: 1.75;
    margin-bottom: 1rem;
}

.project-card-stats {
    display: flex;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-gray-200);
}

.project-stat {
    flex: 1;
}

.project-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-green-primary);
}

.project-stat-label {
    font-size: 0.875rem;
    color: var(--color-gray-600);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--color-gray-200);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -1.5rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    background-color: var(--color-green-primary);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--color-gray-200);
}

.timeline-marker.active {
    width: 1.5rem;
    height: 1.5rem;
    left: -1.75rem;
    box-shadow: 0 0 0 3px var(--color-green-primary);
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px var(--color-green-primary);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(58, 125, 68, 0.3);
    }
}

.timeline-content {
    background-color: white;
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.timeline-year {
    display: inline-block;
    background-color: var(--color-green-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 0.5rem;
}

.timeline-text {
    color: var(--color-gray-600);
    line-height: 1.75;
}

/* Accordion */
.accordion-item {
    background-color: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-base);
}

.accordion-item:hover {
    box-shadow: var(--shadow-lg);
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background-color: white;
    border: none;
    cursor: pointer;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-gray-900);
    text-align: left;
    transition: all var(--transition-base);
}

.accordion-header:hover {
    background-color: var(--color-gray-50);
}

.accordion-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--color-green-primary);
    transition: transform var(--transition-base);
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.accordion-item.active .accordion-content {
    max-height: 800px;
    padding: 0 1.5rem 1.5rem;
}

.accordion-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 0 auto 1rem;
    display: block;
    box-shadow: var(--shadow-md);
}

/* Form Elements */
.form-label {
    display: block;
    font-weight: 600;
    color: var(--color-gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all var(--transition-base);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-green-primary);
    box-shadow: 0 0 0 3px rgba(58, 125, 68, 0.1);
}

.form-input::placeholder {
    color: var(--color-gray-400);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: white;
    border-radius: var(--radius-2xl);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    z-index: 10;
    animation: modalSlideIn var(--transition-slow);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: white;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 20;
    transition: all var(--transition-base);
}

.modal-close:hover {
    background-color: var(--color-gray-100);
    transform: rotate(90deg);
}

/* Social Icons */
.social-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--color-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray-700);
    transition: all var(--transition-base);
}

.social-icon:hover {
    background-color: var(--color-green-primary);
    color: white;
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Testimonial Card */
.testimonial-card {
    background-color: white;
    border-radius: var(--radius-2xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.testimonial-avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    margin: 0 auto 1rem;
    overflow: hidden;
    border: 4px solid var(--color-green-primary);
}

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

.testimonial-quote {
    font-size: 1.125rem;
    font-style: italic;
    color: var(--color-gray-700);
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

.testimonial-quote::before {
    content: '"';
    font-size: 2rem;
    color: var(--color-green-primary);
    font-family: Georgia, serif;
}

.testimonial-quote::after {
    content: '"';
    font-size: 2rem;
    color: var(--color-green-primary);
    font-family: Georgia, serif;
}

.testimonial-author {
    font-weight: 700;
    color: var(--color-gray-900);
    font-size: 1rem;
}

.testimonial-role {
    color: var(--color-gray-600);
    font-size: 0.875rem;
}

/* Video Embed */
.video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin: var(--spacing-lg) 0;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
