/* ===================================
   Custom Styles - DevCraft Solutions
   Primary: Red (#dc3545)
   Secondary: White (#ffffff)
   Third: Black (#000000)
   =================================== */

:root {
    --primary-color: #dc3545;
    --primary-dark: #b02a37;
    --primary-light: #e4606d;
    --secondary-color: #ffffff;
    --third-color: #000000;
    --text-dark: #212529;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ===================================
   Navigation
   =================================== */

.navbar {
    background: var(--third-color);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.95);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color) !important;
    transition: var(--transition);
}

.navbar-brand:hover {
    color: var(--primary-color) !important;
}

.navbar-brand i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.nav-link {
    color: var(--secondary-color) !important;
    margin: 0 0.5rem;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* ===================================
   Hero Section
   =================================== */

.hero-section {
    background: linear-gradient(135deg, var(--third-color) 0%, #2c2c2c 100%);
    color: var(--secondary-color);
    padding: 150px 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-section h1 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-section .lead {
    color: #e0e0e0;
    font-size: 1.2rem;
    line-height: 1.6;
}

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(220, 53, 69, 0.3);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s backwards;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s backwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ===================================
   Buttons
   =================================== */

.btn-primary {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: var(--secondary-color);
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
    color: var(--secondary-color);
}

.btn-outline-light {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-outline-light:hover {
    background: var(--secondary-color);
    color: var(--third-color);
    transform: translateY(-2px);
}

/* ===================================
   Section Titles
   =================================== */

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--third-color);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* ===================================
   About Section
   =================================== */

#about {
    background: var(--secondary-color);
}

.stat-box {
    text-align: center;
    padding: 1rem;
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-5px);
}

.stat-box h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-box p {
    color: var(--text-light);
    margin: 0;
}

/* ===================================
   Services Section
   =================================== */

.service-card {
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    height: 100%;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--primary-dark);
    transform: scale(1.1) rotate(5deg);
}

.service-card h4 {
    color: var(--third-color);
    margin-bottom: 1rem;
    font-weight: bold;
}

.service-card p {
    color: var(--text-light);
    margin: 0;
}

/* ===================================
   Portfolio Section
   =================================== */

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 300px;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(220, 53, 69, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    padding: 2rem;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay h5 {
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.portfolio-overlay p {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* ===================================
   Team Section
   =================================== */

.team-card {
    background: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.team-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.team-card h5 {
    color: var(--third-color);
    font-weight: bold;
    margin: 1rem 0 0.5rem;
}

.team-card p {
    margin: 0 0 1rem;
}

.social-links {
    padding: 0 0 1.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    color: var(--third-color);
    border-radius: 50%;
    margin: 0 0.25rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-3px);
}

/* ===================================
   Testimonials Section
   =================================== */

.testimonial-card {
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
    height: 100%;
    border-left: 4px solid var(--primary-color);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.testimonial-rating {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.testimonial-card p {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.testimonial-author h6 {
    margin: 0;
    color: var(--third-color);
    font-weight: bold;
}

.testimonial-author small {
    color: var(--text-light);
}

/* ===================================
   Contact Section
   =================================== */

.contact-info {
    text-align: center;
    padding: 2rem;
    background: var(--secondary-color);
    border-radius: 10px;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 100%;
}

.contact-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.contact-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
}

.contact-info h5 {
    color: var(--third-color);
    font-weight: bold;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-light);
    margin: 0;
}

.contact-form {
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contact-form .form-control {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    transition: var(--transition);
}

.contact-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* ===================================
   Footer
   =================================== */

.footer {
    background: var(--third-color);
    color: var(--secondary-color);
    padding: 3rem 0 1rem;
}

.footer h5,
.footer h6 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: bold;
}

.footer p {
    color: #b0b0b0;
}

.footer .social-links a {
    background: #2c2c2c;
    color: var(--secondary-color);
}

.footer .social-links a:hover {
    background: var(--primary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a,
.footer-link {
    color: #b0b0b0;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover,
.footer-link:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.newsletter-form .form-control {
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 5px 0 0 5px;
}

.newsletter-form .btn {
    border-radius: 0 5px 5px 0;
}

.footer hr {
    border-color: #2c2c2c;
}

/* ===================================
   Scroll to Top Button
   =================================== */

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

.scroll-top.show {
    display: flex;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 992px) {
    .hero-section {
        padding: 120px 0 80px;
        text-align: center;
        min-height: auto;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .service-card,
    .portfolio-item,
    .team-card,
    .testimonial-card,
    .contact-info {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 100px 0 60px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .nav-link {
        margin: 0.5rem 0;
    }
    
    .nav-link::after {
        display: none;
    }
    
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .stat-box {
        margin-bottom: 1rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .footer .col-lg-4,
    .footer .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 90px 0 50px;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-section .lead {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    
    .team-card img {
        height: 200px;
    }
    
    .portfolio-item {
        height: 250px;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .testimonial-author img {
        width: 50px;
        height: 50px;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer h5,
    .footer h6 {
        font-size: 1.1rem;
    }
}

/* ===================================
   Utility Classes
   =================================== */

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* ===================================
   Mobile Optimization
   =================================== */

@media (max-width: 992px) {
    section {
        padding: 3rem 0 !important;
    }
    
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 768px) {
    section {
        padding: 2.5rem 0 !important;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .row > * {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Fix overflow issues on mobile */
body {
    overflow-x: hidden;
}

.navbar-collapse {
    background: var(--third-color);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
}

@media (min-width: 992px) {
    .navbar-collapse {
        background: transparent;
        padding: 0;
        margin-top: 0;
    }
}

/* ============================================
   CAPTCHA Styles
   ============================================ */
.captcha-container {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.captcha-image {
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    padding: 5px;
    background: white;
    display: inline-block;
}

.captcha-image img {
    display: block;
    border-radius: 2px;
}

.captcha-container input[type="text"] {
    max-width: 300px;
}

.captcha-container small {
    display: block;
    margin-top: 0.25rem;
}

@media (max-width: 576px) {
    .captcha-container {
        text-align: center;
    }
    
    .captcha-image {
        margin-bottom: 1rem;
    }
    
    .captcha-container input[type="text"] {
        max-width: 100%;
    }
}
