/* 
 * Home Page Specific CSS for OTIMI Source Website
 * Updated with reduced section spacing and card-based layout
 */

/* Hero Section with RIGHT-aligned content */
.hero {
    position: relative;
    color: var(--light-text);
    padding: 3rem 5% 1.5rem; /* Reduced padding */
    margin-top: 60px;
    min-height: 400px; /* Increased slightly for additional text */
    display: flex;
    align-items: center;
    justify-content: flex-end !important; /* Force right alignment */
    overflow: hidden;
}

.hero-background-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Dark overlay */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(29, 53, 95, 0.75); /* Slightly darker overlay for better text readability */
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    max-width: 550px; /* Slightly wider to accommodate more text */
    margin-right: 5%;
    position: relative;
    z-index: 2;
    text-align: left !important; /* Force left text alignment */
    display: flex;
    flex-direction: column;
    align-items: flex-start !important; /* Force left alignment of items */
}

.hero h1 {
    font-size: 2rem; /* Further reduced from 2.2rem to fit in single line */
    margin-bottom: 0.5rem;
    color: var(--light-text);
    font-weight: 700;
    line-height: 1.2;
    text-align: left !important; /* Force left alignment of heading */
    white-space: nowrap; /* Ensure text stays on one line */
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    text-align: left !important; /* Force left alignment of paragraph */
}

.hero-intro {
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.5rem;
    text-align: justify !important; /* Justified text for better readability */
    font-weight: normal; /* Making the text regular font weight, not bold */
}

