/* Architectural Studio Website Styles - Storm Charcoal & Flare Red Theme */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2C3E50;
    --secondary-color: #E74C3C;
    --dark-charcoal: #1A252F;
    --light-charcoal: #34495E;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --medium-gray: #6C757D;
    --dark-gray: #343A40;
    --success: #28A745;
    --warning: #FFC107;
    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s ease;
    --shadow-light: 0 2px 10px rgba(44, 62, 80, 0.1);
    --shadow-medium: 0 5px 20px rgba(44, 62, 80, 0.15);
    --shadow-heavy: 0 10px 40px rgba(44, 62, 80, 0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--medium-gray);
    line-height: 1.7;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--light-charcoal);
}

/* Bootstrap 5 Overrides */
.btn {
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline-secondary {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    background-color: transparent;
}

.btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
}

/* Navigation */
.navbar {
    background-color: var(--white) !important;
    box-shadow: var(--shadow-light);
    padding: 1rem 0;
    transition: all var(--transition-fast);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.navbar-nav .nav-link {
    color: var(--primary-color) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    transition: all var(--transition-fast);
    position: relative;
}

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

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

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

.navbar-toggler {
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Custom Mobile Menu Toggle */
.mobile-menu-toggle {
    position: relative;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: all var(--transition-fast);
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-charcoal) 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
}

.hero .lead {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero .btn {
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* Section Styles */
.section {
    padding: 5rem 0;
}

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

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

/* Cards */
.card {
    border: none;
    border-radius: 0;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-fast);
    overflow: hidden;
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.card-img-top {
    transition: all var(--transition-slow);
    height: 250px;
    object-fit: cover;
}

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

.card-body {
    padding: 2rem;
}

.card-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Portfolio Grid */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    margin-bottom: 2rem;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: all var(--transition-slow);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(44, 62, 80, 0.9), rgba(231, 76, 60, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-fast);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay-content {
    text-align: center;
    color: var(--white);
    padding: 2rem;
}

.portfolio-overlay-content h4 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

/* Forms */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 0;
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
    background-color: var(--white);
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.25);
    background-color: var(--white);
}

.form-label {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-error {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-success {
    color: var(--success);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer h5 {
    color: var(--white);
    margin-bottom: 1.5rem;
    position: relative;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer p, .footer li {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.footer a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 2rem;
    text-align: center;
}

/* Social Media Icons */
.social-icons {
    list-style: none;
    display: flex;
    gap: 1rem;
    padding: 0;
}

.social-icons li {
    margin: 0;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.social-icons a:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transition: all 0.8s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    animation: fadeInUp 0.8s ease-out;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

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

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 1000;
    box-shadow: var(--shadow-medium);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .section {
        padding: 3rem 0;
    }
    
    .hero {
        text-align: center;
        padding: 2rem 0;
    }
    
    .navbar-nav {
        background-color: var(--white);
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 8px;
        box-shadow: var(--shadow-medium);
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .portfolio-overlay-content {
        padding: 1rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 576px) {
    .hero {
        min-height: 80vh;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .social-icons {
        justify-content: center;
    }
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.border-secondary {
    border-color: var(--secondary-color) !important;
}

/* Accessibility Improvements */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus Styles */
a:focus, button:focus, .btn:focus, .form-control:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --secondary-color: #FF0000;
        --medium-gray: #333333;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}