/* Universal CSS Styles for Meistars365 */

/* CSS Variables for consistent color usage */
:root {
    --primary-orange: #f6860a;
    --primary-brown: #b98f00;
    --primary-green: #799100;
    --primary-dark-green: #288c0d;
    --primary-teal: #00813d;
    --primary-dark-teal: #00755f;
    --secondary-brown: #926643;
    --light-cream: #ffeacf;
    --dark-teal: #005247;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #f6860a 0%, #b98f00 25%, #799100 50%, #288c0d 75%, #00813d 100%);
    --gradient-secondary: linear-gradient(135deg, #f6860a 0%, #926643 50%, #005247 100%);
    --gradient-button: linear-gradient(135deg, #f6860a 0%, #b98f00 100%);
    --gradient-card: linear-gradient(135deg, #ffeacf 0%, #ffffff 100%);
    
    /* Shadows */
    --shadow-light: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 24px rgba(0,0,0,0.2);
    
    /* Border radius */
    --radius-small: 5px;
    --radius-medium: 10px;
    --radius-large: 20px;
    --radius-circle: 50%;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: 
        linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)),
        url('images/doodle.png');
    background-repeat: repeat;
    background-size: auto;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%; /* Prevents font scaling on iOS */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure proper viewport handling */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Header and Navigation */
.header-nav {
    background: var(--gradient-primary);
    padding: 15px 20px;
    box-shadow: var(--shadow-medium);
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Ensure header stays above content on mobile */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.header-nav div {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
    outline: none;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

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

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

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

.nav-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-small);
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-menu b a {
    font-size: 1.2em;
    font-weight: bold;
    color: white;
}

.header-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-small);
    transition: all 0.3s ease;
    font-weight: 500;
}

.header-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.header-nav b a {
    font-size: 1.2em;
    font-weight: bold;
    color: white;
}

hr {
    border: none;
    height: 2px;
    background: var(--gradient-secondary);
    margin: 0;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Contractor Profile Layout */
.contractor-profile-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.profile-section {
    position: sticky;
    top: 100px;
}

.content-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Profile Header */
.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
}

.contractor-name {
    margin: 0 0 5px 0;
    color: var(--dark-teal);
    font-size: 1.8em;
    font-weight: 600;
}

.business-type {
    margin: 0;
    color: #666;
    font-size: 16px;
    font-weight: 500;
}

.location, .phone {
    margin: 5px 0 0 0;
    color: #888;
    font-size: 14px;
}

.phone-link {
    color: var(--primary-teal);
    text-decoration: none;
    font-weight: 500;
}

.phone-link:hover {
    text-decoration: underline;
}

/* Info Sections */
.info-section {
    margin-bottom: 25px;
}

.section-title {
    margin: 0 0 15px 0;
    color: var(--dark-teal);
    font-size: 1.2em;
    font-weight: 600;
}

.section-content {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

.pricing {
    font-weight: 600;
    color: var(--primary-orange);
    font-size: 1.1em;
}

/* Tags */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: white;
}

.tag-category {
    background: var(--primary-green);
}

.tag-language {
    background: var(--primary-teal);
}

/* Info Grid */
.info-grid {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-item strong {
    color: var(--dark-teal);
}

/* Search and Filter */
.search-container {
    background: white;
    padding: 20px;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-light);
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
}

.search-info {
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--light-cream);
    border-radius: var(--radius-small);
    border-left: 3px solid var(--primary-orange);
}

.search-info small {
    color: var(--dark-teal);
    font-weight: 500;
}

/* Order Card Specific */
.order-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-medium);
    padding: 20px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-orange);
}

.order-title {
    margin: 0 0 15px 0;
    color: var(--dark-teal);
    font-size: 1.2em;
    font-weight: 600;
}

.order-title a {
    color: var(--primary-orange);
    text-decoration: none;
    transition: color 0.3s ease;
}

.order-title a:hover {
    color: var(--primary-brown);
}

.order-description {
    margin: 0 0 15px 0;
    color: #555;
    line-height: 1.5;
}

.order-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Contractor Card Specific */
.contractor-card {
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-medium);
    padding: 20px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.contractor-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    background: white;
}

.contractor-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.contractor-info {
    margin-bottom: 15px;
}

.contractor-info p {
    margin: 0 0 8px 0;
    color: #555;
    font-size: 14px;
}

