/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    direction: rtl;
    text-align: right;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 2rem;
    margin-bottom: 0.2rem;
}

.logo span {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav a:hover,
.nav a.active {
    background-color: rgba(255,255,255,0.2);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.hero-graphic {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1rem;
    text-align: center;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.card-1 {
    top: 20px;
    right: 20px;
    animation-delay: 0s;
}

.card-2 {
    bottom: 60px;
    left: 10px;
    animation-delay: 1s;
}

.card-3 {
    top: 60px;
    left: 50px;
    animation-delay: 2s;
}

.central-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: pulse 4s ease-in-out infinite;
}

.floating-card i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.floating-card span {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: #333;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background-color: white;
}

.features h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.6s ease;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(102, 126, 234, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.1);
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.feature-card h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Status Section */
.status {
    padding: 3rem 0;
    background-color: #f8f9fa;
}

.status h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #333;
}

.status-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.status-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #28a745;
    animation: pulse 2s infinite;
}

.status-indicator.online {
    background-color: #28a745;
}

.status-indicator.offline {
    background-color: #dc3545;
}

/* Footer */
.footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* Form Styles */
.form-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.form-links {
    text-align: center;
    margin-top: 1rem;
}

.form-links a {
    color: #667eea;
    text-decoration: none;
}

.form-links a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav ul {
        gap: 1rem;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-image i {
        font-size: 4rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .status-grid {
        flex-direction: column;
        align-items: center;
    }
    
    /* Dashboard Mobile Optimization */
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .feature-card {
        padding: 1.5rem 1rem;
        text-align: center;
    }
    
    .feature-card h4 {
        font-size: 1.1rem;
    }
    
    .feature-card p {
        font-size: 0.9rem;
        margin: 0.5rem 0;
    }
    
    .btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
}

/* Mobile-First Enhancements */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 1rem 0;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .nav a {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    /* Dashboard specific mobile styles */
    section {
        padding: 1rem 0 !important;
    }
    
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .feature-card {
        padding: 1.5rem 1rem;
    }
    
    .feature-card i {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        border-radius: 8px;
    }
}

/* Dogs Page Mobile Optimization */
@media (max-width: 768px) {
    .nav-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .tab-btn {
        flex-shrink: 0;
        font-size: 0.9rem !important;
        padding: 0.8rem 1.5rem !important;
    }
    
    .search-filter-bar {
        padding: 1rem !important;
    }
    
    .search-filter-bar > div:first-child {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .search-filter-bar input,
    .search-filter-bar select,
    .search-filter-bar button {
        width: 100% !important;
        padding: 0.8rem !important;
        font-size: 1rem !important;
    }
    
    #allDogsGrid,
    #availableDogsGrid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .dog-card {
        margin: 0 auto;
        max-width: 100%;
    }
    
    .dog-header {
        padding: 1.5rem 1rem !important;
    }
    
    .dog-body {
        padding: 1.5rem 1rem !important;
    }
    
    .dog-details {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.8rem !important;
        font-size: 0.9rem !important;
    }
    
    .dog-actions {
        flex-direction: column !important;
        gap: 0.8rem !important;
    }
    
    .dog-actions button {
        width: 100% !important;
        padding: 1rem !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .module-header {
        flex-direction: column !important;
        text-align: center;
        gap: 1rem;
    }
    
    .module-header h1,
    .module-header h2 {
        font-size: 1.3rem !important;
    }
    
    .module-header p {
        font-size: 0.9rem;
    }
    
    .nav-tabs {
        margin-bottom: 1rem !important;
    }
    
    .tab-btn {
        font-size: 0.8rem !important;
        padding: 0.6rem 1rem !important;
    }
    
    #dogsTabContent {
        padding: 1rem !important;
        border-radius: 8px !important;
    }
    
    .dog-card {
        border-radius: 10px !important;
    }
    
    .dog-header {
        padding: 1rem !important;
    }
    
    .dog-header h3 {
        font-size: 1.2rem !important;
    }
    
    .dog-header p {
        font-size: 0.9rem !important;
    }
    
    .dog-body {
        padding: 1rem !important;
    }
    
    .dog-details {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
    
    .dog-details > div {
        padding: 0.6rem !important;
        font-size: 0.9rem !important;
    }
}