/* Mobile responsiveness for hero section */
@media screen and (max-width: 768px) {
    .hero {
        justify-content: center !important;
        padding: 2rem 5% 1.5rem;
        min-height: 350px;
    }
    
    .hero-content {
        max-width: 100%;
        margin-right: 0;
        margin-left: 0;
        padding: 0 10px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
        white-space: normal;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-content ul {
        padding-left: 1.2rem;
        margin-bottom: 0;
    }
    
    .hero-content ul li {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }
}

/* Smaller screens (phones) */
@media screen and (max-width: 480px) {
    .hero {
        min-height: 300px;
        padding: 1.5rem 5% 1rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-content ul li {
        font-size: 0.85rem;
    }
}

/* Space between hero and tabs */
.tab-spacing {
    height: 30px;
    background-color: var(--light-bg);
}

/*
 * NEW TAB IMPLEMENTATION
 * This approach avoids pseudo-elements and other techniques that might be causing issues
 */

/* Main tab container */
.new-tabs-container {
    width: 100%;
    background-color: #f5f7fa;
    padding-top: 20px;
    margin-bottom: 50px;
}

/* Tab navigation row */
.new-tabs-nav {
    display: flex;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: none;
}

/* Basic tab button */
.new-tab-btn {
    flex: 1;
    margin: 0 3px;
    background: #ffffff;
    border: none;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    padding: 15px 10px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #01637E;
    cursor: pointer;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    top: 1px;
}

/* Tab button hover state */
.new-tab-btn:hover {
    background: #f0f8fa;
}

/* Active tab */
.new-tab-btn.active {
    background: linear-gradient(135deg, #0188a6 0%, #01BBD4 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 -3px 8px rgba(0, 160, 198, 0.2);
    /* Add top border without using pseudo-elements */
    border-top: 4px solid #ffffff;
    padding-top: 11px; /* Compensate for border */
}

/* Tab content panel */
.new-tab-content {
    background: #ffffff;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 0 0 10px 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    /* Add top border without using pseudo-elements */
    border-top: 5px solid #01BBD4;
}

/* Tab panes */
.new-tab-pane {
    display: none;
}

.new-tab-pane.active {
    display: block;
    animation: fadeEffect 0.5s;
}

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

/* Enhanced Section Title */
.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--primary-blue);
    position: relative;
    padding-bottom: 1rem;
    background: linear-gradient(to right, #01637e, #01BBD4);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #01637e, #01BBD4);
    border-radius: 4px;
}

/* Enhanced Feature Card styling */
.feature-card {
    background: linear-gradient(to bottom, #ffffff 0%, #f9fdff 100%);
    border-radius: 14px;
    padding: 1.8rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
    border: none;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 12px 30px rgba(0, 160, 198, 0.15);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, #01637e, #01BBD4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

/* Enhanced Feature Icon */
.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0188a6 0%, #01BBD4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(1, 187, 212, 0.3);
}

.feature-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.feature-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-content h3 {
    color: var(--primary-blue);
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.feature-content p {
    color: var(--medium-text);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Content title - left aligned */
.content-title {
    text-align: left;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

/* Bullet list - replaces check-list */
.bullet-list {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    text-align: left;
}

.bullet-list li {
    margin-bottom: 0.6rem;
    line-height: 1.3;
    font-size: 0.95rem;
}

/* What We Do Tab Content */
.what-we-do-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Card Grid for tabbed sections */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Results Section - Removed icons */
.results {
    padding: 2rem 5% 3rem;
    background-color: var(--primary-blue);
    color: var(--light-text);
}

.results .section-title {
    color: var(--light-text);
}

.results .section-title::after {
    background-color: var(--light-text);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.result-card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.2rem;
    text-align: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Fixed result card text to prevent percentage breaking */
.result-card p {
    color: var(--light-text);
    font-weight: 500;
    font-size: 1.1rem;
    margin: 0;
    white-space: normal; /* Allow normal wrapping */
}

/* Add non-breaking spaces for percentage ranges to keep them together */
.result-card .percentage-range {
    white-space: nowrap; /* Prevent breaking within the span */
}

/* How We Work Section */
.how-we-work {
    padding: 2rem 5% 3rem;
    /* background-color: white; */
    background-color: var(--light-bg);
}

/* Modified steps container for better sizing */
.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.step-card {
    background-color: var(--light-bg);
    border-radius: 10px;
    padding: 1.3rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-card:hover {
    transform: translateY(-8px);
}

.step-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #01BBD4;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    overflow: hidden;
}

.step-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-align: center;
}

/* Reduced font size for step card titles */
.step-card .content-title,
.step-content h3.content-title {
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    color: var(--primary-blue);
    font-weight: 600;
    text-align: center;
}

.step-content p {
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
}

/* Solutions Section */
.solutions {
    padding: 2rem 5% 3rem;
    background-color: white 
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.2rem;
    max-width: 900px;
    margin: 0 auto;
}

.solution-card {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.solution-card:hover {
    transform: translateY(-8px);
}

.solution-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #01BBD4;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    overflow: hidden;
}

.solution-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.solution-content {
    flex: 1;
    text-align: center;
}

.solution-content .content-title {
    text-align: center;
}

.solution-content .bullet-list {
    text-align: left;
    padding-left: 2rem;
}

/* CTA Section */
.cta {
    padding: 3rem 5% 3rem;
    text-align: center;
    background-color: var(--light-bg);
}

.cta-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.cta h2 {
    color: var(--primary-blue);
    margin-bottom: 0.7rem;
    font-size: 1.7rem;
    position: relative;
    z-index: 1;
}

.cta p {
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
    font-size: 1rem;
}

.cta-benefits {
    max-width: 500px;
    margin: 0 auto 1.5rem;
    text-align: left;
}

.cta .btn {
    position: relative;
    z-index: 1;
}

/* Responsive design for improved tabs */
@media screen and (max-width: 992px) {
    .steps-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .new-tabs-nav {
        width: 95%;
    }
    
    .new-tab-btn {
        padding: 12px 8px;
        font-size: 0.9rem;
    }
    
    .new-tab-content {
        width: 95%;
        padding: 20px 15px;
    }
}

@media screen and (max-width: 576px) {
    .new-tabs-nav {
        flex-direction: column;
    }
    
    .new-tab-btn {
        margin-bottom: 2px;
        border-radius: 5px;
        border-top: none;
    }
    
    .new-tab-btn.active {
        border-top: none;
        border-left: 4px solid #ffffff;
        padding-top: 15px;
        padding-left: 11px;
    }
    
    .new-tab-content {
        border-top-left-radius: 0;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card,
    .step-card,
    .solution-card {
        max-width: 100%;
    }
    
    /* On mobile, titles can wrap if needed */
    .step-card .content-title,
    .step-content h3.content-title {
        white-space: normal;
    }
}