/* ===== OLIVES PAGE STYLES ===== */

/* Olives Showcase Section */
.olives-cat-section {
    padding: 56px 0;
    position: relative;
    background: url('/assets/images/olives/bg-olives.png') center/cover fixed;
}

.olives-cat-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(248, 246, 242, 0.91);
    z-index: 0;
}

.olives-cat-section .container {
    position: relative;
    z-index: 1;
}

.olives-cat-row {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 56px;
    transition: all 0.4s ease;
}

.olives-cat-row:nth-child(even) {
    flex-direction: row-reverse;
}

.olives-cat-visual {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.olives-cat-circle {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    z-index: 2;
    box-shadow: 42px 0 32px rgba(0,0,0,0.15);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.olives-cat-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.olives-cat-row:hover .olives-cat-circle img {
    transform: scale(1.05);
}

.olives-cat-row:nth-child(odd) .olives-cat-circle {
    box-shadow: 28px 0 42px rgba(0,0,0,0.15);
}

.olives-cat-row:nth-child(even) .olives-cat-circle {
    box-shadow: -28px 0 42px rgba(0,0,0,0.15);
}

.olives-cat-row:nth-child(odd):hover .olives-cat-circle {
    box-shadow: 28px 0 56px rgba(0,0,0,0.25);
}

.olives-cat-row:nth-child(even):hover .olives-cat-circle {
    box-shadow: -28px 0 56px rgba(0,0,0,0.25);
}

.olives-cat-row:hover .olives-cat-circle {
    transform: scale(1.08);
    box-shadow: 42px 0 56px rgba(0,0,0,0.25);
}

.olives-cat-info {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    order: 1;
    padding: 0 100px;
}

.olives-cat-row:nth-child(even) .olives-cat-info {
    align-items: flex-start;
}

.olives-cat-info h2 {
    font-size: 3.2rem;
    line-height: 1.1;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
}

.olives-cat-info h2 a {
    color: var(--color-dark-green);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.olives-cat-info h2 a:hover {
    color: var(--color-gold);
}

.olives-cat-info h2 a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-gold);
    transition: width 0.3s ease;
}

.olives-cat-info h2 a:hover::after {
    width: 100%;
}

.olive-symbol-inline {
    height: 34px;
    width: auto;
    transition: transform 0.3s ease;
}

.olives-cat-row:hover .olive-symbol-inline {
    transform: scale(1.1) rotate(5deg);
}

.olives-cat-info p {
    font-size: 0.77rem;
    line-height: 1.6;
    opacity: 0.8;
    max-width: 385px;
    transition: all 0.3s ease;
    margin: 0;
}

.olives-cat-row:nth-child(odd) .olives-cat-info p {
    text-align: left;
}

.olives-cat-row:nth-child(even) .olives-cat-info p {
    text-align: left;
}

.olives-cat-row:hover .olives-cat-info p {
    opacity: 1;
}

/* ===== SCROLL-IN ANIMATIONS ===== */

/* Initial hidden state — visual and info start off-screen */
.olives-cat-row .olives-cat-visual,
.olives-cat-row .olives-cat-info {
    opacity: 0;
    transition:
        opacity 0.7s ease,
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Odd rows: visual from left, info from right */
.olives-cat-row:nth-child(odd) .olives-cat-visual {
    transform: translateX(-70px);
}
.olives-cat-row:nth-child(odd) .olives-cat-info {
    transform: translateX(70px);
    transition-delay: 0.12s;
}

/* Even rows: visual from right, info from left */
.olives-cat-row:nth-child(even) .olives-cat-visual {
    transform: translateX(70px);
}
.olives-cat-row:nth-child(even) .olives-cat-info {
    transform: translateX(-70px);
    transition-delay: 0.12s;
}

/* Triggered state */
.olives-cat-row.in-view .olives-cat-visual,
.olives-cat-row.in-view .olives-cat-info {
    opacity: 1;
    transform: translateX(0);
}

/* Decorative Olives */
.decorative-olives {
    position: absolute;
    width: 150px;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    top: 0;
}

.decorative-olives-left {
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 60px 20px;
}

.decorative-olives-right {
    right: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 60px 20px;
}

.floating-olive {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

@keyframes float1 {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-25px) rotate(-8deg);
    }
}

@keyframes float3 {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(15deg);
    }
}