/* Services List - CRM Style Table */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.category-section {
    background: white;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.category-header {
    background: #f8f9fa;
    color: #333;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.category-title {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    color: #333;
}

.contractor-count {
    background: #e9ecef;
    color: #666;
    padding: 6px 12px;
    border-radius: var(--radius-small);
    font-size: 14px;
    font-weight: 500;
}

.contractors-table {
    overflow-x: auto;
}

.table-header {
    display: grid;
    grid-template-columns: 2.5fr 1.5fr 1.5fr 1fr 1.5fr 1.5fr 1fr;
    gap: 15px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    min-width: 800px;
}

.table-row {
    display: grid;
    grid-template-columns: 2.5fr 1.5fr 1.5fr 1fr 1.5fr 1.5fr 1fr;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    transition: background-color 0.2s ease;
    min-width: 800px;
    min-height: 60px;
}

.table-row:hover {
    background-color: #f8f9fa;
}

.table-row:last-child {
    border-bottom: none;
}

.table-cell {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
    min-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-cell {
    font-weight: 600;
    color: #333;
}

.profile-cell {
    display: flex;
    align-items: center;
    min-width: 0;
}

.contractor-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.contractor-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    max-width: 250px;
}

.contractor-name a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}

.contractor-name a:hover {
    color: #666;
    text-decoration: underline;
}

.phone-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.phone-link:hover {
    text-decoration: underline;
}

.card-payment-badge {
    margin-left: 8px;
    font-size: 14px;
    color: #666;
    flex-shrink: 0;
}

.actions-cell {
    justify-content: center;
    flex-shrink: 0;
    min-width: 100px;
}

.actions-cell .btn {
    padding: 6px 12px;
    font-size: 12px;
    min-width: auto;
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    box-shadow: none;
    white-space: nowrap;
}

.actions-cell .btn:hover {
    background: #e9ecef;
    color: #333;
    transform: none;
    box-shadow: none;
}

/* Universal Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--gradient-button);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-small);
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    text-align: center;
    min-width: 120px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    background: linear-gradient(135deg, #e67700 0%, #a88000 100%);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--gradient-secondary);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e67700 0%, #7a5a3a 100%);
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
    min-width: 80px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
    min-width: 160px;
}

/* Card Styles */
.card {
    background: white;
    border-radius: var(--radius-medium);
    padding: 25px;
    box-shadow: var(--shadow-light);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-cream);
}

.card-title {
    margin: 0;
    color: var(--dark-teal);
    font-size: 1.4em;
    font-weight: 600;
}

.card-badge {
    background: var(--gradient-button);
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius-large);
    font-size: 12px;
    font-weight: 500;
}

/* Profile Picture Styles */
.profile-picture {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-circle);
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-light);
}

.profile-picture-small {
    width: 60px;
    height: 60px;
}

.profile-picture-large {
    width: 150px;
    height: 150px;
}

