/*!
 * Custom Bootstrap Overrides
 * This file contains custom styles that override Bootstrap defaults
 * Organized by Bootstrap component categories
 */

/* ===================================
   BOOTSTRAP CORE OVERRIDES
   =================================== */

/* Grid System Customizations */
.container {
    max-width: 1200px;
}

/* Fix 3-column layout for portfolio and skills */
@media (min-width: 768px) {
    /* Ensure Bootstrap grid works properly */
    .row::after {
        content: "" !important;
        display: table !important;
        clear: both !important;
    }
    
    /* Force proper column widths */
    .col-md-4 {
        float: left !important;
        width: 33.33333333% !important;
        padding: 0 15px !important;
    }
    
    /* Remove any conflicting positioning */
    #portfolio .portfolio-item {
        right: auto !important;
    }
}

.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

/* ===================================
   TYPOGRAPHY OVERRIDES
   =================================== */

/* Headings */
h1, .h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

h2, .h2 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
}

h3, .h3 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.4;
}

h4, .h4 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
}

h5, .h5 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.5;
}

h6, .h6 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
}

/* Paragraphs */
p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.6;
}

/* ===================================
   BUTTON OVERRIDES
   =================================== */

/* Primary Button */

/* ===================================
   ACCESSIBILITY IMPROVEMENTS
   =================================== */

/* Focus indicators for keyboard navigation */
.deliverable-tile:focus {
    outline: 3px solid #EA715E !important;
    outline-offset: 2px !important;
    transform: scale(1.02) !important;
    box-shadow: 0 4px 15px rgba(234, 113, 94, 0.3) !important;
}

.deliverable-tile:focus-visible {
    outline: 3px solid #EA715E !important;
    outline-offset: 2px !important;
}