.floating-olive.olive-1 {
    animation: float1 4s ease-in-out infinite;
}

.floating-olive.olive-2 {
    animation: float2 5s ease-in-out infinite 0.3s;
}

.floating-olive.olive-3 {
    animation: float3 4.5s ease-in-out infinite 0.6s;
}

.floating-olive.olive-4 {
    animation: float2 4.5s ease-in-out infinite 0.2s;
}

.floating-olive.olive-5 {
    animation: float1 5s ease-in-out infinite 0.5s;
}

.floating-olive.olive-6 {
    animation: float3 4s ease-in-out infinite 0.8s;
}

/* Calibres Characteristics Section */
.calibres-characteristics {
    padding: 100px 0;
    background-color: var(--color-paper);
}

.characteristics-matrix {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(193, 154, 70, 0.15);
}

/* DESKTOP VERSION */
.matrix-desktop {
    display: block;
}

.matrix-mobile {
    display: none;
}

.matrix-desktop .matrix-header,
.matrix-desktop .matrix-row {
    display: grid;
    grid-template-columns: var(--matrix-desktop-cols, 180px repeat(3, 1fr));
    border-bottom: 2px solid var(--color-dark-green);
}

.matrix-desktop .matrix-row:last-child {
    border-bottom: none;
}

.matrix-label {
    padding: 24px;
    background-color: var(--color-dark-green);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    font-weight: 600;
    font-size: 1.125rem !important;
}

.matrix-header .matrix-label {
    background-color: var(--color-dark-green);
    border-bottom: 2px solid var(--color-dark-green);
}

.matrix-label strong {
    font-size: 1.125rem !important;
}

.matrix-label span {
    font-size: 1.125rem !important;
    font-weight: 400;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.matrix-header .matrix-col span {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-dark-green);
}

.matrix-col {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(44, 59, 44, 0.1);
    min-height: 80px;
}

.matrix-col:last-child {
    border-right: none;
}

.matrix-header .matrix-col {
    background-color: rgba(193, 154, 70, 0.08);
    font-weight: 600;
    border-bottom: 2px solid var(--color-dark-green);
}

.dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dot:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dot-kalamata {
    background-color: #9d7a3d;
}

.dot-green {
    background-color: #83a653;
}

.dot-amfissa {
    background-color: #c19a46;
}

.matrix-status {
    display: inline-block;
    font-size: 0.78rem;
    line-height: 1.35;
    font-weight: 600;
    text-align: center;
}

.matrix-status--request {
    color: #5f6859;
}

.matrix-status--unavailable {
    color: #b42318;
}

