/* ============================================
   PORTFOLIO PAGE STYLES
   ============================================ */

.portfolio-page {
    background: linear-gradient(135deg, #1a1410 0%, #2a1f1a 100%);
    min-height: 100vh;
}

/* ============================================
   PORTFOLIO NAVIGATION
   ============================================ */

.portfolio-nav {
    background: rgba(26, 20, 16, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--sacred-gold);
    text-decoration: none;
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.back-link:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: translateX(-5px);
}

.back-link i {
    font-size: 1rem;
}

/* ============================================
   PORTFOLIO HEADER
   ============================================ */

.portfolio-header {
    padding: 6rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.portfolio-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    height: 100%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.header-symbol {
    margin-bottom: 2rem;
}

.sacred-circle-small {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    position: relative;
}

.sacred-circle-small .circle-outer,
.sacred-circle-small .circle-middle,
.sacred-circle-small .circle-inner {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--sacred-gold);
}

.sacred-circle-small .circle-outer {
    width: 80px;
    height: 80px;
    top: 0;
    left: 0;
    opacity: 0.3;
}

.sacred-circle-small .circle-middle {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    opacity: 0.5;
}

.sacred-circle-small .circle-inner {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    background: var(--sacred-gold);
    opacity: 0.7;
}

.sacred-circle-small.spinning {
    animation: spin 20s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.portfolio-title {
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--sacred-gold);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.portfolio-subtitle {
    font-family: var(--font-secondary);
    font-size: 1.3rem;
    color: var(--earth-light);
    font-style: italic;
    margin-bottom: 2rem;
}

.portfolio-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.portfolio-ornament .ornament-symbol {
    color: var(--sacred-gold);
    font-size: 1.2rem;
}

.portfolio-ornament .ornament-line {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sacred-gold), transparent);
}

/* ============================================
   FILTER TABS
   ============================================ */

.filter-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.filter-toggle-btn {
    display: none; /* Oculto por defecto en desktop */
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(184, 115, 51, 0.15) 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 12px;
    color: var(--sacred-gold);
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.filter-toggle-btn:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(184, 115, 51, 0.25) 100%);
    border-color: var(--sacred-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.filter-toggle-btn .toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.filter-toggle-btn.active .toggle-icon {
    transform: rotate(180deg);
}

.filter-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 1rem;
    background: rgba(26, 20, 16, 0.5);
    border-radius: 50px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 50px;
    color: var(--earth-light);
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--sacred-gold);
    transform: translateY(-2px);
}

.filter-tab.active {
    background: var(--sacred-gold);
    color: var(--earth-dark);
    border-color: var(--sacred-gold);
    font-weight: 600;
}

.filter-tab i {
    font-size: 1rem;
}

/* ============================================
   PORTFOLIO GRID
   ============================================ */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.portfolio-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-item:nth-child(1) { animation-delay: 0.1s; }
.portfolio-item:nth-child(2) { animation-delay: 0.2s; }
.portfolio-item:nth-child(3) { animation-delay: 0.3s; }
.portfolio-item:nth-child(4) { animation-delay: 0.4s; }
.portfolio-item:nth-child(5) { animation-delay: 0.5s; }
.portfolio-item:nth-child(6) { animation-delay: 0.6s; }

.portfolio-item.hidden {
    display: none;
}

.portfolio-item:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.portfolio-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-item-image {
    transform: scale(1.1);
}

.portfolio-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(26, 20, 16, 0.95) 0%,
        rgba(26, 20, 16, 0.5) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

.portfolio-item:hover .portfolio-item-overlay {
    opacity: 1;
}

.portfolio-item-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--sacred-gold);
    color: var(--earth-dark);
    font-family: var(--font-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 0.75rem;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portfolio-item-title {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    color: var(--sacred-gold);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.portfolio-item-date {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    color: var(--earth-light);
    opacity: 0.8;
}

/* ============================================
   CEREMONY MODAL
   ============================================ */

.ceremony-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ceremony-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    background: var(--earth-dark);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.3);
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10002;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(26, 20, 16, 0.9);
    border: 2px solid var(--sacred-gold);
    color: var(--sacred-gold);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--sacred-gold);
    color: var(--earth-dark);
    transform: rotate(90deg);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10002;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(26, 20, 16, 0.9);
    border: 2px solid var(--sacred-gold);
    color: var(--sacred-gold);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-prev {
    left: 1rem;
}

.modal-next {
    right: 1rem;
}

.modal-nav:hover {
    background: var(--sacred-gold);
    color: var(--earth-dark);
    transform: translateY(-50%) scale(1.1);
}

.modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-height: 90vh;
    overflow: hidden;
}

