/*
Theme Name: Cuarzo Sur
Theme URI: https://cuarzosur.cl
Author: Antigravity
Author URI: https://google.com
Description: A custom WordPress theme for Cuarzo Sur, converted from React/Tailwind design.
Version: 7.0
Text Domain: cuarzo-sur
*/

/* Import font */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600;700&display=swap');

/* Base Tailwind Directives are handled via CDN for now, 
   but we can add custom overrides here if needed. */
:root {
    --font-sans: 'Cormorant Garamond', serif;
}

body {
    font-family: 'Cormorant Garamond', serif;
}

/* Custom fade-in animation class */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Project Filter Buttons */
.project-filter-btn {
    color: #57534e;
    background: transparent;
    cursor: pointer;
    border: none;
}

.project-filter-btn:hover {
    color: #292524;
    background: #fafaf9;
}

.project-filter-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

/* Project Item Transitions */
.project-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Gallery Lightbox Modal */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-modal.hidden {
    display: none;
}

.gallery-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.gallery-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 20px;
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    color: white;
}

.gallery-close:hover {
    background: rgba(217, 119, 6, 0.9);
    border-color: rgba(217, 119, 6, 1);
    transform: rotate(90deg);
}

.gallery-image-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image-container img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: galleryImageFadeIn 0.3s ease;
}

@keyframes galleryImageFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    color: white;
}

.gallery-nav:hover {
    background: rgba(217, 119, 6, 0.9);
    border-color: rgba(217, 119, 6, 1);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-modal-content {
        padding: 60px 10px 10px;
    }

    .gallery-close {
        width: 48px;
        height: 48px;
        top: 10px;
        right: 10px;
    }

    .gallery-nav {
        width: 48px;
        height: 48px;
    }

    .gallery-prev {
        left: 10px;
    }

    .gallery-next {
        right: 10px;
    }

    .gallery-counter {
        bottom: -35px;
        font-size: 12px;
        padding: 6px 16px;
    }
}

/* Placas Gallery Section */
.placas-tabs {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.placas-tabs::-webkit-scrollbar {
    display: none;
}

.placas-tab {
    position: relative;
    overflow: hidden;
}

.placas-tab.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #d97706;
    border-radius: 0 4px 4px 0;
}

@media (max-width: 1023px) {
    .placas-tab.active::before {
        top: auto;
        left: 0;
        right: 0;
        width: 100%;
        height: 3px;
        border-radius: 4px 4px 0 0;
    }
}

.placa-card {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Página Nuestro Proceso
   ============================================ */

/* Timeline mobile: línea vertical a la izquierda */
@media (max-width: 767px) {
    .proceso-timeline {
        padding-left: 2rem;
    }

    .proceso-timeline::before {
        content: '';
        position: absolute;
        left: 1.75rem;
        top: 0;
        bottom: 0;
        width: 2px;
        background: linear-gradient(to bottom, rgba(217, 119, 6, 0.5), rgba(87, 83, 78, 0.3));
    }

    .proceso-timeline-item {
        align-items: flex-start !important;
    }

    .proceso-timeline-dot {
        position: absolute;
        left: -2rem;
        transform: translateX(-50%);
    }
}

/* Timeline dot pulse animation on hover */
.proceso-timeline-dot {
    transition: all 0.3s ease;
}

.proceso-timeline-item:hover .proceso-timeline-dot {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(217, 119, 6, 0.15);
}

@media (max-width: 767px) {
    .proceso-timeline-item:hover .proceso-timeline-dot {
        transform: translateX(-50%) scale(1.15);
    }
}

/* Machinery card hover glow */
.grupo-maq:hover {
    box-shadow: 0 20px 40px rgba(217, 119, 6, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ============================================
   Galería de Maquinaria – Modal / Lightbox
   ============================================ */

/* line-clamp utility for gallery cards */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Modal base --- */
.maq-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.maq-modal.hidden {
    display: none;
}

.maq-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
}

/* --- Close button --- */
.maq-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10002;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
}

.maq-modal-close:hover {
    background: rgba(217, 119, 6, 0.9);
    border-color: #d97706;
    transform: rotate(90deg);
}

/* --- Navigation arrows --- */
.maq-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10002;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
}

.maq-modal-nav:hover {
    background: rgba(217, 119, 6, 0.9);
    border-color: #d97706;
    transform: translateY(-50%) scale(1.1);
}

.maq-modal-prev {
    left: 20px;
}

.maq-modal-next {
    right: 20px;
}