/* Ensure focus indicators work across browsers */
.deliverable-tile:focus:not(:focus-visible) {
    outline: none !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .deliverable-tile:focus {
        outline: 4px solid #000000 !important;
        outline-offset: 3px !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .deliverable-tile {
        transition: none !important;
    }
    
    .deliverable-tile:hover,
    .deliverable-tile:focus {
        transform: none !important;
    }
}

/* ===================================
   IMAGE INTERACTION ENHANCEMENTS
   =================================== */

/* Hover effects for clickable images */
.main-project-image:hover ~ div[style*="margin-top: 10px"],
.main-project-image:hover ~ div[style*="margin-top: 8px"] {
    opacity: 1 !important;
}

/* Alternative hover effect for images with different positioning */
.main-project-image:hover + div[style*="margin-top: 10px"],
.main-project-image:hover + div[style*="margin-top: 8px"] {
    opacity: 1 !important;
}

/* Enhanced click indicators */
.main-project-image:hover + div[style*="top: -10px"] span,
.main-project-image:hover + div[style*="top: -5px"] span {
    animation: pulse 1.5s infinite;
}

.main-project-image:hover ~ div[style*="top: -10px"] span,
.main-project-image:hover ~ div[style*="top: -5px"] span {
    animation: pulse 1.5s infinite;
}

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

/* Ensure click indicators are always visible but subtle */
div[style*="top: -10px"],
div[style*="top: -5px"] {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

div[style*="top: -10px"]:hover,
div[style*="top: -5px"]:hover {
    opacity: 1;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    div[style*="top: -10px"],
    div[style*="top: -5px"] {
        width: 25px !important;
        height: 25px !important;
        font-size: 12px !important;
    }
    
    div[style*="bottom: -40px"],
    div[style*="bottom: -35px"] {
        font-size: 10px !important;
        padding: 4px 8px !important;
    }
}

/* ===================================
   CLICKABLE IMAGE INDICATORS
   =================================== */

/* Add eye icon to clickable images using CSS */
.main-project-image {
    position: relative;
}

.main-project-image::after {
    content: "👁";
    position: absolute;
    top: 5px;
    right: 5px;
    background: #EA715E;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.main-project-image:hover::after {
    opacity: 1;
    animation: pulse 1.5s infinite;
}

/* Responsive adjustments for eye icons */
@media (max-width: 768px) {
    .main-project-image::after {
        width: 20px;
        height: 20px;
        font-size: 12px;
        top: 3px;
        right: 3px;
    }
}
.btn-primary {
    color: #fff;
    background-color: #007acc;
    border-color: #007acc;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    color: #fff;
    background-color: #005a99;
    border-color: #005a99;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary:focus,
.btn-primary.focus {
    color: #fff;
    background-color: #005a99;
    border-color: #005a99;
    box-shadow: 0 0 0 0.2rem rgba(0, 122, 204, 0.25);
}

.btn-primary:active,
.btn-primary.active {
    color: #fff;
    background-color: #004d80;
    border-color: #004d80;
}

/* Secondary Button */
.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    color: #fff;
    background-color: #545b62;
    border-color: #545b62;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Button Sizes */
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
    border-radius: 0.375rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

/* ===================================
   FORM OVERRIDES
   =================================== */

/* Form Controls */
.form-control {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #007acc;
    box-shadow: 0 0 0 0.2rem rgba(0, 122, 204, 0.25);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #e9ecef;
    opacity: 1;
}

/* Form Labels */
.form-label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

/* Form Validation */
.form-control.is-valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.94-.94 3.03-3.03L8 4.77 6.27 6.5 3.24 9.53l-.94-.94L2.3 6.73z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4m0-1.4L5.8 6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* ===================================
   NAVIGATION OVERRIDES
   =================================== */

/* Navbar */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #007acc;
}

.navbar-nav .nav-link.active {
    color: #007acc;
    font-weight: 700;
}

/* ===================================
   CARD OVERRIDES
   =================================== */

/* Card Component */
.card {
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

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

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background-color: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.125);
    padding: 0.75rem 1.25rem;
}

/* ===================================
   ALERT OVERRIDES
   =================================== */

/* Alert Components */
.alert {
    border: 1px solid transparent;
    border-radius: 0.375rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.alert-primary {
    color: #084298;
    background-color: #cff4fc;
    border-color: #b6effb;
}

.alert-secondary {
    color: #41464b;
    background-color: #e2e3e5;
    border-color: #d3d6d8;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.alert-info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}

/* ===================================
   BADGE OVERRIDES
   =================================== */

/* Badge Components */
.badge {
    font-size: 0.75em;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 0.375rem;
}

.badge-primary {
    color: #fff;
    background-color: #007acc;
}

.badge-secondary {
    color: #fff;
    background-color: #6c757d;
}

.badge-success {
    color: #fff;
    background-color: #198754;
}

.badge-danger {
    color: #fff;
    background-color: #dc3545;
}

.badge-warning {
    color: #000;
    background-color: #ffc107;
}

.badge-info {
    color: #000;
    background-color: #0dcaf0;
}

/* ===================================
   UTILITY CLASSES
   =================================== */

/* Spacing Utilities */
.mt-6 {
    margin-top: 4rem;
}

.mb-6 {
    margin-bottom: 4rem;
}

.pt-6 {
    padding-top: 4rem;
}

.pb-6 {
    padding-bottom: 4rem;
}

/* Text Utilities */
.text-primary {
    color: #007acc !important;
}

.text-secondary {
    color: #6c757d !important;
}

.text-success {
    color: #198754 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #0dcaf0 !important;
}

/* Background Utilities */
.bg-primary {
    background-color: #007acc !important;
}

.bg-secondary {
    background-color: #6c757d !important;
}

.bg-success {
    background-color: #198754 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
}

.bg-info {
    background-color: #0dcaf0 !important;
}

/* ===================================
   RESPONSIVE UTILITIES
   =================================== */

/* Custom responsive breakpoints */
@media (max-width: 575.98px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    h1, .h1 {
        font-size: 2rem;
    }
    
    h2, .h2 {
        font-size: 1.75rem;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* ===================================
   ANIMATION UTILITIES
   =================================== */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    .btn,
    .navbar,
    .footer {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
        width: 100% !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    p, blockquote {
        orphans: 3;
        widows: 3;
    }
}