.profile-placeholder {
    background: var(--light-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--secondary-brown);
    font-weight: bold;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-small);
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: var(--primary-green);
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: var(--primary-orange);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: var(--primary-teal);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        padding: 15px;
    }
    
    .header-nav {
        padding: 10px 15px;
    }
    
    .header-nav div {
        justify-content: space-between;
        align-items: center;
    }
    
    .hamburger {
        display: flex;
        z-index: 1001;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background: var(--gradient-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-heavy);
        padding: 80px 20px 20px;
        height: 100vh;
        overflow-y: auto;
        gap: 2px !important;
        justify-content: flex-start !important;
        align-items: center !important;
        display: flex !important;
    }
    
    .nav-menu * {
        margin: 0 !important;
        margin-bottom: 2px !important;
    }
    
    .nav-menu.active {
        left: 0;
        justify-content: flex-start !important;
        align-items: center !important;
        display: flex !important;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu a {
        padding: 8px 20px;
        font-size: 16px;
        width: 100%;
        text-align: center;
        border-radius: var(--radius-medium);
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .nav-menu a:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }
    
    .nav-menu b a {
        font-size: 1.3em;
        margin-bottom: 2px !important;
        margin-top: 0 !important;
        background: rgba(255, 255, 255, 0.15);
    }
    
    .search-container {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .search-form {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .search-input {
        min-width: auto;
        width: 100%;
    }
    
    .card {
        padding: 20px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .card-title {
        font-size: 1.2em;
    }
    
    .order-meta {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .order-meta .btn {
        width: 100%;
        text-align: center;
    }
    
    .info-grid {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .info-item {
        justify-content: space-between;
        padding: 5px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .contractor-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .contractor-info {
        text-align: center;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 16px;
        min-width: auto;
        width: 100%;
    }
    
    .btn-large {
        padding: 18px 24px;
        font-size: 18px;
    }
    
    .profile-picture {
        width: 80px;
        height: 80px;
    }
    
    .profile-picture-small {
        width: 50px;
        height: 50px;
    }
    
    .profile-picture-large {
        width: 120px;
        height: 120px;
    }
    
    .alert {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .form-input, .form-textarea, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px 16px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 10px;
    }
    
    .header-nav {
        padding: 8px 10px;
    }
    
    .nav-menu {
        padding: 70px 15px 20px;
    }
    
    .nav-menu a {
        padding: 6px 16px;
        font-size: 15px;
    }
    
    .card {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .card-title {
        font-size: 1.1em;
    }
    
    .btn {
        padding: 12px 16px;
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .search-container {
        padding: 12px;
    }
    
    .order-card {
        padding: 15px;
    }
    
    .contractor-card {
        padding: 15px;
    }
    
    .info-grid {
        gap: 6px;
    }
    
    .info-item {
        font-size: 13px;
    }
    
    .profile-picture {
        width: 70px;
        height: 70px;
    }
    
    .profile-picture-small {
        width: 45px;
        height: 45px;
    }
    
    .profile-picture-large {
        width: 100px;
        height: 100px;
    }
    
    .alert {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .card-badge {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .main-container {
        padding: 8px;
    }
    
    .header-nav {
        padding: 6px 8px;
    }
    
    .header-nav a {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .card {
        padding: 12px;
    }
    
    .btn {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .card-title {
        font-size: 1em;
    }
    
    .info-item {
        font-size: 12px;
    }
    
    .profile-picture {
        width: 60px;
        height: 60px;
    }
    
    .profile-picture-small {
        width: 40px;
        height: 40px;
    }
}

/* Landscape orientation fixes */
@media (max-width: 768px) and (orientation: landscape) {
    .nav-menu {
        padding: 60px 20px 20px;
    }
    
    .nav-menu a {
        padding: 4px 16px;
        font-size: 14px;
    }
    
    .search-form {
        flex-direction: row;
        align-items: center;
    }
    
    .search-input {
        width: auto;
        flex: 1;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.mx-10 { margin-left: 10px; margin-right: 10px; }

.p-10 { padding: 10px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

.hidden { display: none; }
.visible { display: block; }

.flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }

/* Mobile-specific utilities */
.mobile-full { width: 100%; }
.mobile-center { text-align: center; }
.mobile-padding { padding: 15px; }

/* Touch-friendly spacing */
.touch-target {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image Gallery Styles */
.attachment-gallery {
    margin-bottom: 30px;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-medium);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    background: white;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.gallery-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 10px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-filename {
    font-size: 12px;
    font-weight: 500;
    display: block;
    text-align: center;
    word-break: break-word;
}

.attachment-files {
    margin-top: 20px;
}

/* Responsive gallery adjustments */
@media (max-width: 768px) {
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .gallery-image {
        height: 120px;
    }
    
    .gallery-overlay {
        transform: translateY(0);
        background: rgba(0, 0, 0, 0.8);
        padding: 8px;
    }
    
    .gallery-filename {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .gallery-image {
        height: 100px;
    }
    
    .gallery-overlay {
        padding: 6px;
    }
    
    .gallery-filename {
        font-size: 10px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-orange);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 

/* Mobile Responsive for Services Table */
@media (max-width: 768px) {
    .services-list {
        gap: 20px;
    }
    
    .category-header {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        background: #f8f9fa;
    }
    
    .category-title {
        font-size: 1.2em;
        color: #333;
    }
    
    .contractor-count {
        font-size: 12px;
        padding: 4px 8px;
        background: #e9ecef;
        color: #666;
    }
    
    .contractors-table {
        overflow-x: visible;
    }
    
    .table-header {
        display: none; /* Hide headers on mobile */
    }
    
    .table-row {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        border: 1px solid #e0e0e0;
        border-radius: var(--radius-small);
        margin-bottom: 10px;
        min-width: auto;
        background: white;
        min-height: auto;
    }
    
    .table-row:hover {
        background-color: #f8f9fa;
    }
    
    .table-cell {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f0;
        font-size: 14px;
        min-height: auto;
    }
    
    .table-cell:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .table-cell:before {
        content: attr(data-label);
        font-weight: 600;
        color: #333;
        min-width: 100px;
        margin-right: 10px;
    }
    
    .profile-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding-bottom: 15px;
        border-bottom: 2px solid #f0f0f0;
    }
    
    .profile-cell:before {
        display: none;
    }
    
    .contractor-profile {
        width: 100%;
        justify-content: space-between;
        align-items: center;
    }
    
    .contractor-name {
        flex: 1;
        margin-left: 12px;
    }
    
    .contractor-name a {
        font-size: 16px;
        font-weight: 500;
        color: #555;
    }
    
    .actions-cell {
        justify-content: center;
        padding-top: 10px;
    }
    
    .actions-cell .btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
        background: #f8f9fa;
        color: #333;
        border: 1px solid #ddd;
    }
    
    .card-payment-badge {
        margin-left: 0;
        margin-top: 5px;
        color: #666;
    }
}

@media (max-width: 480px) {
    .category-header {
        padding: 12px;
    }
    
    .category-title {
        font-size: 1.1em;
    }
    
    .table-row {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .table-cell {
        font-size: 13px;
        padding: 6px 0;
    }
    
    .table-cell:before {
        min-width: 80px;
        font-size: 12px;
    }
    
    .contractor-name a {
        font-size: 15px;
    }
    
    .actions-cell .btn {
        padding: 10px;
        font-size: 13px;
    }
}

/* Mobile Responsive for Contractor Profile */
@media (max-width: 768px) {
    .contractor-profile-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .profile-section {
        position: static;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .contractor-name {
        font-size: 1.5em;
        text-align: center;
    }
    
    .business-type {
        text-align: center;
    }
    
    .location, .phone {
        text-align: center;
    }
    
    .info-section {
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 1.1em;
    }
    
    .tags-container {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .work-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .gallery-image {
        height: 120px;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .rating-display {
        text-align: left;
    }
    
    .info-grid {
        gap: 10px;
    }
    
    .info-item {
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .info-item:last-child {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 15px;
    }
    
    .contractor-name {
        font-size: 1.3em;
    }
    
    .section-title {
        font-size: 1em;
    }
    
    .work-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .gallery-image {
        height: 100px;
    }
    
    .gallery-content {
        padding: 8px;
    }
    
    .gallery-title {
        font-size: 13px;
    }
    
    .review-item {
        padding: 12px;
    }
    
    .review-title {
        font-size: 14px;
    }
    
    .social-link {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .tag {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-teal);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-small);
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(246, 134, 10, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linecap='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

/* Info Grid */
.info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
}

.info-icon {
    font-size: 16px;
    min-width: 20px;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-link {
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius-small);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid;
}

.social-link.facebook {
    color: #1877f2;
    border-color: #1877f2;
}

.social-link.facebook:hover {
    background: #1877f2;
    color: white;
}

.social-link.instagram {
    color: #e4405f;
    border-color: #e4405f;
}

.social-link.instagram:hover {
    background: #e4405f;
    color: white;
}

.social-link.website {
    color: #333;
    border-color: #333;
}

.social-link.website:hover {
    background: #333;
    color: white;
}

.social-link.youtube {
    color: #ff0000;
    border-color: #ff0000;
}

.social-link.youtube:hover {
    background: #ff0000;
    color: white;
}

.social-link.telegram {
    color: #0088cc;
    border-color: #0088cc;
}

.social-link.telegram:hover {
    background: #0088cc;
    color: white;
}

/* Work Gallery */
.work-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    border-radius: var(--radius-medium);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    background: white;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.gallery-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.gallery-content {
    padding: 12px;
}

.gallery-title {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.gallery-date {
    color: #666;
    font-size: 12px;
}

/* Reviews */
.reviews-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.review-item {
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-medium);
    padding: 15px;
    background: white;
    transition: all 0.3s ease;
}

.review-item:hover {
    border-color: var(--primary-orange);
    box-shadow: var(--shadow-light);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 15px;
}

.review-info {
    flex: 1;
}

.review-title {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.review-date {
    color: #666;
    font-size: 12px;
}

.rating-display {
    text-align: right;
    min-width: 80px;
}

.stars {
    color: #FFD700;
    font-size: 16px;
    margin-bottom: 2px;
}

.star {
    opacity: 0.3;
}

.star.filled {
    opacity: 1;
}

.rating-text {
    color: #666;
    font-size: 12px;
}

.review-comment {
    background: #f8f9fa;
    border-radius: var(--radius-small);
    padding: 10px;
    margin-top: 10px;
}

.comment-text {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.comment-meta {
    color: #888;
    font-size: 12px;
}

.no-review {
    margin: 10px 0 0 0;
    color: #888;
    font-style: italic;
    font-size: 14px;
}

.empty-state {
    color: #666;
    text-align: center;
    padding: 40px 0;
    font-style: italic;
}

/* Mobile touch improvements */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
        box-shadow: var(--shadow-light);
    }
    
    .btn:active {
        transform: scale(0.98);
        background: linear-gradient(135deg, #e67700 0%, #a88000 100%);
    }
    
    .card:hover {
        transform: none;
    }
    
    .order-card:hover {
        transform: none;
    }
    
    .contractor-card:hover {
        transform: none;
    }
} 