/* Main CSS for Backlinks Professionals */

/* Global Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

/* Sticky footer layout */
html, body {
    height: 100%;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* Utilities for page layouts */
.page-flex {
    display: flex;
    flex-direction: column;
}

.grow {
    flex: 1 0 auto;
}

.hero-fill {
    flex: 1 0 auto;
}

/* Make ALL images responsive site-wide */
img,
picture img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #0a58ca;
}

/* Header & Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Prevent margin-collapsing on primary sections so background reaches footer */
.bg-primary {
    display: flow-root; /* new BFC prevents child bottom-margin collapse */
    margin-bottom: 0 !important;
}

.nav-link {
    font-weight: 500;
}

.hero-section {
    background:
        linear-gradient(rgba(13, 110, 253, 0.9), rgba(13, 110, 253, 0.7)),
        image-set(
            url('../images/Image4.webp') type("image/webp"),
            url('../images/Image4.jpg') type("image/jpeg")
        );
    background-size: cover;
    background-position: center;
    padding: 6rem 0;
}

.page-header {
    background:
        linear-gradient(rgba(13, 110, 253, 0.9), rgba(13, 110, 253, 0.7)),
        image-set(
            url('../images/Image10.webp') type("image/webp"),
            url('../images/Image10.jpg') type("image/jpeg")
        );
    background-size: cover;
    background-position: center;
    padding: 4rem 0;
}

/* Feature Cards */
.feature-icon, .topic-icon, .contact-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Package Cards */
.package-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.package-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.package-price {
    color: var(--primary-color);
}

.package-features li {
    margin-bottom: 0.75rem;
}

.featured-package {
    border: 2px solid var(--primary-color);
    position: relative;
}

.ribbon {
    position: absolute;
    right: -5px;
    top: -5px;
    z-index: 1;
    overflow: hidden;
    width: 100px;
    height: 100px;
    text-align: right;
}

.ribbon span {
    font-size: 0.8rem;
    font-weight: bold;
    color: #fff;
    text-align: center;
    line-height: 30px;
    transform: rotate(45deg);
    width: 130px;
    display: block;
    background: var(--primary-color);
    box-shadow: 0 3px 10px -5px rgba(0, 0, 0, 1);
    position: absolute;
    top: 20px;
    right: -30px;
}

/* Blog Cards */
.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.featured-article {
    border: none;
    overflow: hidden;
}

.featured-article img {
    transition: transform 0.5s ease;
}

.featured-article:hover img {
    transform: scale(1.05);
}

/* Team Cards */
.team-card img {
    transition: transform 0.5s ease;
}

.team-card:hover img {
    transform: scale(1.05);
}

.social-icons a {
    transition: all 0.3s ease;
}

.social-icons a:hover {
    opacity: 0.8;
}

/* Comparison Table */
.comparison-table th, .comparison-table td {
    text-align: center;
    vertical-align: middle;
}

.comparison-table th:first-child, .comparison-table td:first-child {
    text-align: left;
}

/* Contact Form */
.map-container {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%;
    border-radius: 0.375rem;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    margin-top: auto; /* ensures footer sticks to bottom on short pages */
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Floating action buttons: Up, Down, WhatsApp */
.floating-actions {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fab-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(33,37,41,0.9); /* dark */
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    text-decoration: none;
}

.fab-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.25); }
.fab-btn i { pointer-events: none; }

.fab-whatsapp { background: #25D366; }

.fab-hidden { opacity: 0; pointer-events: none; }

@media (max-width: 575.98px) {
    .floating-actions { right: 12px; bottom: 12px; }
    .fab-btn { width: 44px; height: 44px; }
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .hero-section, .page-header {
        padding: 3rem 0;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Accessibility */
.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;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    a {
        text-decoration: underline;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
}
