/* ==========================================
   Brooks Dog Training Academy - Custom Styles
   ========================================== */

/* ==========================================
   Root Variables - BDTA Brand Colors
   ========================================== */
:root {
    /* BDTA Official Brand Colors */
    --primary-color: #9a0073;        /* BDTA Purple */
    --primary-dark: #7a005a;         /* Darker Purple */
    --secondary-color: #0a9a9c;      /* BDTA Teal/Cyan */
    --accent-color: #a39f89;         /* BDTA Tan/Beige */
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --text-color: #374151;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* ==========================================
   Global Styles
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================
   Navigation
   ========================================== */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    color: var(--text-color) !important;
    position: relative;
}

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

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

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

/* ==========================================
   Buttons
   ========================================== */
.btn {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(10, 154, 156, 0.3);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero-section {
    position: relative;
    padding-top: 80px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    overflow: hidden;
}

.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--primary-color);
    top: -200px;
    right: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary-color);
    bottom: -100px;
    left: -50px;
}

.hero-image-wrapper {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.stat-item h3 {
    font-size: 2.5rem;
}

/* ==========================================
   Section Spacing
   ========================================== */
section {
    scroll-margin-top: 80px;
}

.homepage-section {
    background-color: #ffffff;
}

.homepage-section-alt {
    background-color: var(--light-color);
}

.homepage-section-shell {
    padding: 3rem 0;
}

.homepage-section-heading {
    max-width: 42rem;
    margin-right: auto;
    margin-left: auto;
}

/* ==========================================
   About Section
   ========================================== */
.about-image-wrapper {
    position: relative;
}

.about-image-wrapper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary-color);
    border-radius: var(--border-radius);
    z-index: -1;
}

.feature-icon {
    transition: var(--transition);
}

.feature-icon:hover {
    transform: scale(1.1);
}

/* ==========================================
   Service Cards
   ========================================== */
.service-card {
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

.service-icon {
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.hover-lift {
    transition: var(--transition);
}

/* ==========================================
   Testimonials
   ========================================== */
.testimonials .card {
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.testimonials .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

/* ==========================================
   Contact Section
   ========================================== */
.contact-info .contact-icon {
    transition: var(--transition);
}

.contact-info .contact-icon:hover {
    transform: scale(1.1);
}

.social-links a {
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.social-links .bdta-social-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
    background-color: currentColor;
}

.social-links .bdta-social-icon-bluesky {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.335 4.75c1.587 1.19 3.293 3.603 4.165 5.399.873-1.796 2.578-4.209 4.165-5.4 1.145-.858 3-1.522 3 1.117 0 .527-.302 4.432-.48 5.066-.618 2.203-2.87 2.764-4.873 2.422 3.501.598 4.392 2.578 2.468 4.559-3.653 3.762-5.25-.944-5.66-2.15-.075-.221-.11-.324-.12-.236-.01-.088-.046.015-.12.236-.41 1.206-2.007 5.912-5.66 2.15-1.924-1.98-1.033-3.96 2.469-4.559-2.004.342-4.256-.219-4.873-2.422-.178-.634-.48-4.539-.48-5.066 0-2.639 1.854-1.975 3-1.117Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.335 4.75c1.587 1.19 3.293 3.603 4.165 5.399.873-1.796 2.578-4.209 4.165-5.4 1.145-.858 3-1.522 3 1.117 0 .527-.302 4.432-.48 5.066-.618 2.203-2.87 2.764-4.873 2.422 3.501.598 4.392 2.578 2.468 4.559-3.653 3.762-5.25-.944-5.66-2.15-.075-.221-.11-.324-.12-.236-.01-.088-.046.015-.12.236-.41 1.206-2.007 5.912-5.66 2.15-1.924-1.98-1.033-3.96 2.469-4.559-2.004.342-4.256-.219-4.873-2.422-.178-.634-.48-4.539-.48-5.066 0-2.639 1.854-1.975 3-1.117Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

#contactForm .form-control,
#contactForm .form-select {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

#contactForm .form-control:focus,
#contactForm .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.1);
}

/* ==========================================
   Footer
   ========================================== */
footer a {
    transition: var(--transition);
}

footer a:hover {
    color: white !important;
    transform: translateX(5px);
}

/* ==========================================
   Back to Top Button
   ========================================== */
#backToTop {
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
}

#backToTop:not(.d-none) {
    opacity: 1;
}

#backToTop:hover {
    transform: translateY(-5px);
}

.circular-icon-button {
    height: 3.125rem;
    width: 3.125rem;
}

.circular-icon-button-sm {
    height: 2.5rem;
    width: 2.5rem;
}

.circular-icon-button-md {
    height: 2.8125rem;
    width: 2.8125rem;
}

