/* ==========================================================================
   INJOE DENTAL - CASOS DE EXITO (SUCCESS STORIES) PREMIUM REBUILD
   Scoped CSS strictly for the casos-de-exito.html page to avoid global conflicts.
   ========================================================================== */

/* Variables that map to the global design system */
:root {
    --ce-gold: #c5a059;
    --ce-gold-dark: #a68549;
    --ce-bg-white: #ffffff;
    --ce-bg-light: #f9f9f9;
    --ce-text-dark: #111111;
    --ce-text-muted: #555555;
    --ce-font: 'Montserrat', sans-serif;
    --ce-padding: clamp(60px, 8vw, 120px) 10%;
}

/* Base utility tags */
.ce-tag {
    display: block;
    color: var(--ce-gold);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* 1. Hero Section */
.ce-hero {
    position: relative;
    height: 85vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--ce-bg-white);
    overflow: hidden;
}

.ce-hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.ce-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%; /* Focus on the smile */
}

/* Very subtle light overlay to make text pop but keep the image bright */
.ce-hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0.95) 100%);
}

.ce-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.ce-hero-title {
    font-family: var(--ce-font);
    font-weight: 800;
    font-size: clamp(3rem, 6vw, 4.5rem);
    color: var(--ce-text-dark);
    line-height: 1.1;
    margin-bottom: 20px;
}

.ce-hero-title i {
    font-style: normal !important;
    font-weight: inherit;
    color: var(--ce-gold);
}

.ce-hero-desc {
    font-family: var(--ce-font);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--ce-text-muted);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* 2. Featured Cases (Results) */
.ce-featured {
    padding: var(--ce-padding);
    background-color: var(--ce-bg-white);
}

.ce-case-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 120px;
}

.ce-case-featured:last-child {
    margin-bottom: 0;
}

.ce-case-featured.ce-reverse .ce-case-images {
    order: 2;
}
.ce-case-featured.ce-reverse .ce-case-info {
    order: 1;
}

.ce-case-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    position: relative;
}

.ce-img-box {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(100,100,100,0.05);
}

.ce-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/5;
    display: block;
    transition: transform 0.5s ease;
}

.ce-img-box:hover img {
    transform: scale(1.03);
}

.ce-img-label {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(255,255,255,0.9);
    padding: 6px 12px;
    font-family: var(--ce-font);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ce-text-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 2px;
}

.ce-case-info {
    padding: 20px 0;
}

.ce-case-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.ce-case-num {
    font-family: var(--ce-font);
    font-weight: 700;
    font-size: 3rem;
    color: rgba(197, 160, 89, 0.2); /* Very subtle gold */
    line-height: 1;
}

.ce-case-badge {
    background: var(--ce-gold);
    color: #fff;
    padding: 6px 14px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    border-radius: 50px;
}

.ce-case-title {
    font-family: var(--ce-font);
    font-weight: 700;
    font-size: clamp(2rem, 3vw, 2.5rem);
    color: var(--ce-text-dark);
    line-height: 1.2;
    margin-bottom: 25px;
}

.ce-case-title i {
    font-style: normal !important;
    font-weight: inherit;
    color: var(--ce-gold);
}