.modal-image-container {
    background: var(--earth-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.modal-details {
    padding: 3rem;
    overflow-y: auto;
    background: linear-gradient(135deg, #1a1410 0%, #2a1f1a 100%);
}

/* Custom scrollbar for modal */
.modal-details::-webkit-scrollbar {
    width: 8px;
}

.modal-details::-webkit-scrollbar-track {
    background: rgba(212, 175, 55, 0.1);
    border-radius: 10px;
}

.modal-details::-webkit-scrollbar-thumb {
    background: var(--sacred-gold);
    border-radius: 10px;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sacred-gold) 0%, #b87333 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-icon i {
    font-size: 1.8rem;
    color: var(--earth-dark);
}

.modal-title-section h2 {
    font-family: var(--font-primary);
    font-size: 2rem;
    color: var(--sacred-gold);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.modal-date {
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    color: var(--earth-light);
    opacity: 0.7;
}

.modal-description {
    margin-bottom: 2rem;
}

.modal-description p {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--earth-light);
}

.modal-testimonial {
    background: rgba(212, 175, 55, 0.05);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--sacred-gold);
    margin-bottom: 2rem;
    position: relative;
}

.testimonial-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--sacred-gold);
    opacity: 0.2;
    font-size: 2rem;
}

.modal-testimonial p {
    font-family: var(--font-secondary);
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.8;
    color: var(--earth-light);
    margin-bottom: 1rem;
}

.testimonial-author {
    display: block;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--sacred-gold);
    font-style: normal;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.modal-tag {
    padding: 0.5rem 1rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    color: var(--sacred-gold);
}

.modal-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-item i {
    font-size: 1.3rem;
    color: var(--sacred-gold);
}

.stat-item span {
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    color: var(--earth-light);
}

/* ============================================
   LOADING INDICATOR
   ============================================ */

.loading-indicator {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 20, 16, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2rem;
}

.loading-indicator.active {
    display: flex;
}

.loading-spinner {
    width: 100px;
    height: 100px;
}

.loading-indicator p {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    color: var(--sacred-gold);
    font-style: italic;
}

/* ============================================
   PORTFOLIO FOOTER
   ============================================ */

.portfolio-footer {
    margin-top: 4rem;
    padding: 3rem 2rem;
    background: rgba(26, 20, 16, 0.8);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.footer-simple {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-simple p {
    font-family: var(--font-secondary);
    color: var(--earth-light);
    margin-bottom: 1rem;
}

.footer-links-simple {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.footer-links-simple a {
    color: var(--sacred-gold);
    text-decoration: none;
    font-family: var(--font-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links-simple a:hover {
    color: var(--earth-light);
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .modal-content {
        grid-template-columns: 1fr;
    }

    .modal-image-container {
        max-height: 40vh;
    }

    .modal-details {
        padding: 2rem;
    }

    .modal-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .portfolio-title {
        font-size: 2.5rem;
    }

    .portfolio-subtitle {
        font-size: 1.1rem;
    }

    /* Mostrar botón toggle de filtros en móviles */
    .filter-toggle-btn {
        display: flex;
    }

    /* Ocultar filtros por defecto en móviles */
    .filter-tabs {
        display: none;
        border-radius: 16px;
        animation: slideDown 0.3s ease;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem;
    }

    /* Mostrar filtros cuando están activos */
    .filter-tabs.show {
        display: flex;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .filter-tab {
        font-size: 0.9rem;
        padding: 0.9rem 1.2rem;
        width: 100%;
        justify-content: flex-start;
        text-align: left;
    }

    .filter-tab span {
        display: inline !important; /* Asegurar que el texto se vea */
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .modal-header {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-icon {
        width: 50px;
        height: 50px;
    }

    .modal-icon i {
        font-size: 1.5rem;
    }

    .modal-title-section h2 {
        font-size: 1.6rem;
    }

    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .modal-close {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .portfolio-header {
        padding: 5rem 1.5rem 3rem;
    }

    .portfolio-title {
        font-size: 2rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 1rem;
    }

    .filter-tabs {
        gap: 0.75rem;
        padding: 1rem;
        flex-direction: column;
    }

    .filter-tab {
        width: 100%;
        padding: 1rem 1.2rem;
        justify-content: flex-start;
        text-align: left;
        height: auto;
    }

    .filter-tab span {
        display: inline !important; /* Forzar que el texto se vea siempre */
    }

    .modal-details {
        padding: 1.5rem;
    }

    .modal-testimonial {
        padding: 1.5rem;
    }

    .footer-links-simple {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ============================================
   PORTFOLIO CTA (for main index page)
   ============================================ */

.portfolio-cta {
    text-align: center;
    padding: 4rem 2rem;
    margin-top: 3rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(184, 115, 51, 0.05) 100%);
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.portfolio-cta h3 {
    font-family: var(--font-primary);
    font-size: 2rem;
    color: var(--sacred-gold);
    margin-bottom: 1rem;
}

.portfolio-cta p {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    color: var(--earth-light);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2.5rem;
    background: linear-gradient(135deg, var(--sacred-gold) 0%, #b87333 100%);
    color: var(--earth-dark);
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.portfolio-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.5);
    border-color: var(--sacred-gold);
    background: var(--earth-dark);
    color: var(--sacred-gold);
}

.portfolio-btn i:last-child {
    transition: transform 0.3s ease;
}

.portfolio-btn:hover i:last-child {
    transform: translateX(5px);
}