/* --- Content area --- */
.maq-modal-content {
    position: relative;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 85vw;
    max-height: 90vh;
    padding: 60px 0 20px;
}

.maq-modal-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
}

.maq-modal-image-wrap img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: maqImgIn 0.35s ease;
}

@keyframes maqImgIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Caption (figcaption) --- */
.maq-modal-caption {
    margin-top: 16px;
    text-align: center;
    max-width: 600px;
}

.maq-modal-caption-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
}

.maq-modal-caption-desc {
    color: #a8a29e;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* --- Counter pill --- */
.maq-modal-counter {
    margin-top: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .maq-modal-close {
        width: 44px;
        height: 44px;
        top: 12px;
        right: 12px;
    }

    .maq-modal-nav {
        width: 44px;
        height: 44px;
    }

    .maq-modal-prev {
        left: 8px;
    }

    .maq-modal-next {
        right: 8px;
    }

    .maq-modal-content {
        max-width: 95vw;
        padding: 50px 0 12px;
    }

    .maq-modal-image-wrap img {
        max-height: 55vh;
        border-radius: 8px;
    }

    .maq-modal-caption-title {
        font-size: 15px;
    }

    .maq-modal-caption-desc {
        font-size: 13px;
    }

    .maq-modal-counter {
        font-size: 12px;
        padding: 5px 14px;
    }
}

/* ============================================
   Sección: Así Trabajamos Contigo (Process v2)
   ============================================
   
   INSTRUCCIONES: Copiar y pegar este bloque completo
   al FINAL del archivo style.css del tema (cuarzo-sur-theme-v7/style.css)
   ============================================ */

.proc-v2-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #f5f0e8 0%, #faf7f2 40%, #f5f0e8 100%);
    position: relative;
    overflow: hidden;
}

.proc-v2-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #c9a96e 30%, #d4a853 50%, #c9a96e 70%, transparent);
}

.proc-v2-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.proc-v2-header {
    text-align: center;
    margin-bottom: 56px;
}

.proc-v2-header-line {
    width: 60px;
    height: 2px;
    background: #c9a96e;
    margin: 0 auto 20px;
}

.proc-v2-title {
    font-family: 'Cormorant Garamond', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: #292524;
    margin: 0;
}

/* Grid – align-items: stretch fuerza que todos los wrappers tengan la misma altura */
.proc-v2-grid {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
}

/* Card wrapper (card + arrow) */
.proc-v2-card-wrapper {
    display: flex;
    align-items: stretch;
    flex: 1;
    max-width: 240px;
}

/* Card – height:100% + flex column asegura que todas las cards
   llenen el wrapper completo, igualando alturas */
.proc-v2-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.proc-v2-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Photo area – aspect-ratio fijo garantiza misma altura de foto */
.proc-v2-card-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #d6d3d1;
    flex-shrink: 0;
}

.proc-v2-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.proc-v2-card:hover .proc-v2-card-photo img {
    transform: scale(1.08);
}

