/* ============================================
   RR Aqua Systems - Custom Styles
   ============================================ */

: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;
    --transition: all 0.3s ease;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem; /* This is now less critical as the logo controls size */
    color: var(--primary-color) !important;
    /* Remove 'fw-bold' or 'text-primary' from the HTML class as they are for text */
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    color: #333 !important;
    transition: var(--transition);
    position: relative;
}

.navbar-logo {
    height: 40px;
    width: auto;
    margin: 0;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?auto=format&fit=crop&w=1920');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 110, 253, 0.85);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
}

.hero-content p {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.promo-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.hero-image img {
    max-height: 500px;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.3);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

.scroll-indicator a {
    font-size: 2rem;
    text-decoration: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s both;
}

.animate-fade-in-delay-3 {
    animation: fadeIn 1s ease-out 0.9s both;
}

.animate-slide-in {
    animation: slideInRight 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Feature Box */
.feature-box {
    padding: 1.5rem;
    border-radius: 10px;
    transition: var(--transition);
    height: 100%;
}

.feature-box:hover {
    background-color: var(--light-color);
    transform: translateY(-5px);
}

.feature-box i {
    display: block;
}

/* Product Cards */
.product-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .card-img-wrapper img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--danger-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 1;
}

/* Service Cards */
.service-card {
    background: white;
    border-radius: 15px;
    transition: var(--transition);
    border: 2px solid transparent;
}

.service-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: rotate(360deg) scale(1.1);
}

/* Contact Form */
.contact-info {
    padding: 2rem;
}

.contact-info i {
    display: block;
    margin-bottom: 1rem;
}

/* Form Styles */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca);
    border: none;
    transition: var(--transition);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0a58ca, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.4);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #103750, #3069a1) !important;
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color) !important;
    padding-left: 5px;
}

.social-links a {
    transition: var(--transition);
    display: inline-block;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.2);
    color: var(--primary-color) !important;
}

/* Back to Top Button */
#backToTop {
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#backToTop:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Responsive Design */

/* Tablet Styles (768px - 991px) */
@media (max-width: 991.98px) {
    .hero-section {
        background-attachment: scroll;
        min-height: auto;
        padding: 100px 0 50px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .display-5 {
        font-size: 2rem;
    }

    section {
        padding: 60px 0;
    }

    .card-img-wrapper {
        height: 200px;
    }
}

/* Mobile Styles (up to 767px) */
@media (max-width: 767.98px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .hero-section {
        padding: 80px 0 40px;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-content .lead {
        font-size: 1rem;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-image {
        margin-top: 2rem;
    }

    .hero-image img {
        max-height: 300px;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    section {
        padding: 40px 0;
    }

    .card-img-wrapper {
        height: 180px;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .contact-info {
        padding: 1rem;
        margin-bottom: 2rem;
    }

    .promo-badge .badge {
        font-size: 1rem !important;
        padding: 0.5rem 1rem !important;
    }

    #backToTop {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
    }

    footer .row > div {
        margin-bottom: 2rem;
    }
}

/* Small Mobile (up to 575px) */
@media (max-width: 575.98px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }

    .display-5 {
        font-size: 1.5rem;
    }

    .card-img-wrapper {
        height: 150px;
    }

    .product-card .card-body {
        padding: 1rem;
    }

    .service-card {
        padding: 1.5rem !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-section,
    #backToTop,
    footer {
        display: none;
    }

    section {
        page-break-inside: avoid;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error Messages */
.alert {
    border-radius: 10px;
    border: none;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a58ca;
}

