/* Hero Section */
.hero {
    text-align: center;
    padding: 50px 40px;
    background: 
        linear-gradient(135deg, rgba(102, 126, 234, 0.35) 0%, rgba(118, 75, 162, 0.35) 100%),
        url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    border-radius: 25px;
    margin: 20px 20px 30px 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.01);
    backdrop-filter: blur(0.3px);
    z-index: 1;
}

.hero > * {
    position: relative;
    z-index: 2;
}

/* DEV NOTE: Adjusted spacing for better readability on multi-line headings. */
.hero h2 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.3rem, 2.5vw, 1.9rem);
    margin-bottom: 25px;
    color: white;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 1s ease;
    font-weight: 500;
    letter-spacing: 0.5px; /* ADJUSTED */
    text-transform: capitalize;
    position: relative;
    line-height: 1.4; /* ADJUSTED */
}

.hero h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #FF6B6B 0%, #4ECDC4 25%, #667eea 50%, #764ba2 75%, #FF6B6B 100%);
    border-radius: 1px;
    animation: colorShift 3s ease-in-out infinite;
}

@keyframes colorShift {
    0%, 100% { 
        background: linear-gradient(90deg, #FF6B6B 0%, #4ECDC4 25%, #667eea 50%, #764ba2 75%, #FF6B6B 100%);
    }
    50% { 
        background: linear-gradient(90deg, #4ECDC4 0%, #667eea 25%, #764ba2 50%, #FF6B6B 75%, #4ECDC4 100%);
    }
}

/* DEV NOTE: Standardized paragraph spacing. */
.hero p {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    margin-bottom: 35px;
    color: rgba(255, 255, 255, 0.96);
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease 0.3s both;
    line-height: 1.7; /* ADJUSTED */
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.cta-button {
    display: inline-block;
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4);
    color: white;
    padding: 14px 32px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-transform: none;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease 0.6s both;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    background: linear-gradient(45deg, #ff5757, #3bb8b0);
}

/* Services Panels */
.services-panels {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.service-panel {
    display: flex;
    align-items: center;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    backdrop-filter: blur(25px);
    border-radius: 35px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    opacity: 0;
    transform: translateY(60px);
    min-height: 350px;
    padding: 0;
}

.service-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-panel:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.25);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    border-color: rgba(255, 255, 255, 0.3);
}

.service-panel:nth-child(even) {
    flex-direction: row-reverse;
}

.panel-main-image {
    flex: 0 0 30%;
    height: 280px;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0% 0%, 85% 0%, 100% 50%, 85% 100%, 0% 100%);
}

.service-panel:nth-child(even) .panel-main-image {
    clip-path: polygon(15% 0%, 100% 0%, 100% 100%, 15% 100%, 0% 50%);
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85) contrast(1.1) saturate(1.1);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-panel:hover .main-image {
    transform: scale(1.08);
    filter: brightness(0.9) contrast(1.2) saturate(1.2);
}

.panel-content {
    flex: 1;
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    z-index: 3;
}

.service-header {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    z-index: 5;
}

.service-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 2;
    flex-shrink: 0;
    margin-right: 20px;
}

.service-panel:nth-child(1) .service-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.service-panel:nth-child(2) .service-icon {
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%);
}

.service-panel:nth-child(3) .service-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.service-panel:nth-child(4) .service-icon {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
}

/* DEV NOTE: Globally improved heading spacing. */
.panel-content h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: white;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.2px; /* ADJUSTED */
    line-height: 1.45; /* ADJUSTED */
    position: relative;
    z-index: 2;
    margin: 0;
    flex: 1;
    text-transform: none;
    transition: all 0.3s ease;
}

/* DEV NOTE: Globally improved paragraph spacing for consistency. */
.panel-description {
    font-family: 'Inter', sans-serif;
    color: rgba(255, 255, 255, 0.96);
    font-size: 1.05rem;
    line-height: 1.7; /* ADJUSTED */
    margin-bottom: 0;
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    max-width: 520px;
    position: relative;
    z-index: 2;
    letter-spacing: 0.2px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to Top Button */
/* layout.css */

#backToTopBtn {
    display: none; 
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    border: none;
    outline: none;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.3rem; /* Slightly increased size */
    font-weight: bold; /* This makes the arrow bold */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, background 0.3s;
    opacity: 0;
    transform: translateY(15px);
}

#backToTopBtn.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

#backToTopBtn:hover {
    background: linear-gradient(45deg, #5a6fd5, #673f91);
    transform: scale(1.1);
}