.ce-case-text p {
    font-family: var(--ce-font);
    color: var(--ce-text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

.ce-case-text strong {
    color: var(--ce-text-dark);
    font-weight: 600;
}

.ce-case-tech {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(100,100,100,0.05);
    font-family: var(--ce-font);
    font-size: 0.85rem;
    color: var(--ce-text-dark);
}

.ce-case-tech b {
    color: var(--ce-gold);
}

/* 3. Clinical Portfolio Grid */
.ce-portfolio {
    padding: var(--ce-padding);
    background-color: var(--ce-bg-light);
}

.ce-portfolio-header {
    text-align: center;
    margin-bottom: 60px;
}

.ce-portfolio-header h2 {
    font-family: var(--ce-font);
    font-weight: 700;
    font-size: clamp(2rem, 3vw, 2.8rem);
    color: var(--ce-text-dark);
    margin-bottom: 15px;
}

.ce-portfolio-header h2 i {
    font-style: normal !important;
    font-weight: inherit;
    color: var(--ce-gold);
}

.ce-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.ce-portfolio-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 1/1;
    cursor: pointer;
}

.ce-portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.ce-portfolio-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(17, 17, 17, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.ce-portfolio-overlay h3 {
    color: #fff;
    font-family: var(--ce-font);
    font-weight: 600;
    font-size: 1.2rem;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.ce-portfolio-item:hover img {
    transform: scale(1.05);
}

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

.ce-portfolio-item:hover .ce-portfolio-overlay h3 {
    transform: translateY(0);
}

/* 4. Injoe Protocol (Process) */
.ce-protocol {
    padding: var(--ce-padding);
    background-color: var(--ce-bg-white);
}

.ce-protocol-header {
    text-align: center;
    margin-bottom: 80px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.ce-protocol-header h2 {
    font-family: var(--ce-font);
    font-size: clamp(2rem, 3vw, 2.8rem);
    color: var(--ce-text-dark);
    margin-bottom: 20px;
}

.ce-protocol-header h2 i {
    font-style: normal !important;
    font-weight: inherit;
    color: var(--ce-gold);
}

.ce-protocol-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
}

.ce-step {
    padding: 40px 30px;
    background: var(--ce-bg-light);
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(100,100,100,0.02);
}

.ce-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(100,100,100,0.05);
}

.ce-step-number {
    font-family: var(--ce-font);
    font-size: 2rem;
    font-weight: 700;
    color: var(--ce-gold);
    margin-bottom: 20px;
    display: inline-block;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(197, 160, 89, 0.3);
}

.ce-step h4 {
    font-family: var(--ce-font);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ce-text-dark);
    margin-bottom: 15px;
}

.ce-step p {
    font-size: 0.95rem;
    color: var(--ce-text-muted);
}

/* 5. Vision / Philosophy */
.ce-vision {
    padding: var(--ce-padding);
    background-color: var(--ce-text-dark); /* Dark section for contrast */
    color: #fff;
}

.ce-vision-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.ce-vision-title {
    font-family: var(--ce-font);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 30px;
    color: #fff;
}

.ce-vision-title i {
    font-style: normal !important;
    font-weight: inherit;
    color: var(--ce-gold);
}

.ce-vision-text p {
    color: #ccc;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.ce-vision-signature {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ce-vision-signature p {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
}

.ce-dot {
    width: 6px;
    height: 6px;
    background: var(--ce-gold);
    border-radius: 50%;
}

.ce-vision-img-wrapper {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.ce-vision-img-wrapper::after {
    content: '';
    position: absolute;
    top: 20px; left: 20px; right: 20px; bottom: 20px;
    border: 1px solid rgba(197, 160, 89, 0.5);
    pointer-events: none;
}

.ce-vision-img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    filter: brightness(0.85);
}

/* 6. CTA Section */
.ce-cta-section {
    padding: 100px 10%;
    background: var(--ce-bg-light);
    text-align: center;
}

.ce-cta-container h2 {
    font-family: var(--ce-font);
    font-size: 2.2rem;
    color: var(--ce-text-dark);
    margin-bottom: 40px;
}

.ce-btn-primary {
    display: inline-block;
    background: var(--ce-gold);
    color: #fff;
    padding: 18px 40px;
    font-family: var(--ce-font);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-decoration: none;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.ce-btn-primary:hover {
    background: var(--ce-gold-dark);
    transform: translateY(-2px);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .ce-case-featured {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .ce-case-featured.ce-reverse .ce-case-images {
        order: 0;
    }
    .ce-case-featured.ce-reverse .ce-case-info {
        order: 0;
    }
    
    .ce-protocol-steps {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .ce-vision-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

@media (max-width: 576px) {
    .ce-case-images {
        grid-template-columns: 1fr;
    }
    .ce-vision-signature {
        flex-direction: column;
        align-items: flex-start;
    }
}
