/* Big Solution - Main Stylesheet */
/* Optimized for SEO and Mobile Performance */

/* Critical CSS - Above the fold */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --touch-target: 44px; /* Minimum touch target size */
}

/* Reset and Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Screen reader only classes */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sr-only-focusable:focus {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    width: auto !important;
    height: auto !important;
    padding: 8px 12px !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    background: var(--primary-color) !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;
    font-weight: bold !important;
    z-index: 10000 !important;
}

/* Skip to main content link */
.skip-link {
    position: absolute !important;
    top: -1000px !important;
    left: -1000px !important;
    width: 1px !important;
    height: 1px !important;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 1000;
    text-decoration: none;
    border-radius: 4px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
    margin: -1px;
}

.skip-link:focus {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    background: var(--primary-color) !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3) !important;
    font-weight: bold !important;
}

/* Header Styles - Mobile-First Approach */
.top-bar {
    font-size: 0.875rem;
}

.navbar-brand img {
    transition: transform 0.3s ease;
    max-width: 100%;
    height: auto;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: color 0.3s ease;
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
}

/* Mobile-friendly navigation */
@media (max-width: 991.98px) {
    .navbar-nav .nav-link {
        padding: 1rem;
        border-bottom: 1px solid #e9ecef;
    }
    
    .navbar-nav .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin-top: 0;
        background-color: #f8f9fa;
        border: 0;
        box-shadow: none;
    }
    
    .navbar-nav .dropdown-item {
        padding: 0.75rem 2rem;
        min-height: var(--touch-target);
        display: flex;
        align-items: center;
    }
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow);
    border-radius: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    font-weight: 400;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    min-height: 70vh;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern.svg') repeat;
    opacity: 0.1;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.floating-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
}

