/* STYLE.CSS Contains all the styling for the Hashikom nutritional data page. */ /* --- CSS Variables --- */ :root { --primary-color: #8c283f; /* Maroon */ --secondary-color: #f39200; /* Orange */ --dark-color: #231f20; /* Dark Grey */ --light-color: #ffffff; --grey-color: #f4f4f4; --border-radius: 8px; --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07); } /* --- General Styles & Resets --- */ * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: 'Cairo', sans-serif; background-color: var(--grey-color); color: var(--dark-color); line-height: 1.6; } .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; } .card { background-color: var(--light-color); border-radius: var(--border-radius); box-shadow: var(--box-shadow); padding: 25px; margin-bottom: 25px; } /* --- Header --- */ .main-header { background-color: var(--light-color); padding: 15px 0; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); margin-bottom: 30px; } .main-header .container { text-align: right; } .logo { display: block; height: 50px; margin: 0; } /* --- Filters Section --- */ .filters-section { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; } .filter-group { flex: 1 1 300px; /* Flexible grow and shrink */ } .filter-group label { display: block; font-weight: 700; margin-bottom: 8px; color: var(--primary-color); } .input-with-icon { position: relative; } .input-with-icon .fa-magnifying-glass { position: absolute; top: 50%; right: 15px; transform: translateY(-50%); color: #aaa; } .filters-section input[type="text"], .filters-section select { width: 100%; padding: 12px; padding-right: 40px; /* Space for icon */ border: 1px solid #ccc; border-radius: var(--border-radius); transition: border-color 0.3s; } .filters-section select { padding-right: 12px; } .filters-section input[type="text"]:focus, .filters-section select:focus { outline: none; border-color: var(--secondary-color); } .reset-btn { padding: 12px 25px; background-color: var(--primary-color); color: var(--light-color); border: none; border-radius: var(--border-radius); cursor: pointer; font-weight: 700; font-family: 'Cairo', sans-serif; transition: background-color 0.3s; flex-shrink: 0; } .reset-btn:hover { background-color: #6d1f31; /* Darker maroon */ } .reset-btn i { margin-left: 8px; } /* --- Stats Section --- */ .stats-section { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; } .stat-item { position: relative; padding-top: 20px; text-align: center; overflow: hidden; } .stat-item h4 { color: var(--primary-color); font-size: 1rem; } .stat-item p { font-size: 2.5rem; font-weight: 700; color: var(--dark-color); } .stat-item.high-salt p { color: var(--secondary-color); } .icon-bg { position: absolute; font-size: 7rem; top: 50%; left: -20px; transform: translateY(-50%) rotate(-15deg); color: var(--grey-color); z-index: 0; opacity: 0.5; } /* --- Table Section --- */ .table-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; padding-bottom: 20px; border-bottom: 2px solid var(--grey-color); } .table-header h3 { color: var(--primary-color); } .legend { display: flex; gap: 15px; font-size: 0.9rem; color: #666; } .legend-icon-info { color: #3b82f6; } .legend-icon-salt { height: 20px; width: 20px;} .table-wrapper { overflow-x: auto; /* For responsiveness on small screens */ } table { width: 100%; border-collapse: collapse; margin-top: 20px; } thead tr { border-bottom: 2px solid var(--primary-color); } th, td { padding: 15px; text-align: right; } td:last-child, td:nth-child(5) { text-align: center; } th { font-weight: 700; } tbody tr:nth-child(even) { background-color: var(--grey-color); } tbody tr:hover { background-color: #fdecd2; /* Light orange on hover */ } td .salt-icon { color: var(--secondary-color); height: 30px; width: 30px; display: inline-block; vertical-align: middle; } td .fa-person-walking { font-size: 30px; vertical-align: middle; margin-left: 8px; transform: scaleX(-1); } /* --- Footer --- */ .main-footer { text-align: center; padding: 25px; margin-top: 30px; background-color: var(--dark-color); color: var(--light-color); } /* --- Responsive Design --- */ @media (max-width: 768px) { .main-header .container { text-align: center; } .logo{ margin: 0 auto; } .filters-section { flex-direction: column; align-items: stretch; gap: 8px; /* تقليل المسافة بين العناصر */ } .filter-group { flex: 1 1 100%; } .reset-btn { width: 100%; /* يجعل الزر يأخذ عرض كامل */ text-align: center; } .table-header { flex-direction: column; align-items: flex-start; } }