.testimonial-avatar {
    height: 3.125rem;
    width: 3.125rem;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ==========================================
   Utility Classes
   ========================================== */
.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
}

.shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.rounded-4 {
    border-radius: var(--border-radius) !important;
}

/* Override Bootstrap's text-primary to use BDTA brand color */
.text-primary {
    color: var(--primary-color) !important;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 991.98px) {
    .navbar-nav .nav-link::after {
        display: none;
    }
    
    .navbar-nav .nav-item {
        text-align: center;
    }
    
    .navbar-nav .btn {
        margin-top: 1rem;
        display: inline-block;
    }
    
    .hero-section {
        padding-top: 100px;
    }
    
    .stat-item {
        text-align: center;
    }
}

@media (max-width: 767.98px) {
    html,
    body {
        overflow-x: clip;
    }

    main,
    .hero-section,
    .homepage-section,
    .homepage-section-alt,
    footer {
        overflow-x: clip;
    }

    [data-aos],
    [data-aos].aos-animate {
        opacity: 1 !important;
        transform: none !important;
        transition-property: none !important;
    }

    h1.display-3 {
        font-size: 2.5rem;
    }
    
    h2.display-5 {
        font-size: 2rem;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
}

@media (max-width: 575.98px) {
    .btn-lg {
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
    }
    
    .service-icon {
        width: 60px !important;
        height: 60px !important;
    }
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
    .navbar,
    #backToTop,
    .hero-shapes {
        display: none;
    }
}

/* ==========================================
   Accessibility
   ========================================== */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Success/Error Messages */
.alert-custom {
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.alert-success-custom {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error-custom {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ==========================================
   Dark Mode
   ========================================== */
[data-bs-theme="dark"] {
    --dark-color: #e5e7eb;
    --light-color: #1f2937;
    --text-color: #d1d5db;
}

[data-bs-theme="dark"] body {
    background-color: #0f172a;
    color: #e5e7eb;
}

[data-bs-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #1a1d23 0%, #0d1117 100%);
}

[data-bs-theme="dark"] .homepage-section {
    background-color: #0f172a;
}

[data-bs-theme="dark"] .homepage-section-alt {
    background-color: #111827;
}

[data-bs-theme="dark"] .navbar.bg-white {
    background-color: #1f2937 !important;
}

[data-bs-theme="dark"] .navbar-brand,
[data-bs-theme="dark"] .navbar-nav .nav-link,
[data-bs-theme="dark"] #darkModeLabel {
    color: #e5e7eb !important;
}

[data-bs-theme="dark"] .navbar-nav .nav-link:hover,
[data-bs-theme="dark"] .navbar-nav .nav-link.active {
    color: #f5d0fe !important;
}

[data-bs-theme="dark"] .btn-outline-secondary {
    border-color: #cbd5e1;
    color: #f8fafc;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover,
[data-bs-theme="dark"] .btn-outline-secondary:focus {
    background-color: #f8fafc;
    border-color: #f8fafc;
    color: #111827;
}

[data-bs-theme="dark"] .btn-outline-primary {
    border-color: #d8b4fe;
    color: #f5d0fe;
}

[data-bs-theme="dark"] .btn-outline-primary:hover,
[data-bs-theme="dark"] .btn-outline-primary:focus {
    background-color: #d946ef;
    border-color: #d946ef;
    color: #ffffff;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #111827 !important;
}

[data-bs-theme="dark"] .card {
    background-color: #1f2937;
    color: #e5e7eb;
}

[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] .lead.text-muted,
[data-bs-theme="dark"] .form-text,
[data-bs-theme="dark"] small.text-muted {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .about-image-wrapper::before {
    border-color: #d946ef;
}

[data-bs-theme="dark"] .contact-info .contact-icon,
[data-bs-theme="dark"] .feature-icon {
    background-color: rgba(217, 70, 239, 0.18) !important;
}

[data-bs-theme="dark"] .testimonial-avatar {
    background-color: rgba(217, 70, 239, 0.22) !important;
}

[data-bs-theme="dark"] .testimonial-avatar .text-primary {
    color: #f5d0fe !important;
}

[data-bs-theme="dark"] #contactForm .form-control,
[data-bs-theme="dark"] #contactForm .form-select {
    border-color: #374151;
}

[data-bs-theme="dark"] #contactForm .form-control,
[data-bs-theme="dark"] #contactForm .form-select,
[data-bs-theme="dark"] #contactForm textarea {
    background-color: #111827;
    color: #f8fafc;
}

[data-bs-theme="dark"] .alert-success-custom {
    background-color: #064e3b;
    color: #6ee7b7;
    border-color: #047857;
}

[data-bs-theme="dark"] .alert-error-custom {
    background-color: #7f1d1d;
    color: #fca5a5;
    border-color: #b91c1c;
}
