/* Custom Styles for A2Z Media */

/* Global Background Gradient */
body {
    background: linear-gradient(180deg, #e3f2fd 0%, #f5f5f5 50%, #e1f5fe 100%);
    min-height: 100vh;
    padding-top: 0; /* Remove any default padding */
    margin-top: 0; /* Remove any default margin */
}

/* Hero Section Button Hover Effects */
.btn-primary.btn-xl:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25,118,210,0.4) !important;
}

.btn-outline-primary.btn-xl:hover {
    background-color: #1976d2;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25,118,210,0.3);
}

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

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

.masthead h1 {
    animation: fadeInUp 0.8s ease-out;
}

.masthead p {
    animation: fadeInUp 0.8s ease-out 0.2s;
    animation-fill-mode: both;
}

.masthead .btn {
    animation: fadeInUp 0.8s ease-out 0.4s;
    animation-fill-mode: both;
}

/* Modern Navbar Styling */
#mainNav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0,0,0,.03);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,.05);
}

#mainNav .navbar-brand {
    color: #1565c0 !important;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

#mainNav .navbar-brand img {
    transition: transform 0.3s ease;
    margin-right: 0.75rem;
}

#mainNav .navbar-brand:hover img {
    transform: rotate(-5deg) scale(1.1);
}

#mainNav .navbar-nav {
    margin-left: auto;
}

#mainNav .navbar-nav .nav-item {
    margin: 0 0.25rem;
}

#mainNav .navbar-nav .nav-item .nav-link {
    color: #424242 !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 25px;
    letter-spacing: 0.3px;
}

#mainNav .navbar-nav .nav-item .nav-link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, #1565c0 0%, #42a5f5 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

#mainNav .navbar-nav .nav-item .nav-link:hover {
    color: #1565c0 !important;
    background: rgba(21, 101, 192, 0.08);
}

#mainNav .navbar-nav .nav-item .nav-link:hover::before {
    width: 30px;
}

#mainNav .navbar-nav .nav-item.active .nav-link {
    color: #1565c0 !important;
    background: rgba(21, 101, 192, 0.1);
}

#mainNav .navbar-toggler {
    border: none;
    background: rgba(21, 101, 192, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#mainNav .navbar-toggler:hover {
    background: rgba(21, 101, 192, 0.2);
}

#mainNav .navbar-toggler i {
    color: #1565c0;
    font-size: 1.25rem;
}

/* Navbar Shrink Effect */
#mainNav.navbar-shrink {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 30px rgba(0,0,0,.08);
    padding: 0.25rem 0;
}

#mainNav.navbar-shrink .navbar-brand {
    font-size: 1.3rem;
}

/* Service Card Animations */
.service-box {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    background: #ffffff;
    padding: 2.5rem 2rem;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03), 0 2px 8px rgba(0,0,0,0.02);
    border: 1px solid rgba(25,118,210,0.08);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.service-box::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(21,101,192,0.08) 0%, transparent 70%);
    opacity: 0;
    transition: all 0.6s ease;
    z-index: 1;
}

.service-box:hover::before {
    opacity: 1;
    top: -150%;
    left: -150%;
}

.service-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #1565c0 0%, #42a5f5 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-box:hover::after {
    transform: scaleX(1);
}

.service-box:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(21,101,192,0.12), 0 10px 20px rgba(21,101,192,0.08);
    border-color: rgba(21,101,192,0.15);
}

.service-box .icon-wrapper {
    width: 90px;
    height: 90px;
    background: #f5f9ff;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
    position: relative;
    z-index: 2;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(21,101,192,0.08);
}

.service-box:hover .icon-wrapper {
    background: linear-gradient(135deg, #1565c0 0%, #42a5f5 100%);
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 10px 30px rgba(21,101,192,0.25);
}

.service-box .icon-wrapper::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(21,101,192,0.1);
    border-radius: 24px;
    transform: scale(1.1);
    opacity: 0;
    transition: all 0.4s ease;
}

.service-box:hover .icon-wrapper::after {
    transform: scale(1.15);
    opacity: 1;
    border-color: rgba(255,255,255,0.3);
}

.service-box i {
    transition: all 0.4s ease;
    font-size: 2.25rem;
    color: #1976d2 !important;
    z-index: 2;
}

