/* Custom Web Animations & Layouts matching the Presentation Aesthetic */

/* --------------------------------------
   1. VALORES - OVERLAPPING CIRCLES 
---------------------------------------*/
.overlapping-circles-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    padding-bottom: 20px;
    flex-wrap: wrap;
    /* For mobile support */
}

.circle-value {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #1a1a1a;
    font-weight: 600;
    margin-left: -40px;
    /* The overlap */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    mix-blend-mode: multiply;
    /* Gives that translucent PPT overlap effect */
    position: relative;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 15px;
}

.circle-title {
    font-size: 1.1rem;
    transition: transform 0.4s ease, font-size 0.4s ease;
}

.circle-desc {
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.3;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease, margin-top 0.4s ease;
    text-align: center;
    color: #222;
    margin: 0;
}

.circle-value:hover .circle-title {
    transform: translateY(-5px);
    font-size: 1rem;
}

.circle-value:hover .circle-desc {
    opacity: 1;
    max-height: 100px;
    margin-top: 5px;
}

.circle-value:first-child {
    margin-left: 0;
}

.circle-value:hover {
    transform: translateY(-20px) scale(1.05);
    z-index: 10;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    mix-blend-mode: normal;
    /* Clear color on hover */
}

/* Specific colors matching the presentation */
.circle-1 {
    background-color: rgba(200, 130, 115, 0.85);
    z-index: 5;
}

.circle-2 {
    background-color: rgba(225, 150, 135, 0.85);
    z-index: 4;
}

.circle-3 {
    background-color: rgba(235, 195, 190, 0.85);
    z-index: 3;
}

.circle-4 {
    background-color: rgba(240, 205, 200, 0.85);
    z-index: 2;
}

.circle-5 {
    background-color: rgba(215, 130, 120, 0.85);
    z-index: 1;
}

@media (max-width: 768px) {
    .circle-value {
        margin-left: -20px;
        width: 150px;
        height: 150px;
        font-size: 0.9rem;
    }
}

/* --------------------------------------
   2. METODOLOGIA - VIBRANT ROUNDED BOXES
---------------------------------------*/
.metodologia-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.metodologia-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.metodologia-box {
    width: 100%;
    padding-top: 65%;
    /* 3:2 Aspect Ratio nearly */
    border-radius: 20px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    margin-bottom: 20px;
    position: relative;
}

.metodologia-box i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 3.5rem;
    transition: transform 0.4s ease;
}

.metodologia-item:hover .metodologia-box i {
    transform: translate(-50%, -50%) scale(1.2);
}

.metodologia-item:hover .metodologia-box {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 20px 40px rgba(139, 29, 34, 0.2);
}

.metodologia-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--kersa-dark-gray);
    line-height: 1.5;
    transition: color 0.3s;
}

.metodologia-item:hover .metodologia-title {
    color: var(--kersa-red);
}

.box-1 {
    background-color: #791a10;
}

.box-2 {
    background-color: #b93d2b;
}

.box-3 {
    background-color: #d17565;
}

.box-4 {
    background-color: #d8b4b0;
}

.box-5 {
    background-color: #d17565;
}

.box-6 {
    background-color: #a73c2a;
}

/* --------------------------------------
   3. SERVICIOS - VERTICAL TIMELINE
---------------------------------------*/
.vertical-timeline-container {
    max-width: 800px;
    margin: 50px auto;
    position: relative;
    padding-left: 25px;
    /* Space for the vertical line */
}

.vertical-line {
    position: absolute;
    left: 48px;
    /* Alignment with circles */
    top: 50px;
    bottom: 50px;
    width: 4px;
    background-color: #e5aaa4;
    z-index: 1;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
    cursor: pointer;
}

.timeline-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #b93d2b;
    background-color: white;
    margin-right: -25px;
    /* Overlap the bar */
    z-index: 3;
    transition: all 0.4s ease;
    box-shadow: 0 0 0 5px white;
    /* To cut out the line */
}

.timeline-bar {
    flex: 1;
    color: white;
    padding: 20px 40px;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    z-index: 2;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.timeline-item:hover .timeline-circle {
    background-color: #b93d2b;
    transform: scale(1.15);
}

.timeline-item:hover .timeline-bar {
    transform: translateX(15px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.bg-t1 {
    background-color: #791a10;
}

.bg-t2 {
    background-color: #b93d2b;
}

.bg-t3 {
    background-color: #d17565;
}

.bg-t4 {
    background-color: #e5aaa4;
    color: #333;
}

.bg-t5 {
    background-color: #e1958b;
    color: #333;
}

/* --------------------------------------
   4. OBRAS - INLINE CARDS WITH CORNER CIRCLE
---------------------------------------*/
.obras-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 50px;
    padding-bottom: 30px;
    /* Space for circles */
}

.obra-card {
    border: 2px solid #e1b4b0;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    background-color: transparent;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 280px;
}

.obra-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
    border-color: #b93d2b;
}

.obra-image-placeholder {
    flex: 1;
    background-color: transparent;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    position: relative;
    overflow: hidden;
}

/* Subtle pattern inside the placeholder */
.obra-image-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(#e1b4b0 1px, transparent 1px);
    background-size: 15px 15px;
    opacity: 0.2;
}

.obra-footer {
    padding: 20px;
    color: white;
    font-weight: 600;
    min-height: 90px;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    line-height: 1.4;
}

.obra-circle {
    position: absolute;
    bottom: -15px;
    right: -15px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(225, 180, 176, 0.85);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.4s ease;
    z-index: 10;
}

.obra-card:hover .obra-circle {
    transform: scale(1.6);
    background-color: rgba(185, 61, 43, 0.95);
}

.bg-o1 {
    background-color: #791a10;
}

.bg-o2 {
    background-color: #b93d2b;
}

.bg-o3 {
    background-color: #e5aaa4;
    color: #333;
}

.bg-o4 {
    background-color: #d17565;
}

.bg-o5 {
    background-color: #a73c2a;
}

/* Special text color handling for light backgrounds */
.bg-o3 {
    color: #1a1a1a !important;
}