/* Step number badge */
.proc-v2-card-number {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9a96e 0%, #d4a853 50%, #b8943e 100%);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(201, 169, 110, 0.45);
    z-index: 2;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

/* Info area (dark) – flex:1 hace que esta zona crezca para llenar
   el espacio restante, igualando la altura de todas las cards */
.proc-v2-card-info {
    background: linear-gradient(180deg, #1c1917 0%, #0f0e0d 100%);
    padding: 24px 16px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

/* Icon */
.proc-v2-card-icon {
    color: #c9a96e;
    margin-bottom: 12px;
    opacity: 0.9;
    flex-shrink: 0;
}

/* Title */
.proc-v2-card-title {
    font-family: 'Cormorant Garamond', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #fff;
    margin: 0 0 10px;
    text-transform: uppercase;
    flex-shrink: 0;
}

/* Description */
.proc-v2-card-desc {
    font-family: 'Cormorant Garamond', sans-serif;
    font-size: 0.78rem;
    line-height: 1.55;
    color: #a8a29e;
    margin: 0;
}

/* Arrow between cards – align-self:center para que la flecha
   se centre verticalmente aunque el wrapper esté en stretch */
.proc-v2-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    color: #c9a96e;
    opacity: 0.7;
    align-self: center;
}

.proc-v2-arrow-h {
    display: block;
}

.proc-v2-arrow-v {
    display: none;
}

/* ---- Responsive ---- */

/* Tablets / medium screens */
@media (max-width: 1100px) {
    .proc-v2-card-wrapper {
        max-width: 200px;
    }

    .proc-v2-card-info {
        padding: 20px 12px 24px;
    }

    .proc-v2-card-title {
        font-size: 0.75rem;
    }

    .proc-v2-card-desc {
        font-size: 0.72rem;
    }

    .proc-v2-card-number {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .proc-v2-arrow {
        width: 24px;
    }
}

/* Small tablets */
@media (max-width: 900px) {
    .proc-v2-section {
        padding: 60px 0;
    }

    .proc-v2-grid {
        flex-wrap: wrap;
        gap: 16px;
        justify-content: center;
    }

    .proc-v2-card-wrapper {
        max-width: calc(50% - 28px);
        flex: 0 0 calc(50% - 28px);
    }

    .proc-v2-arrow {
        width: 24px;
    }

    .proc-v2-card-wrapper:nth-child(4) .proc-v2-arrow,
    .proc-v2-card-wrapper:nth-child(8) .proc-v2-arrow {
        display: none;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .proc-v2-section {
        padding: 48px 0;
    }

    .proc-v2-header {
        margin-bottom: 36px;
    }

    .proc-v2-title {
        font-size: 1.35rem;
        letter-spacing: 0.15em;
    }

    .proc-v2-grid {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .proc-v2-card-wrapper {
        flex-direction: column;
        max-width: 320px;
        width: 100%;
        flex: 0 0 auto;
    }

    .proc-v2-card {
        width: 100%;
        height: auto;
    }

    .proc-v2-card-photo {
        aspect-ratio: 16 / 10;
    }

    .proc-v2-card-info {
        padding: 20px 20px 24px;
    }

    .proc-v2-card-title {
        font-size: 0.9rem;
    }

    .proc-v2-card-desc {
        font-size: 0.82rem;
    }

    .proc-v2-arrow {
        width: auto;
        height: 32px;
        padding: 4px 0;
        align-self: center;
    }

    .proc-v2-arrow-h {
        display: none;
    }

    .proc-v2-arrow-v {
        display: block;
    }
}

/* Subtle card entrance animation */
@keyframes procCardIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.proc-v2-card-wrapper.visible {
    animation: procCardIn 0.5s ease forwards;
}

/* css redes sociales */
.social-menu {
    display: flex;
    gap: 15px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.social-menu a {
    font-size: 24px;
    text-decoration: none;
    color: inherit;
}

/* Ocultar texto */
.social-menu a {
    font-size: 0;
}

/* Estado normal */
.social-menu a::before {
    color: #999;
    transition: all 0.3s ease;
}

/* Hover Instagram */
.social-menu a[href*="instagram"]:hover::before {
    color: #E4405F;
    transform: scale(1.15);
}

/* Hover Facebook */
.social-menu a[href*="facebook"]:hover::before {
    color: #1877F2;
    transform: scale(1.15);
}

.social-menu a[href*="instagram"]::before {
    content: "\e055";
    font-family: "Font Awesome 6 Brands";
    font-size: 24px;
}

.social-menu a[href*="facebook"]::before {
    content: "\f082";
    font-family: "Font Awesome 6 Brands";
    font-size: 24px;
}

.menu-rrss-header a[href*="instagram"]{
	background-color: #999;
	  width: 41px;
	  height: 41px;
	  display: flex;
	  justify-content: center;
	  align-items: center;
	  border-radius: 7px;
}
.menu-rrss-header a[href*="facebook"]{
	background-color: #999;
	  width: 41px;
	  height: 41px;
	  display: flex;
	  justify-content: center;
	  align-items: center;
	  border-radius: 7px;
}
/* Estado normal */
.menu-rrss-header a::before {
    color: white;
    transition: all 0.3s ease;
}

/* Hover Instagram */
.menu-rrss-header a[href*="instagram"]:hover{
	background-color: #E4405F;
}
.menu-rrss-header a[href*="instagram"]:hover::before {
    color: white;
    transform: scale(1.15);
}

/* Hover Facebook */
.menu-rrss-header a[href*="facebook"]:hover {
    background-color: #1877F2;
}
.menu-rrss-header a[href*="facebook"]:hover::before {
    color: white;
    transform: scale(1.15);
}

@media (max-width:768px){
	.social-menu a[href*="instagram"]::before, .social-menu a[href*="facebook"]::before {
		font-size: 18px;
	}
	.menu-rrss-header a[href*="instagram"], .menu-rrss-header a[href*="facebook"]{
		width: 30px;
		height: 30px;
	}
}