.service-box:hover i {
    color: #ffffff !important;
    transform: scale(1.1);
}

.service-box h3 {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.service-box:hover h3 {
    color: #1565c0 !important;
}

.service-box p {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.service-box:hover p {
    color: #424242 !important;
}

/* Section Scroll Animations */
.animate-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Portfolio Hover Effects */
.portfolio-box {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.portfolio-box:hover {
    box-shadow: 0 10px 30px rgba(25,118,210,0.2);
}

.portfolio-box img {
    transition: all 0.5s ease;
}

.portfolio-box:hover img {
    transform: scale(1.1);
}

.portfolio-box-caption {
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(21,101,192,0.9) 0%, rgba(25,118,210,0.9) 100%);
}

/* Contact Icon Animations */
.contact-icon {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Gradient Text Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-text {
    background: linear-gradient(135deg, #1565c0 0%, #42a5f5 50%, #1976d2 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

.gradient-text-animated {
    background: linear-gradient(135deg, #1565c0 0%, #42a5f5 50%, #1976d2 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

/* Hero Section Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Hero Button Hover Effects */
.hero-btn-primary:hover .btn-shine {
    left: 100% !important;
}

.hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(21,101,192,0.4) !important;
}

.hero-btn-secondary:hover {
    background-color: #1976d2 !important;
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(25,118,210,0.3) !important;
}

/* Badge Animation */
.badge-modern {
    transition: all 0.3s ease;
}

.badge-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Stat Number Animation */
.stat-number {
    display: inline-block;
    animation: countUp 2s ease-out;
}

/* Feature Item Hover */
.feature-item {
    transition: all 0.3s ease;
    cursor: default;
}

.feature-item:hover {
    transform: translateX(5px);
}

.feature-item:hover i {
    transform: scale(1.2);
}

/* Particle Animations */
.particle {
    pointer-events: none;
    will-change: transform;
}

/* Center hero content */
.masthead .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    padding: 0 15px;
    padding-bottom: 3rem; /* Slight bottom padding to visually balance */
}

/* Hero Section Responsive Typography */
@media (max-width: 768px) {
    .masthead {
        margin-top: 70px; /* Smaller navbar on mobile */
        padding-top: 0; /* No padding on mobile */
    }
    
    .masthead .container {
        min-height: calc(100vh - 70px);
    }
    
    .hero-title span:first-child {
        font-size: 1.5rem !important;
    }
    
    .gradient-text-animated {
        font-size: 2.25rem !important;
    }
    
    .hero-description {
        font-size: 1.05rem !important;
    }
    
    .hero-stats {
        gap: 2rem !important;
    }
    
    .stat-number {
        font-size: 1.5rem !important;
    }
    
    .hero-features {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btn-primary,
    .hero-btn-secondary {
        padding: 0.8rem 2rem !important;
        font-size: 0.95rem !important;
    }
}

/* Floating Animation for Decorative Elements */
@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    33% {
        transform: translate(30px, -30px);
    }
    66% {
        transform: translate(-20px, 20px);
    }
}

.float-element {
    animation: float 6s ease-in-out infinite;
}

/* Number Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Animation for Sections */
.section-loading {
    position: relative;
    overflow: hidden;
}

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

.section-loading:hover::before {
    left: 100%;
}

/* Button Ripple Effect */
.btn {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Initial Hero Opacity for Smooth Load */
.masthead {
    opacity: 0;
    transition: opacity 1s ease;
}

/* Hero Section Specific Styles */
.masthead {
    min-height: calc(100vh - 80px); /* Subtract navbar height */
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 50%, #bbdefb 100%) !important;
    margin-top: 80px; /* Push content below navbar */
    padding-top: 0; /* No additional padding */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Section Backgrounds */
#about {
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%) !important;
    position: relative;
    overflow: hidden;
}

#about::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

#services {
    background: linear-gradient(180deg, #f5f5f5 0%, #e1f5fe 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

#services::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(66,165,245,0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

#services::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(21,101,192,0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

#services .section-heading {
    color: #1565c0;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

#services hr.my-4 {
    background: linear-gradient(90deg, transparent 0%, #1976d2 50%, transparent 100%);
    height: 3px;
    border: none;
    margin: 2rem auto 3rem;
}

#clients {
    background: linear-gradient(180deg, #e1f5fe 0%, #ffffff 100%);
    padding: 4rem 0;
}

#clients .section-heading {
    color: #1565c0;
    margin-bottom: 2rem;
}

#contact {
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
    padding: 5rem 0;
}

#contact .section-heading {
    color: #1565c0;
}

/* Service Icons Color */
.service-box i {
    color: #1976d2 !important;
}

.service-box h3 {
    color: #1565c0;
    font-weight: 600;
}

.service-box p {
    color: #616161;
}

/* Contact Icons */
.contact-icon {
    color: #1976d2 !important;
}

/* Text Color Adjustments */
#contact p {
    color: #424242;
    font-weight: 500;
}

/* Email Link Color */
#contact a {
    color: #1976d2 !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

#contact a:hover {
    color: #1565c0 !important;
    text-decoration: underline;
}

/* Override Bootstrap Primary Color */
a {
    color: #1976d2;
}

a:hover {
    color: #1565c0 !important;
    text-decoration: underline;
}

/* Fix for navbar when scrolled */
#mainNav.navbar-shrink {
    background-color: rgba(255, 255, 255, 0.98) !important;
}