/* MOBILE VERSION */
@media (max-width: 768px) {
    .matrix-desktop {
        display: none;
    }

    /* Un singur grid — garanteaza alinierea perfecta a coloanelor */
    .matrix-mobile {
        display: grid;
        grid-template-columns: var(--matrix-mobile-cols, 140px repeat(3, 1fr));
        border-radius: 12px;
        overflow: hidden;
    }

    /* Randurile devin transparente la layout — celulele merg direct in grid-ul parinte */
    .matrix-mobile .matrix-header,
    .matrix-mobile .matrix-row {
        display: contents;
    }

    /* Linie despartitoare intre randuri — pe fiecare celula */
    .matrix-mobile .matrix-row .matrix-label,
    .matrix-mobile .matrix-row .matrix-col {
        border-top: 1px solid rgba(44, 59, 44, 0.12);
    }

    /* Header — celula goala stanga */
    .matrix-mobile .matrix-header .matrix-label {
        background-color: var(--color-dark-green);
        border-right: 1px solid rgba(255,255,255,0.12);
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Header — coloane soiuri */
    .matrix-mobile .matrix-header .matrix-col {
        padding: 10px 6px;
        min-height: 52px;
        font-weight: 700;
        font-size: 0.72rem;
        letter-spacing: 0.8px;
        text-transform: uppercase;
        background-color: var(--color-dark-green);
        color: white;
        border-right: 1px solid rgba(255,255,255,0.12);
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .matrix-mobile .matrix-header .matrix-col:last-child {
        border-right: none;
    }

    /* Label metoda */
    .matrix-mobile .matrix-label {
        padding: 10px 10px !important;
        font-size: 0.72rem !important;
        font-weight: 700 !important;
        background-color: rgba(44, 59, 44, 0.06) !important;
        color: var(--color-dark-green) !important;
        min-height: 44px !important;
        border-right: 1px solid rgba(44, 59, 44, 0.12);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        display: flex !important;
        align-items: center !important;
    }

    .matrix-mobile .matrix-label span,
    .matrix-mobile .matrix-label strong {
        font-size: 0.72rem !important;
        font-weight: 700 !important;
    }

    /* Celule date */
    .matrix-mobile .matrix-col {
        padding: 10px 6px;
        min-height: 44px;
        border-right: 1px solid rgba(44, 59, 44, 0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        background: white;
    }

    .matrix-mobile .matrix-col:last-child {
        border-right: none;
    }

    .matrix-mobile .dot {
        width: 16px;
        height: 16px;
    }

    .matrix-mobile .matrix-status {
        font-size: 0.72rem !important;
    }
}

/* ===== CALIBRES VISUAL SCALE ===== */
.calibres-specifications {
    padding: 100px 0;
    background-color: var(--color-paper);
}

.calibre-scale-outer {
    background: white;
    border-radius: 20px;
    padding: 48px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(193, 154, 70, 0.15);
}

.calibre-legend {
    display: flex;
    gap: 28px;
    justify-content: center;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-dark);
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.calibre-scale-scroll {
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(193, 154, 70, 0.3) transparent;
    display: flex;
    justify-content: center;
}

.calibre-scale-scroll::-webkit-scrollbar {
    height: 4px;
}

.calibre-scale-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.calibre-scale-scroll::-webkit-scrollbar-thumb {
    background: rgba(193, 154, 70, 0.35);
    border-radius: 2px;
}

.calibre-scale-track {
    display: flex;
    align-items: flex-end;
    gap: 0;
    padding: 0 0 24px;
    min-width: max-content;
    border-bottom: 1px solid rgba(193, 154, 70, 0.25);
}

.calibre-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-radius: 8px;
    transition: background 0.3s ease;
    cursor: default;
}

.calibre-item:hover {
    background: rgba(193, 154, 70, 0.06);
}

.calibre-olive-wrap {
    height: 120px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.calibre-olive-svg {
    display: block;
    filter: brightness(0.22) sepia(0.6) hue-rotate(340deg) saturate(1.2);
    opacity: 0.75;
    transition: all 0.35s ease;
}

.calibre-item:hover .calibre-olive-svg {
    opacity: 1;
    filter: brightness(0.18) sepia(0.9) hue-rotate(348deg) saturate(2);
    transform: translateY(-6px);
}

.calibre-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-align: center;
}

.calibre-name {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-dark-green);
    white-space: nowrap;
}

.calibre-count {
    font-size: 0.72rem;
    color: var(--color-text-dark);
    opacity: 0.86;
    font-weight: 600;
    white-space: nowrap;
}

.calibre-variety-dots {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.cdot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.calibre-item:hover .cdot {
    transform: scale(1.4);
}

.dot-empty {
    background: rgba(0, 0, 0, 0.1);
}

.calibre-scale-axis {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-dark);
    opacity: 0.78;
}

.axis-line {
    flex: 1;
    height: 1px;
    background: currentColor;
}

/* ===== MOBILE VERTICAL LAYOUT ===== */
.calibre-mobile-table { display: none; }

@media (max-width: 768px) {
    .calibre-desktop-only { display: none; }
    .calibre-mobile-table {
        display: block;
        overflow-x: auto;
        width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    .calibre-mobile-table .sizes-table-wrapper {
        max-width: 100%;
        margin: 0;
    }

    .calibre-mobile-table .sizes-table td.size-icon {
        display: table-cell;
        padding: 4px 6px;
        text-align: center;
        vertical-align: middle;
        width: 40px;
    }

    .calibre-mobile-table .sizes-table td.size-icon img {
        display: block;
        margin: 0 auto;
        /* Respect inline height from config for size variation, but cap the largest */
        max-height: 70px;
        width: auto;
    }

    /* Narrow K / G / A columns */
    .calibre-mobile-table .sizes-table th:nth-child(4),
    .calibre-mobile-table .sizes-table th:nth-child(5),
    .calibre-mobile-table .sizes-table th:nth-child(6),
    .calibre-mobile-table .sizes-table td:nth-child(4),
    .calibre-mobile-table .sizes-table td:nth-child(5),
    .calibre-mobile-table .sizes-table td:nth-child(6) {
        padding-left: 4px;
        padding-right: 4px;
        width: 28px;
    }

    .calibre-scale-axis {
        margin-top: 16px;
        font-size: 0.72rem;
    }

    .calibre-scale-outer {
        padding: 24px 16px;
    }
}

/* ===== APPLICATIONS — PREMIUM CARDS ===== */
.calibres-applications {
    padding: 100px 0;
    background-color: var(--color-paper);
}

.app-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.app-card {
    background: white;
    border-radius: 16px;
    padding: 36px 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border: 1px solid rgba(193, 154, 70, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.app-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-dark-green));
    transition: width 0.45s ease;
}

.app-card:hover::after {
    width: 100%;
}

.app-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    border-color: rgba(193, 154, 70, 0.25);
}

