/* Portfolio Page Styles */

/* Hero Section */
.portfolio-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.portfolio-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

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

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Portfolio Showcase */
.hero-visual {
    position: relative;
    padding: 2rem 0;
}

.portfolio-showcase {
    position: relative;
    transform: perspective(1000px) rotateY(-15deg) rotateX(10deg);
    transition: transform 0.3s ease;
}

.portfolio-showcase:hover {
    transform: perspective(1000px) rotateY(-10deg) rotateX(5deg);
}

.showcase-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
    height: 300px;
}

.showcase-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.showcase-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.showcase-item.featured {
    grid-row: 1 / 3;
}

.showcase-image {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.showcase-item:not(.featured) .showcase-image {
    font-size: 2rem;
}

.showcase-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1.5rem;
}

.showcase-category {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
    display: block;
}

.showcase-overlay h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* Floating Metrics */
.floating-metrics {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.metric-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    color: #333;
    animation: float 3s ease-in-out infinite;
}

.metric-1 {
    top: 20%;
    right: -20px;
    animation-delay: 0s;
}

.metric-2 {
    top: 60%;
    left: -30px;
    animation-delay: -1s;
}

.metric-3 {
    bottom: 20%;
    right: 10px;
    animation-delay: -2s;
}

.metric-badge i {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #dc3545, #6366f1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 1rem;
    font-size: 1rem;
}

.metric-content strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
}

.metric-content span {
    font-size: 0.8rem;
    color: #6c757d;
}

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

/* Portfolio Filter Section */
.portfolio-filter {
    padding: 5rem 0;
}

.section-badge {
    display: inline-block;
    background: linear-gradient(45deg, #dc3545, #6366f1);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.filter-btn {
    background: white;
    border: 2px solid #e9ecef;
    color: #6c757d;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(45deg, #dc3545, #6366f1);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(220, 53, 69, 0.3);
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.portfolio-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-card:hover .portfolio-img {
    transform: scale(1.08);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.image-placeholder i {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Pattern overlay for visual interest */
.pattern-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.15;
    z-index: 1;
}

/* Real Estate - Blue/Purple gradient with geometric pattern */
.real-estate-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #6B73FF 100%);
}

.real-estate-gradient .pattern-overlay {
    background-image: 
        linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.1) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.1) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.1) 75%);
    background-size: 40px 40px;
    background-position: 0 0, 0 20px, 20px -20px, -20px 0px;
}

/* Real Estate Alt - Teal gradient with circles */
.real-estate-alt-gradient {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.real-estate-alt-gradient .pattern-overlay {
    background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.3) 0%, transparent 20%),
                      radial-gradient(circle at 80% 70%, rgba(255,255,255,0.2) 0%, transparent 25%),
                      radial-gradient(circle at 50% 50%, rgba(255,255,255,0.1) 0%, transparent 40%);
}

/* Home Decor - Warm coral/orange gradient with wave pattern */
.home-decor-gradient {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #f093fb 100%);
}

.home-decor-gradient .pattern-overlay {
    background-image: 
        radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.4) 0%, transparent 30%),
        radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.3) 0%, transparent 35%),
        linear-gradient(180deg, transparent 40%, rgba(255,255,255,0.1) 100%);
}

/* Professional Services - Deep blue/teal gradient with diagonal lines */
.professional-gradient {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.professional-gradient .pattern-overlay {
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.1) 10px,
        rgba(255,255,255,0.1) 20px
    );
}

/* Web Design - Vibrant purple/pink gradient with dots */
.web-design-gradient {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #f43f5e 100%);
}