#mainNav.navbar-shrink .navbar-brand,
#mainNav.navbar-shrink .navbar-nav .nav-item .nav-link {
    color: #212529 !important;
}

#mainNav.navbar-shrink .navbar-nav .nav-item .nav-link:hover {
    color: #1976d2 !important;
}

/* Override Bootstrap's primary background */
.bg-primary {
    background-color: #1976d2 !important;
}

/* Portfolio Box Caption Override */
.portfolio-box-caption-content .project-category,
.portfolio-box-caption-content .project-name {
    color: #ffffff !important;
}

/* HR Styling */
hr.my-4 {
    border-color: #1976d2;
    width: 50px;
    border-width: 3px;
}

hr.light {
    border-color: rgba(255, 255, 255, 0.5);
}

/* Wave Dividers */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 50px;
}

.wave-divider .shape-fill {
    fill: #FFFFFF;
}

/* CTA Button in Navbar */
.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(21,101,192,0.4) !important;
}

/* Mobile Menu Enhancements */
@media (max-width: 991px) {
    #mainNav .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        border-radius: 15px;
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        backdrop-filter: blur(20px);
    }
    
    #mainNav .navbar-nav .nav-item {
        margin: 0.25rem 0;
    }
    
    #mainNav .navbar-nav .nav-item .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 10px;
    }
    
    #mainNav .navbar-nav .nav-item .nav-link:hover {
        background: rgba(21, 101, 192, 0.1);
        padding-left: 1.5rem;
    }
    
    .nav-cta {
        display: inline-block;
        margin-top: 1rem;
        width: 100%;
        text-align: center;
    }
}

/* Service Cards Grid Enhancement */
#services .container > .row:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

#services .col-md-6.col-lg-3 {
    flex: 0 0 calc(25% - 1.5rem);
    max-width: calc(25% - 1.5rem);
}

@media (max-width: 991px) {
    #services .col-md-6.col-lg-3 {
        flex: 0 0 calc(50% - 1rem);
        max-width: calc(50% - 1rem);
    }
}

@media (max-width: 576px) {
    #services .col-md-6.col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #mainNav .navbar-brand {
        font-size: 1.2rem;
    }
    
    #mainNav .navbar-brand img {
        width: 2.5rem;
    }
    
    .masthead h1 {
        font-size: 2rem;
    }
    
    .service-box {
        margin-bottom: 0;
        padding: 2rem 1.5rem;
    }
    
    .service-box .icon-wrapper {
        width: 70px;
        height: 70px;
        margin-bottom: 1.25rem;
    }
    
    .service-box i {
        font-size: 1.75rem;
    }
    
    .service-box h3 {
        font-size: 1.1rem !important;
    }
    
    .service-box p {
        font-size: 0.9rem !important;
    }
    
    .float-element {
        display: none;
    }
    
    body {
        background: linear-gradient(180deg, #e3f2fd 0%, #ffffff 100%);
    }
}