/*
 * LoopCalTech Enhanced CSS - FIXED VERSION
 * Corrected text visibility, image sizing, and spacing issues
 */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

body {
    font-smoothing: antialiased;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #ebebeb !important;
}

/* ============================================
   HEADER ENHANCEMENTS
   ============================================ */

#header {
    background: #000000;
    backdrop-filter: none;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    color: #333333 !important;
}

#header > nav > a {
    color: #333333 !important;
}

#header > nav > a:hover {
    color: #f56a6a !important;
}

#header .logo {
    color: #333333 !important;
}

#header .logo img {
    transition: transform 0.3s ease;
}

#header .logo:hover img {
    transform: scale(1.05);
}

/* ============================================
   BANNER ENHANCEMENTS
   ============================================ */

#banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(245, 106, 106, 0.7) 0%, 
        rgba(30, 30, 50, 0.85) 100%);
    z-index: 1;
}

#banner .inner {
    position: relative;
    z-index: 2;
}

#banner h1 {
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
    letter-spacing: -0.02em;
}

#banner p {
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* ============================================
   SECTION STYLING - FIXED
   ============================================ */

.wrapper.style1 {
    background: #f5f5f5 !important;
}

.wrapper.style2 {
    background: #e8e8e8 !important;
}

.wrapper.style3 {
    background: #dcdcdc !important;
    border-top: 4px solid #f56a6a !important;
    border-bottom: 4px solid #f56a6a !important;
}

/* ============================================
   HEADINGS - FIXED
   ============================================ */

.special h2 {
    position: relative;
    padding-bottom: 1em;
}

.special h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, #f56a6a, #ff9a9a);
    margin: 0.8em auto 0 auto;
    border-radius: 2px;
}

/* ============================================
   BOX STYLING - FIXED
   ============================================ */

.box {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    padding: 2em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #f56a6a, #ff9a9a);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(245, 106, 106, 0.2);
}

.box:hover::before {
    transform: scaleX(1);
}

/* ============================================
   STAT BOXES - FIXED SIZING
   ============================================ */

.stat-box {
    text-align: center;
    padding: 2em 1em;
    background: #ffffff;
    border: 2px solid #f56a6a;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-bottom: 1em;
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(245, 106, 106, 0.2);
    background: #f56a6a;
    color: white;
}

.stat-box h3 {
    font-size: 2.8em;
    margin: 0 0 0.2em 0;
    color: #f56a6a;
    font-weight: bold;
    line-height: 1;
}

.stat-box:hover h3 {
    color: white;
}

.stat-box p {
    margin: 0;
    font-size: 1.05em;
    font-weight: 600;
    line-height: 1.3;
}

.stat-box:hover p {
    color: white;
}

/* ============================================
   HIGHLIGHTS GRID - FIXED IMAGE SIZING
   ============================================ */

/* Wider container for highlights sections - FORCE OVERRIDE */
.wrapper.style2 .inner {
    max-width: 100rem !important;
    width: 96% !important;
}

.highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5em;
    margin: 2em 0;
}

.highlights section {
    height: 100%;
}

.highlights section .content {
    background: #ffffff;
    border-radius: 8px;
    padding: 2.5em 2em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 320px;
}

.highlights section .content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(245, 106, 106, 0.2);
}

/* FIXED: Image sizing and cropping */
.highlights section img {
    width: 100%;
    max-width: 320px;
    height: 240px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto 1.5em auto;
    flex-shrink: 0;
}

.highlights section img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(245, 106, 106, 0.2);
}

/* FIXED: Header text inside content */
.highlights section header {
    margin-bottom: 1.2em;
    flex-shrink: 0;
}

.highlights section h3 {
    font-size: 1.3em;
    margin: 0.5em 0;
    color: #333;
    font-weight: 600;
    line-height: 1.3;
}

.highlights section p {
    font-size: 1em;
    line-height: 1.65;
    margin: 0;
    flex-grow: 1;
    text-align: left;
    padding: 0 1em;
}

/* ============================================
   CTA SECTION - FIXED TEXT VISIBILITY
   ============================================ */

#cta {
    background: #dcdcdc;
    padding: 4em 0;
    position: relative;
}

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

#cta h2 {
    color: #1a1a1a;
    margin-bottom: 1em;
}

#cta p {
    color: #333;
    line-height: 1.8;
}

#cta p strong {
    color: #f56a6a;
}

/* ============================================
   BUTTON ENHANCEMENTS
   ============================================ */

.button {
    transition: all 0.3s ease;
    font-weight: 600;
}

.button.primary {
    background: linear-gradient(135deg, #f56a6a 0%, #ff8585 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(245, 106, 106, 0.3);
    color: #ffffff !important;
}

.button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 106, 106, 0.4);
    background: linear-gradient(135deg, #ff5555 0%, #ff7575 100%);
}

/* ============================================
   FORM ENHANCEMENTS
   ============================================ */

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 0.75em 1em;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    border-color: #f56a6a;
    box-shadow: 0 0 0 3px rgba(245, 106, 106, 0.1);
    outline: none;
}

/* ============================================
   TABLE ENHANCEMENTS
   ============================================ */

table.alt {
    border-radius: 8px;
    overflow: hidden;
}

table.alt thead {
    background: linear-gradient(135deg, #f56a6a 0%, #ff8585 100%);
    color: white;
}

table.alt tbody tr:hover {
    background: rgba(245, 106, 106, 0.05);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media screen and (max-width: 1280px) {
    .wrapper.style2 .inner {
        max-width: 92rem !important;
        width: 94% !important;
    }
    
    .highlights {
        grid-template-columns: repeat(3, 1fr);
        gap: 2em;
    }
    
    .highlights section .content {
        min-width: 280px;
    }
}

@media screen and (max-width: 980px) {
    .highlights {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5em;
    }
    
    .stat-box {
        height: 160px;
    }
    
    .stat-box h3 {
        font-size: 2.3em;
    }
}

@media screen and (max-width: 736px) {
    .highlights {
        grid-template-columns: 1fr;
        gap: 2em;
    }
    
    .highlights section img {
        width: 100%;
        max-width: 300px;
        height: auto;
        aspect-ratio: 1;
    }
    
    .highlights section .content {
        padding: 2em 1.5em;
    }
    
    .stat-box {
        height: 140px;
        padding: 1.5em 1em;
    }
    
    .stat-box h3 {
        font-size: 2em;
    }
    
    .stat-box p {
        font-size: 0.95em;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

:focus-visible {
    outline: 2px solid #f56a6a;
    outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .button,
    #header,
    #menu,
    #footer {
        display: none;
    }
    
    .wrapper {
        padding: 0;
        background: white;
    }
}

/* ============================================
   ADDITIONAL OVERRIDES FOR CORE COMPETENCIES
   ============================================ */

/* Force wider layout for sections with highlights */
section.wrapper.style2 .inner,
.wrapper.style2 > .inner {
    max-width: 100rem !important;
    width: 96% !important;
}

/* Ensure highlights take full width */
.wrapper .highlights {
    width: 100%;
}