.web-design-gradient .pattern-overlay {
    background-image: radial-gradient(rgba(255,255,255,0.2) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Social Media - Gradient with Instagram-like colors and abstract shapes */
.social-media-gradient {
    background: linear-gradient(135deg, #f9ce34 0%, #ee2a7b 50%, #6228d7 100%);
}

.social-media-gradient .pattern-overlay {
    background-image: 
        radial-gradient(circle at 30% 20%, rgba(255,255,255,0.3) 0%, transparent 15%),
        radial-gradient(circle at 70% 80%, rgba(255,255,255,0.25) 0%, transparent 20%),
        radial-gradient(circle at 90% 30%, rgba(255,255,255,0.2) 0%, transparent 10%),
        radial-gradient(circle at 10% 70%, rgba(255,255,255,0.15) 0%, transparent 12%);
}

/* Hover effect for image placeholders */
.portfolio-card:hover .image-placeholder {
    transform: scale(1.05);
    transition: transform 0.4s ease;
}

.portfolio-card:hover .image-placeholder i {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.view-project-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
}

.view-project-btn:hover {
    background: white;
    color: #333;
}

.portfolio-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-category {
    color: #dc3545;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.portfolio-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.portfolio-description {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.portfolio-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.metric {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.metric i {
    margin-right: 0.5rem;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tag {
    background: #f8f9fa;
    color: #6c757d;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Testimonials Section */
.portfolio-testimonials {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 5rem 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.stars {
    color: #ffc107;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.testimonial-content blockquote {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #495057;
    font-style: italic;
    margin: 0;
    position: relative;
    padding-left: 1.5rem;
}

.testimonial-content blockquote::before {
    content: '"';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 2rem;
    color: #dc3545;
    line-height: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #dc3545, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.author-info h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.author-info p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    text-align: center;
    padding: 5rem 0;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
}

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

.cta-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions .btn {
    margin: 0.5rem;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
}

/* Responsive Design */

/* Large Screens and Tablets */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    .cta-title {
        font-size: 2.25rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
    }
    
    .floating-metrics {
        opacity: 0.8;
    }
}

/* Tablets */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Make floating elements responsive */
    .floating-metrics {
        position: relative;
        display: none;
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

/* Mobile Landscape and Small Tablets */
@media (max-width: 768px) {
    .portfolio-hero {
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .section-title {
        font-size: 1.875rem;
    }
    
    .cta-title {
        font-size: 1.875rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }
    
    .cta-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
    
    .stat-item {
        margin-bottom: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .portfolio-showcase {
        transform: none;
        margin-top: 2rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
        touch-action: manipulation;
    }
    
    .portfolio-card {
        touch-action: manipulation;
    }
    
    .portfolio-card:active {
        transform: scale(0.98);
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-content {
        padding: 1.5rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
        touch-action: manipulation;
    }
    
    .testimonial-card:active {
        transform: scale(0.98);
    }
    
    .cta-actions .btn {
        width: 100%;
        margin-bottom: 0.75rem;
        touch-action: manipulation;
    }
    
    /* Prevent zoom on inputs */
    input, textarea, select, button {
        font-size: 16px;
    }
    
    /* Better touch targets */
    .btn {
        min-height: 44px;
        padding: 12px 20px;
    }
    
    .view-project-btn {
        min-height: 44px;
        padding: 12px 20px;
    }
}

/* Mobile Portrait */
@media (max-width: 576px) {
    .portfolio-hero {
        min-height: 60vh;
        padding: 1.5rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
    }
    
    .section-title {
        font-size: 1.75rem;
        line-height: 1.1;
    }
    
    .cta-title {
        font-size: 1.75rem;
        line-height: 1.1;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .portfolio-content {
        padding: 1.25rem;
    }
    
    .testimonial-card {
        padding: 1.25rem;
    }
    
    .btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .showcase-grid {
        height: 250px;
    }
    
    .image-placeholder {
        font-size: 2rem;
    }
    
    .showcase-item.featured .image-placeholder {
        font-size: 2.5rem;
    }
    
    .section-spacing {
        padding: 3rem 0;
    }
}

/* Extra Small Mobile */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    .portfolio-content {
        padding: 1rem;
    }
    
    .testimonial-card {
        padding: 1rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .hero-badge,
    .section-badge {
        padding: 4px 12px;
        font-size: 0.7rem;
    }
    
    .showcase-grid {
        height: 200px;
        gap: 0.5rem;
    }
}

/* Touch Improvements */
@media (max-width: 768px) {
    .btn:active {
        transform: scale(0.95);
    }
    
    .btn:focus {
        outline: 3px solid rgba(220, 53, 69, 0.5);
        outline-offset: 2px;
    }
    
    .portfolio-card:focus,
    .testimonial-card:focus {
        outline: 2px solid rgba(220, 53, 69, 0.5);
        outline-offset: 2px;
    }
    
    .filter-btn:focus {
        outline: 2px solid rgba(220, 53, 69, 0.5);
        outline-offset: 2px;
    }
    
    /* Better scrolling for portfolio grid */
    .portfolio-grid {
        padding-bottom: 1rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .image-placeholder {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .floating-metrics * {
        animation: none !important;
    }
    
    .portfolio-showcase {
        transform: none;
    }
    
    .portfolio-showcase:hover {
        transform: none;
    }
    
    .portfolio-card:hover,
    .testimonial-card:hover {
        transform: none;
    }
    
    .filter-btn:hover {
        transform: none;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .portfolio-hero {
        min-height: 90vh;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .section-spacing {
        padding: 2rem 0;
    }
}

/* Print Styles */
@media print {
    .floating-metrics,
    .portfolio-overlay {
        display: none;
    }
    
    .portfolio-hero,
    .cta-section {
        background: white !important;
        color: black !important;
    }
    
    .portfolio-card,
    .testimonial-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .btn {
        background: transparent !important;
        color: black !important;
        border: 1px solid black !important;
    }
}