.app-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(193, 154, 70, 0.08);
    border-radius: 14px;
    color: var(--color-gold);
    flex-shrink: 0;
    transition: background 0.3s ease, transform 0.3s ease;
}

.app-card:hover .app-card-icon {
    background: rgba(193, 154, 70, 0.15);
    transform: scale(1.06);
}

.app-card-icon svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-card h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--color-dark-green);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.app-card p {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--color-text-dark);
    opacity: 0.8;
    margin: 0;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    color: var(--color-dark-green);
    margin-bottom: 15px;
}

.section-header .gold-underline {
    margin: 0 auto 30px;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--color-text-dark);
    opacity: 0.85;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .app-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .calibre-scale-outer {
        padding: 32px 24px;
    }
}

@media (max-width: 768px) {
    /* Reducere padding caracteristici pe mobil */
    .calibres-characteristics,
    .calibres-specifications,
    .calibres-applications {
        padding: 48px 0;
    }

    .app-cards-grid {
        grid-template-columns: 1fr;
    }

    .calibre-scale-outer {
        padding: 24px 16px;
    }

    .calibre-legend {
        gap: 16px;
        margin-bottom: 32px;
    }

    .calibre-item {
        padding: 0 6px;
    }

    .calibre-olive-wrap {
        height: 90px;
    }

    .matrix-desktop {
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    /* Previne overflow horizontal din animatii */
    .olives-cat-section {
        overflow: hidden;
    }

    /* Showcase rows */
    .olives-cat-row,
    .olives-cat-row:nth-child(odd),
    .olives-cat-row:nth-child(even) {
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px;
        margin-bottom: 48px;
    }

    .olives-cat-visual,
    .olives-cat-row:nth-child(odd) .olives-cat-visual,
    .olives-cat-row:nth-child(even) .olives-cat-visual {
        width: 100%;
        flex: none;
        display: flex;
        justify-content: center !important;
        align-items: center;
    }

    .olives-cat-circle {
        max-width: 180px;
        box-shadow: 0 16px 40px rgba(0,0,0,0.15);
    }

    .olives-cat-row:nth-child(odd) .olives-cat-circle,
    .olives-cat-row:nth-child(even) .olives-cat-circle {
        box-shadow: 0 16px 40px rgba(0,0,0,0.15);
    }

    .olives-cat-info,
    .olives-cat-row:nth-child(odd) .olives-cat-info,
    .olives-cat-row:nth-child(even) .olives-cat-info {
        width: 100%;
        flex: none;
        display: flex;
        flex-direction: column;
        align-items: center !important;
        text-align: center !important;
        padding: 0 24px;
        box-sizing: border-box;
    }

    .olives-cat-info h2,
    .olives-cat-row:nth-child(odd) .olives-cat-info h2,
    .olives-cat-row:nth-child(even) .olives-cat-info h2 {
        font-size: 2rem;
        justify-content: center !important;
        text-align: center !important;
        width: 100%;
    }

    .olives-cat-info p,
    .olives-cat-row:nth-child(odd) .olives-cat-info p,
    .olives-cat-row:nth-child(even) .olives-cat-info p {
        text-align: center !important;
        max-width: 100%;
        width: 100%;
    }

    /* Decorative olives — mai mici pe mobil */
    .decorative-olives {
        width: 40px;
    }

    .floating-olive {
        width: 28px;
        height: 28px;
    }
}
