/* Custom styles can go here */
body {
    padding-top: 0;
    /* Add padding if navbar is fixed-top, but sticky-top handles it automatically */
}

/* Prevent horizontal scrollbar on desktop for Tufte-style sidenotes */
@media (min-width: 1200px) {
    body {
        overflow-x: hidden;
    }
}

/* ========================================
   Hero Section with Animated Icons
   ======================================== */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0a58ca 0%, #0d6efd 50%, #3d8bfd 100%);
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
    color: white;
}

/* Floating background icons */
.hero-icons {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.08;
}

.hero-icon {
    position: absolute;
    width: 70px;
    /* Adjusted size for SVGs in hero */
    height: 70px;
    /* Adjusted size for SVGs in hero */
    object-fit: contain;
    filter: brightness(0) invert(1);
    animation: float 6s ease-in-out infinite;
}

.hero-icon:nth-child(1) {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.hero-icon:nth-child(2) {
    top: 15%;
    right: 10%;
    animation-delay: 1s;
}

.hero-icon:nth-child(3) {
    top: 45%;
    left: 15%;
    animation-delay: 2s;
}

.hero-icon:nth-child(4) {
    top: 50%;
    right: 20%;
    animation-delay: 3s;
}

.hero-icon:nth-child(5) {
    top: 75%;
    left: 25%;
    animation-delay: 4s;
}

.hero-icon:nth-child(6) {
    top: 70%;
    right: 5%;
    animation-delay: 5s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Hero content */
.hero-content {
    position: relative;
    z-index: 1;
}


/* Service Section Cards - Stronger Border */
.hover-shadow {
    border: 2px solid rgba(0, 0, 0, 0.15) !important;
}

.hover-shadow:hover {
    border-color: rgba(0, 0, 0, 0.25) !important;
}


/* Collapsible Details/Summary Styling */
details {
    border: none;
}

summary {
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: flex-start;
    padding: 8px 12px;
    border-radius: 6px;
    margin: -8px -12px;
    transition: background-color 0.2s ease;
}

summary:hover {
    background-color: rgba(0, 123, 255, 0.05);
    color: var(--bs-primary);
}

/* Hide default markers */
summary::-webkit-details-marker,
summary::marker {
    display: none;
}

/* Remove custom arrow - we'll use the icon rotation instead */
summary::before {
    display: none;
}

/* Rotate the check-circle icon 90° to the left when opened */
summary i.bi-check-circle-fill {
    display: inline-block;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

details[open] summary i.bi-check-circle-fill {
    transform: rotate(-90deg);
}

summary span {
    flex: 1;
}

/* Custom Utilities - Only for what Bootstrap doesn't provide */

/* Hover Shadow Effect */
.hover-shadow {
    transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-3px) !important;
}

/* Clickable Section Titles */
.section-title-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.section-title-link:hover {
    color: var(--bs-primary);
    transform: translateX(5px);
}

/* Arrow always visible with pulsing animation */
.section-title-link::after {
    content: '→';
    font-size: 0.8em;
    opacity: 1;
    color: var(--bs-primary);
    animation: pulse-arrow 2s ease-in-out infinite;
}

/* Pulsing animation for arrow */
@keyframes pulse-arrow {

    0%,
    100% {
        opacity: 0.6;
        transform: translateX(0);
    }

    50% {
        opacity: 1;
        transform: translateX(3px);
    }
}

/* On hover: stop pulsing and move arrow */
.section-title-link:hover::after {
    animation: none;
    opacity: 1;
    transform: translateX(8px) scale(1.2);
}

.section-title-link .text-primary {
    transition: transform 0.3s ease;
}

.section-title-link:hover .text-primary {
    transform: scale(1.1);
}

/* Toggle All Button */
.toggle-all-details {
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.toggle-all-details:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.toggle-all-details i {
    display: inline-block;
    /* Required for transform to work! */
    transition: transform 0.3s ease;
}

.toggle-all-details.expanded i {
    transform: rotate(180deg);
}

/* Fix Prism.js Line Highlight Alignment Issue */
/* The line-highlight plugin doesn't account for pre padding-top,
   causing highlights to be shifted upward by one line.
   This compensates for the 21.6px padding (1em at 13.5px font-size). */
pre.line-numbers .line-highlight {
    top: calc(var(--line-highlight-top, 0px) + 1em) !important;
}

/* Use transform instead of modifying top directly */
pre.line-numbers .line-highlight {
    transform: translateY(1em);
    width: 100% !important;
    left: 0 !important;
}

/* ========================================
   Collapsible Service Sections
   ======================================== */

/* Service Collapse Button */
.service-collapse-btn {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    transition: all 0.3s ease;
}

.service-collapse-btn:hover {
    color: var(--bs-primary) !important;
}

.service-collapse-btn:focus {
    box-shadow: none;
    outline: none;
}

/* Collapse Icon Animation */
.collapse-icon {
    display: inline-block;
    /* Required for transform to work! */
    transition: transform 0.3s ease;
    color: var(--bs-primary);
    font-size: 1.2rem;
}

/* Pulsing animation for collapsed chevron */
.service-collapse-btn[aria-expanded="false"] .collapse-icon {
    animation: pulse-chevron 2s ease-in-out infinite;
}

@keyframes pulse-chevron {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.service-collapse-btn[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
    animation: none;
    opacity: 1;
    /* ▼ → ▲ */
}

/* Mehr Details Link */
.mehr-details-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.875rem;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.mehr-details-link:hover {
    opacity: 1;
    color: var(--bs-primary);
    text-decoration: underline;
}

/* Mobile: Stack mehr-details link below title */
@media (max-width: 768px) {
    .mehr-details-link {
        display: block;
        margin-top: 0.5rem;
        margin-left: 0 !important;
    }

    .service-collapse-btn {
        font-size: 1.25rem;
    }
}

/* ========================================
   Service Cards (Mockup Style)
   ======================================== */

.service-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.service-card-top {
    display: flex;
    gap: 20px;
    margin-bottom: 5px;
}

.service-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0d6efd 0%, #3d8bfd 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-icon-svg {
    width: 61px;
    height: 61px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.service-icon {
    font-size: 40px;
    color: white;
}

.service-content {
    flex: 1;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0d6efd;
    margin-bottom: 15px;
}

/* Footer Section */
.footer-main {
    background-color: #474747 !important;
    padding-top: 3rem;
    padding-bottom: 3rem;
    color: white;
}

.footer-bottom {
    background-color: #333 !important;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    color: white;
}

.footer-bottom a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: white;
}

.footer-links a {
    color: #d0d0d0;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.service-points {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-points li {
    padding: 3px 0;
    font-size: 0.95rem;
    color: #6c757d;
    position: relative;
    padding-left: 25px;
}

.service-points li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #0d6efd;
    font-weight: bold;
}

.service-lead {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 8px;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: gap 0.3s ease;
}

.service-link:hover {
    gap: 12px;
    color: #0a58ca;
}

.service-link i {
    transition: transform 0.3s ease;
}

.service-link:hover i {
    transform: translateX(4px);
}

/* Service Card Top - Flexible growth */
.service-card-top {
    flex: 1 1 auto;
}

/* Service Footer - Fixed height for consistent alignment */
.service-footer {
    flex: 0 0 130px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 5px;
}


/* Responsive adjustments for service cards */
@media (max-width: 768px) {
    .service-card {
        margin-bottom: 20px;
    }

    .service-card-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .service-icon-wrapper {
        align-self: center;
        margin-bottom: 15px;
    }

    .service-content {
        width: 100%;
        text-align: left;
    }

    .service-title {
        text-align: center;
        width: 100%;
    }
}