.floating-icon i {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-icon i {
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon i {
    transform: scale(1.1);
}

/* Portfolio Cards */
.portfolio-card {
    transition: all 0.3s ease;
}

.portfolio-overlay {
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

/* Testimonial Cards */
.testimonial-card {
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

/* Why Choose Us Section */
.feature-item {
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateX(10px);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(13, 110, 253, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CTA Section */
.cta-section {
    background: var(--gradient-secondary);
    color: white;
}

.bg-gradient {
    background: var(--gradient-primary) !important;
    color: white;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
}

footer .social-links a {
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    transform: translateY(-3px);
    color: var(--warning-color) !important;
}

/* Modern Floating Back to Top Button */
.back-to-top-modern {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px 30px 15px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(100px);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.back-to-top-modern.show {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.back-to-top-content {
    color: white;
    font-size: 20px;
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.back-to-top-text {
    color: white;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0.9;
}

.back-to-top-modern:hover .back-to-top-content {
    transform: translateY(-2px);
}

.back-to-top-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.back-to-top-modern:hover::before {
    opacity: 1;
}

/* Breadcrumb */
.breadcrumb-section {
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb-item a {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--dark-color);
}

/* Forms */
.form-control {
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.btn {
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-height: var(--touch-target);
    min-width: var(--touch-target);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 1rem;
    line-height: 1.5;
}

.btn:hover, .btn:focus {
    transform: translateY(-2px);
    text-decoration: none;
}

.btn:active {
    transform: translateY(0);
}

/* Ensure buttons are properly sized on mobile */
@media (max-width: 767.98px) {
    .btn {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn + .btn {
        margin-left: 0;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Custom Utilities */
.min-vh-50 {
    min-height: 50vh;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-primary-left {
    border-left: 4px solid var(--primary-color);
}

.shadow-primary {
    box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .floating-icon {
        display: none;
    }
    
    .feature-item:hover {
        transform: none;
    }
    
    .service-card:hover {
        transform: none;
    }
    
    .portfolio-card:hover {
        transform: none;
    }
}

@media (max-width: 576px) {
    .hero-section .display-4 {
        font-size: 1.75rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .navbar-brand img {
        height: 40px;
    }
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error and Success Messages */
.alert {
    border-radius: 0.5rem;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

/* Page-specific styles */
.page-header {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem 0;
}

.page-content {
    padding: 3rem 0;
}

/* Gallery Styles */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Floating Action Buttons */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.floating-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    color: white;
}

.floating-btn.whatsapp {
    background: #25D366;
}

.floating-btn.whatsapp:hover {
    background: #128C7E;
}

.floating-btn.call {
    background: #007bff;
}

.floating-btn.call:hover {
    background: #0056b3;
}

.floating-btn.email {
    background: #dc3545;
}

.floating-btn.email:hover {
    background: #c82333;
}

.floating-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.floating-btn:hover::before {
    width: 100px;
    height: 100px;
}

/* Pulse animation for floating buttons */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.floating-btn.whatsapp {
    animation: pulse 2s infinite;
}

/* Responsive adjustments for floating buttons */
@media (max-width: 768px) {
    .floating-buttons {
        bottom: 20px;
        right: 15px;
        gap: 15px;
        flex-direction: column;
    }
    
    .floating-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    /* Responsive back-to-top button */
    .back-to-top-modern {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 60px;
    }
    
    .back-to-top-content {
        font-size: 18px;
    }
    
    .back-to-top-text {
        font-size: 7px;
    }
}

@media (max-width: 480px) {
    .floating-buttons {
        gap: 12px;
        right: 10px;
    }
    
    .floating-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    /* Smaller back-to-top button for mobile */
    .back-to-top-modern {
        bottom: 15px;
        left: 15px;
        width: 45px;
        height: 55px;
    }
    
    .back-to-top-content {
        font-size: 16px;
    }
    
    .back-to-top-text {
        font-size: 6px;
    }
}

/* Hero Section Enhancements */
.hero-section {
    min-height: 80vh;
    position: relative;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50px, -50px); }
}

.floating-cards {
    height: 400px;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    animation: float 6s ease-in-out infinite;
}

.railway-card {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.hoarding-card {
    top: 50%;
    right: 20%;
    animation-delay: 2s;
}

.digital-card {
    bottom: 20%;
    left: 30%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.pulse-button {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Interactive Map Styles */
.map-pin .pin-marker {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.map-pin .pin-marker:hover {
    transform: scale(1.2);
}

.pulse {
    animation: pulse-pin 2s infinite;
}

@keyframes pulse-pin {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

/* Statistics Counter */
.stat-number {
    font-size: 3rem;
    line-height: 1;
}

.stat-item {
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
}

/* Coverage Map */
.location-item {
    transition: all 0.3s ease;
}

.location-item:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1) !important;
}

/* Animations */
.animate__animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

.animate__fadeInUp {
    animation-name: fadeInUp;
}

.animate__fadeInRight {
    animation-name: fadeInRight;
}

.animate__delay-1s {
    animation-delay: 0.5s;
}

.animate__delay-2s {
    animation-delay: 1s;
}

.animate__delay-3s {
    animation-delay: 1.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(40px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Smooth Scrolling */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* Map Pin Interactions */
.map-pin {
    transition: all 0.3s ease;
    cursor: pointer;
}

.map-pin:hover,
.map-pin.active {
    transform: scale(1.5);
    filter: drop-shadow(0 0 8px rgba(0, 123, 255, 0.8));
}

.map-tooltip {
    animation: fadeInTooltip 0.3s ease;
}

@keyframes fadeInTooltip {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in-up.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.floating-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.floating-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Counter Animation */
.counter {
    font-weight: bold;
    color: #007bff;
}

/* Mobile Enhancements */
@media (max-width: 768px) {
    .map-pin {
        width: 8px !important;
        height: 8px !important;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .floating-cards {
        flex-direction: column;
    }
    
    .floating-card {
        margin-bottom: 1rem;
    }
    
    .stats-section .col-md-3 {
        margin-bottom: 2rem;
    }
}

/* Print Styles */
@media print {
    .navbar, .footer, .back-to-top-modern, .floating-icon, .floating-buttons {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}
