/* Advanced Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(230, 126, 34, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(230, 126, 34, 0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.hover-grow {
    transition: transform 0.3s ease;
}

.hover-grow:hover {
    transform: scale(1.05);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #1a4d8c, #e67e22);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Button Styles */
.btn-outline-custom {
    border: 2px solid #1a4d8c;
    color: #1a4d8c;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background: #1a4d8c;
    color: white;
    transform: translateY(-2px);
}

/* Card Styles */
.card-custom {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-custom:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Image Overlay */
.image-overlay {
    position: relative;
    overflow: hidden;
}

.image-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 77, 140, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-overlay:hover::after {
    opacity: 1;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Tooltip Styles */
.tooltip-custom {
    position: relative;
    display: inline-block;
}

.tooltip-custom .tooltip-text {
    visibility: hidden;
    background-color: #1a4d8c;
    color: white;
    text-align: center;
    padding: 5px 10px;
    border-radius: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip-custom:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Glassmorphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Neumorphism Effect */
.neumorph {
    background: #e0e0e0;
    box-shadow: 20px 20px 60px #bebebe, -20px -20px 60px #ffffff;
    border-radius: 20px;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .display-1 {
        font-size: 3rem;
    }
    .display-2 {
        font-size: 2.5rem;
    }
    .display-3 {
        font-size: 2rem;
    }
    .display-4 {
        font-size: 1.8rem;
    }
    .display-5 {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .scroll-top,
    .btn {
        display: none !important;
    }
    
    body {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
}



/* Letterhead Styles */
.letterhead-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    position: relative;
}

.letterhead {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Letterhead Header */
.letterhead-header {
    padding: 40px 40px 20px;
    border-bottom: 3px solid #1a4d8c;
    position: relative;
    background: linear-gradient(to bottom, #fff, #f8f9fa);
}

.letterhead-logo {
    text-align: center;
    margin-bottom: 20px;
}

.letterhead-logo h1 {
    font-size: 2.5rem;
    color: #1a4d8c;
    margin: 0;
    font-family: 'Playfair Display', serif;
    letter-spacing: 2px;
}

.letterhead-logo .tagline {
    color: #666;
    font-size: 1rem;
    margin-top: 5px;
    font-style: italic;
}

.letterhead-address {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.office {
    flex: 1;
    min-width: 200px;
    padding: 0 15px;
}

.office h3 {
    font-size: 1rem;
    color: #1a4d8c;
    margin-bottom: 5px;
    font-weight: 600;
}

.office p {
    margin: 0;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.4;
}

.contact-details {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.85rem;
}

.contact-details span {
    color: #555;
}

.contact-details i {
    color: #1a4d8c;
    margin-right: 5px;
}

/* Letterhead Body */
.letterhead-body {
    padding: 40px;
    background: white;
    min-height: 500px;
}

/* Letterhead Footer */
.letterhead-footer {
    padding: 20px 40px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.letterhead-footer .professional-info {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
}

.letterhead-footer .professional-info i {
    color: #1a4d8c;
    margin-right: 5px;
}

.letterhead-footer .partners {
    font-size: 0.8rem;
    color: #555;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

/* Letterhead Watermark */
.letterhead-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.03;
    font-size: 5rem;
    white-space: nowrap;
    pointer-events: none;
    font-weight: bold;
    color: #1a4d8c;
    width: 100%;
    text-align: center;
    z-index: 0;
}

/* Printable Letterhead */
@media print {
    body {
        background: white;
        padding: 0;
        margin: 0;
    }
    
    .navbar, .footer, .scroll-top, .btn, .social-section, .cta-section {
        display: none !important;
    }
    
    .letterhead-container {
        box-shadow: none;
        margin: 0;
        padding: 0;
    }
    
    .letterhead {
        box-shadow: none;
    }
    
    .letterhead-header {
        padding: 20px;
    }
    
    .letterhead-body {
        padding: 20px;
    }
    
    .letterhead-footer {
        padding: 15px 20px;
    }
}

/* Responsive Letterhead */
@media (max-width: 768px) {
    .letterhead-header {
        padding: 20px;
    }
    
    .letterhead-logo h1 {
        font-size: 1.5rem;
    }
    
    .letterhead-address {
        flex-direction: column;
        gap: 15px;
    }
    
    .office {
        padding: 0;
    }
    
    .letterhead-body {
        padding: 20px;
    }
    
    .contact-details {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
}

/* Letterhead Button for Print */
.btn-print-letterhead {
    background: #1a4d8c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.btn-print-letterhead:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

/* Letterhead Card Style */
.letterhead-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.letterhead-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Decorative Elements */
.letterhead-decoration {
    height: 5px;
    background: linear-gradient(90deg, #1a4d8c, #e67e22, #1a4d8c);
}

/* Commission Stamp */
.commission-stamp {
    display: inline-block;
    padding: 5px 15px;
    background: #f0f0f0;
    border: 1px solid #1a4d8c;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #1a4d8c;
    margin-top: 10px;
}

.commission-stamp i {
    margin-right: 5px;
}

/* Fix for lead text on dark backgrounds */
.hero-section .lead,
.contact-hero .lead,
.about-hero .lead,
.practice-hero .lead,
.blog-hero .lead,
.csr-hero .lead,
.project-hero .lead,
.category-hero .lead,
.post-hero .lead {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Fix for all lead text on dark backgrounds */
.bg-primary .lead,
.bg-dark .lead,
[class*="hero"] .lead,
[class*="-hero"] .lead {
    color: #ffffff !important;
    opacity: 1;
}

/* Ensure all text on hero sections is white */
.hero-section h1,
.hero-section h2,
.hero-section h3,
.hero-section p,
.contact-hero h1,
.contact-hero p,
.about-hero h1,
.about-hero p,
.practice-hero h1,
.practice-hero p,
.blog-hero h1,
.blog-hero p,
.csr-hero h1,
.csr-hero p,
.project-hero h1,
.project-hero p {
    color: white !important;
}

/* Fix for light text on gradient backgrounds */
.bg-gradient-dark,
.bg-gradient-primary {
    color: white;
}

.bg-gradient-dark .lead,
.bg-gradient-primary .lead {
    color: rgba(255, 255, 255, 0.95);
}

/* Ensure all text in hero sections is readable */
.hero-section *,
.contact-hero *,
.about-hero *,
.practice-hero *,
.blog-hero *,
.csr-hero *,
.project-hero *,
.category-hero *,
.post-hero * {
    color: white;
}

/* Exception for links */
.hero-section a:not(.btn),
.contact-hero a:not(.btn) {
    color: rgba(255, 255, 255, 0.9);
}

.hero-section a:not(.btn):hover,
.contact-hero a:not(.btn):hover {
    color: #e67e22;
}

/* Fix for breadcrumb text in hero sections */
.hero-section .breadcrumb-item a,
.contact-hero .breadcrumb-item a,
.about-hero .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
}

.hero-section .breadcrumb-item.active,
.contact-hero .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.6);
}

/* Ensure lead text is bright and visible */
.lead {
    font-size: 1.25rem;
    font-weight: 300;
}

.bg-light .lead {
    color: #6c757d !important;
}

/* Specific fix for stats section */
.stats-section .lead {
    color: white !important;
}

/* Fix for CTA section */
.cta-section .lead,
.cta-section p,
.cta-section h2 {
    color: white !important;
}

/* Fix for any text on primary backgrounds */
.bg-primary,
.bg-primary * {
    color: white;
}

.bg-primary .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}



/* Emergency fix for all dark backgrounds */
.bg-primary,
.bg-dark,
[class*="bg-primary"],
[class*="bg-dark"],
section[class*="hero"],
section[class*="-hero"],
.hero-section,
.contact-hero,
.about-hero,
.practice-hero,
.blog-hero,
.csr-hero,
.project-hero,
.category-hero,
.post-hero,
.stats-section,
.cta-section {
    color: white;
}

.bg-primary p,
.bg-dark p,
[class*="hero"] p,
[class*="-hero"] p,
.stats-section p,
.cta-section p {
    color: rgba(255, 255, 255, 0.95);
}

.bg-primary .lead,
.bg-dark .lead,
[class*="hero"] .lead,
[class*="-hero"] .lead {
    color: white !important;
    opacity: 1;
}

/* Fix for any muted text on dark backgrounds */
.bg-primary .text-muted,
.bg-dark .text-muted,
[class*="hero"] .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Ensure buttons on dark backgrounds are visible */
.bg-primary .btn-outline-light,
.bg-dark .btn-outline-light {
    color: white;
    border-color: white;
}

.bg-primary .btn-outline-light:hover,
.bg-dark .btn-outline-light:hover {
    background: white;
    color: #1a4d8c;
}