/* Custom Styles for Agastya International */

/* Root Variables */
:root {
    --primary-color: #0d6efd;
    --primary-dark: #0a58ca;
    --secondary-color: #6c757d;
    --warning-color: #ffc107;
    --success-color: #198754;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --border-radius: 0.375rem;
    --transition: all 0.15s ease-in-out;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    padding-top: 76px; /* Account for fixed navbar */
}

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

/* Typography */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(45deg, var(--primary-color), var(--warning-color));
    border-radius: 2px;
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--warning-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--warning-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-stats .stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-stats .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.hero-image img {
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.hero-image img:hover {
    transform: scale(1.05);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
}

/* Cards and Components */
.service-card,
.product-card,
.category-card,
.certification-card,
.feature-card,
.component-card,
.accessory-card,
.managed-service,
.security-service,
.approach-step,
.industry-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.125);
    background: #fff;
    position: relative;
    overflow: hidden;
}

.service-card::before,
.product-card::before,
.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before,
.product-card:hover::before,
.category-card:hover::before {
    left: 100%;
}

.service-card:hover,
.product-card:hover,
.category-card:hover,
.certification-card:hover,
.feature-card:hover,
.component-card:hover,
.accessory-card:hover,
.managed-service:hover,
.security-service:hover,
.approach-step:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.industry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Product Cards */
.product-badge {
    z-index: 10;
}

.product-features,
.product-specs {
    font-size: 0.875rem;
    line-height: 1.4;
}

.product-image {
    overflow: hidden;
    position: relative;
}

.product-image img {
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

/* Buttons */
.btn {
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    border: none;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

.btn-warning {
    background: linear-gradient(45deg, var(--warning-color), #ffb302);
    border: none;
    color: var(--dark-color);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
    color: var(--dark-color);
}

/* Icons */
.service-icon,
.feature-icon,
.cert-icon,
.category-icon,
.component-icon,
.accessory-icon {
    transition: all 0.3s ease;
}

.service-card:hover .service-icon,
.feature-card:hover .feature-icon,
.certification-card:hover .cert-icon,
.category-card:hover .category-icon,
.component-card:hover .component-icon,
.accessory-card:hover .accessory-icon {
    transform: scale(1.1);
    color: var(--warning-color) !important;
}

/* Statistics and Counters */
.stat-card h3,
.highlight-item h4 {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Forms */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    transform: translateY(-1px);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Contact Form */
.contact-form {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--box-shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.info-item {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.info-item:last-child {
    border-bottom: none;
}

.info-icon i {
    width: 40px;
    text-align: center;
}

/* Emergency Support */
.emergency-support .d-flex {
    transition: all 0.3s ease;
}

.emergency-support .d-flex:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Map Placeholder */
.map-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: all 0.3s ease;
}

.map-placeholder:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

/* Accordion */
.accordion-button {
    font-weight: 600;
    background: #fff;
    border: none;
    box-shadow: none;
}

.accordion-button:not(.collapsed) {
    background: var(--primary-color);
    color: #fff;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.accordion-item {
    border: 1px solid rgba(0, 0, 0, 0.125);
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius) !important;
    overflow: hidden;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #000 100%) !important;
}

footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--warning-color) !important;
    transform: translateX(3px);
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    color: #fff !important;
}

/* Modal */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: var(--box-shadow-lg);
}

.modal-header {
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: none;
    padding: 1rem 2rem 2rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fadeInRight {
    animation: fadeInRight 0.6s ease-out;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert Messages */
.alert {
    border-radius: var(--border-radius);
    border: none;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(45deg, var(--success-color), #146c43);
    color: #fff;
}

.alert-danger {
    background: linear-gradient(45deg, var(--danger-color), #b02a37);
    color: #fff;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.7);
}

/* Filter Buttons */
.filter-buttons .btn {
    margin-bottom: 0.5rem;
}

.filter-buttons .btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-stats .stat-card {
        margin-bottom: 1rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.75rem;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .modal,
    footer,
    .btn {
        display: none !important;
    }
    
    .hero-section,
    .page-header {
        background: #fff !important;
        color: #000 !important;
    }
    
    body {
        padding-top: 0;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --warning-color: #ff6600;
        --success-color: #008000;
        --danger-color: #ff0000;
    }
    
    .service-card,
    .product-card,
    .category-card {
        border: 2px solid var(--primary-color);
    }
}

/* Mega Menu Styles */
.mega-dropdown .dropdown-menu {
    width: 100vw;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-top: 0;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 15px 15px;
    padding: 2rem 0;
}

.mega-dropdown .dropdown-menu .container {
    max-width: 1200px;
}

.mega-dropdown .dropdown-header {
    font-size: 1rem;
    padding: 0.5rem 0 1rem;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1rem;
}

.mega-dropdown .dropdown-item {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border-radius: 5px;
    margin-bottom: 0.25rem;
}

.mega-dropdown .dropdown-item:hover {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    color: white;
    transform: translateX(5px);
}

/* Hero Slider Styles */
.hero-slider {
    position: relative;
    margin-top: 76px;
}

.hero-slide {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.bg-gradient-cloud {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-security {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.carousel-control-prev {
    left: 2rem;
}

.carousel-control-next {
    right: 2rem;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 24px;
    height: 24px;
}

/* Carousel Indicators */
.carousel-indicators {
    bottom: 2rem;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background: var(--warning-color);
    transform: scale(1.2);
}

/* Slide Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slideInLeft {
    animation: slideInLeft 1s ease-out forwards;
    opacity: 0;
}

.animate-slideInRight {
    animation: slideInRight 1s ease-out forwards;
    opacity: 0;
}

/* Hero Slide Content */
.hero-slide .hero-content h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-slide .hero-content .lead {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-slide .hero-image img {
    filter: brightness(1.1) contrast(1.1);
    transition: transform 0.5s ease;
}

.carousel-item.active .hero-image img {
    transform: scale(1.02);
}

/* Feature Items */
.feature-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Security Stats */
.security-stats .stat-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Mobile Responsive for Hero Slider */
@media (max-width: 768px) {
    .hero-slide {
        min-height: 80vh;
        padding: 2rem 0;
    }
    
    .hero-slide .display-4 {
        font-size: 2rem;
    }
    
    .hero-slide .lead {
        font-size: 1rem;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 50px;
        height: 50px;
    }
    
    .carousel-control-prev {
        left: 1rem;
    }
    
    .carousel-control-next {
        right: 1rem;
    }
    
    .mega-dropdown .dropdown-menu {
        position: static !important;
        width: 100% !important;
        transform: none !important;
        margin-top: 0;
        box-shadow: none;
        border-radius: 0;
        padding: 1rem;
    }
    
    .mega-dropdown .dropdown-menu .row {
        flex-direction: column;
    }
    
    .mega-dropdown .dropdown-menu .col-md-3 {
        margin-bottom: 1.5rem;
    }
}

/* Navigation Enhancement */
.navbar-nav .nav-link {
    position: relative;
}

.navbar-nav .nav-link i {
    transition: transform 0.3s ease;
}

.navbar-nav .dropdown:hover .nav-link i {
    transform: rotate(180deg);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .carousel {
        transition: none !important;
    }
    
    .carousel-item {
        transition: none !important;
    }
}
